/
README.txt
69 lines (52 loc) · 2.32 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
------------------------------------------------------------------------
.:: INTRODUCTION ::.
This is an app that deals with subscribe/unsubscribe in ListShine mailing list system.
.:: DEPENDENCIES ::.
- PHP 5 or higher
.:: QUICK INSTALL ::.
1. Add the folder php-listshine-api to your main php project directory.
2. Acquire your API KEY from the Integration page on ListShine App.
3. Include with 'require_once("path_to/php-listshine-api/ListShine_Api.php");' in the .php file where you want to use the API
.:: FEATURES ::.
Adding subscribers also supports merge vars, the supported merge vars are:
- firstname
- lastname
- company
- website
- phone
- city
- country
- custom
- custom2
- custom3
- custom4
.:: EXAMPLES & DOCUMENTATION ::.
Note: In the following examples a $list_id is required. That is the UUID of the contactlist you want to add the users to.
You can get the UUID's of those contactlists from your account in the ListShine App.
1. Subscribing users
<?php
require_once("/php-listshine-api/ListShine_Api.php");
$connection = new ListShine_Api($API_KEY);
$connection-> subscribeUser($list_id, $email, array("firstname"=>"test"));
?>
1.1. Subscribing users with particular merge vars (in this example: -firstname, -company, -custom2, -phone)
<?php
require_once("/php-listshine-api/ListShine_Api.php");
$connection = new ListShine_Api($API_KEY);
$connection-> subscribeUser($list_id, $email, array("firstname"=>"test","company"=>"examlecompany","custom2"=>"custom2text","phone"=>"12314125"));
?>
2. Unsubscribing users
<?php
require_once("/php-listshine-api/ListShine_Api.php");
$connection = new ListShine_Api($API_KEY);
$connection-> unsubscribeUser($list_id, $email);
?>
3. Getting only contactlists that have a signupform associated with them
<?php
require_once("/php-listshine-api/ListShine_Api.php");
$connection = new ListShine_Api($API_KEY);
$contactlists = $connection-> getContactlistsWithForms();
print_r($contactlists); //this will print out the array containing all of the contactlists that have signupforms
?>
.:: SUPPORT ::.
If you have any further questions on this integration you can contact us at hello@listshine.com