Coder Social home page Coder Social logo

leadbi-php-sdk's Introduction

LeadBI PHP SDK

Install

Add the LeadBI PHP SDK as a dependency to your composer.json file:

{
  "require": {
    "leadbi/leadbi-php-sdk": "dev-master"
  }
}

Consider replacing dev-master with the latest version in order to pin your dependencies.

Install the Composer dependency:

php composer.phar install

Usage

This example demonstrates how you can use the SDK to access the api.

<?php
require 'vendor/autoload.php';
require 'config.php';

use LeadBI\LeadBIConfig;
use LeadBI\LeadBIAPI;

$config = new LeadBIConfig(ACCESS_ID, SECRET_KEY, ENDPOINT, SECURE);
$config->debug = DEBUG;

$api = new LeadBIAPI($config);
$response = $api->get("/api/v1/websites");

// Show the results
echo '<pre>';
print_r($response);
echo '</pre>';

Examples

More examples can be found in ./examples directory.

leadbi-php-sdk's People

Contributors

andrei-tofan avatar rquarta-extera avatar leadbi avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar Lorenzo Nicoletti avatar  avatar

Forkers

rquarta-extera

leadbi-php-sdk's Issues

[BUG] Cannot create newsletters

Hi @leadbi ,
I'm not able to create newsletters using the SDK. Every time I call the function create on Newsletters class, it gives me this message as answer: Something went wrong. I tried with some params (name, subject, template, ecc) but the answer is always the same.

Could you review this issue? Or maybe tell me how to build the body of the request.

Thanks,
Riccardo

[HOWTO] Create newsletter with tags filters

Hi @leadbi
I see that it's possible to set filters on the creation of a newsletter via API. Is it possible to set tags filter and preselect users with matched tags? If so, how can I do that?

Thanks,
Riccardo

[BUG] Wrong variable wrapping

Hi @leadbi
There are several bugs inside class Tags about wrong variable wrapping:

I fix this issue in my PR #1, could you merge it please?

Thanks,
Riccardo

[HOWTO] Placeholder support in HTML

Hi @andrei-tofan

I would like to ask you if it's possible to set placeholders in the html, in order to customize the output per single user (for example $NAME or $EMAIL).

I need to add an "unsubscribe" button, and the url must contains the email address of the specific user.

Thank you and best regards

Luca
Extera Digital Agency

[BUG] Cannot assign tag to contact

Hi @leadbi
I'm not able to assign a tag to a contact with tag_name attribute. Every time I call the function assignTagToContact on Tags class, it gives me this message as answer: Something went wrong.

Could you fix this issue?

Thanks,
Riccardo

[BUG] Query contacts

Hi @leadbi
I see inside the SDK that it's possible to filter contacts by tags but when I use this filter I receive a Something went wrong as answer.

Here is a portion of code:

...
$api = new ProspectContacts($config);
$contacts = $api->query($website_id, [
    'tags' => ['tag1', 'tag2']
]);

Can you check this?

Thanks,
Riccardo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.