|
1 | | -## Overview |
2 | | - |
3 | | -GetResponse API v3 wrapper working on PHP 5.2+. |
4 | | -[Here](http://apidocs.getresponse.com/en/v3/) you can find our api documentation. |
5 | | - |
6 | | -##Examples |
7 | | - |
8 | | -Standard authorization |
9 | | -```php |
10 | | -$getresponse = new GetResponse('your_api_key'); |
11 | | -``` |
12 | | --- |
13 | | - |
14 | | -Enterprise authorization |
15 | | -```php |
16 | | -$getresponse = new GetResponse('your_api_key'); |
17 | | -$getresponse->enterprise_domain = 'somedomain.com'; |
18 | | - |
19 | | -//api URL is relative to your domain UR: |
20 | | -$getresponse->api_url = 'https://api3.getresponse360.pl/v3'; //for PL domains |
21 | | -$getresponse->api_url = 'https://api3.getresponse360.com/v3'; //default |
22 | | -``` |
23 | | --- |
24 | | -Search contacts |
25 | | -```php |
26 | | -$result = $getresponse->getContacts(array( |
27 | | - 'query' => array( |
28 | | - 'email' => '@getresponse.com', |
29 | | - ), |
30 | | - 'fields' => 'name,email' |
31 | | -)); |
32 | | -``` |
33 | | - |
34 | | - |
35 | | -Add contact |
36 | | -```php |
37 | | -$getresponse->addContact(array( |
38 | | - 'name' => 'Jon Smith', |
39 | | - 'email' => 'jonsmith@testdomain.com', |
40 | | - 'dayOfCycle' => 0, |
41 | | - 'campaign' => array('campaignId' => 'campaign_id_obtained_by_API'), |
42 | | - 'ipAddress' => '89.206.31.190', |
43 | | - 'customFieldValues' => array( |
44 | | - array('customFieldId' => 'custom_field_id_obtained_by_API', |
45 | | - 'value' => array( |
46 | | - 'Y' |
47 | | - )), |
48 | | - array('customFieldId' => 'custom_field_id_obtained_by_API', |
49 | | - 'value' => array( |
50 | | - 'Y' |
51 | | - )) |
52 | | - ) |
53 | | -)); |
54 | | -``` |
55 | | --- |
56 | | -Send message |
57 | | -```php |
58 | | -$result = $getresponse->sendNewsletter(array( |
59 | | - "subject" => 'Test subject', |
60 | | - "fromField" => array('fromFieldId' => 'from_field_id'), |
61 | | - "content" => array( |
62 | | - 'html' => 'Test newsletter contetnt.' |
63 | | - ), |
64 | | - "sendSettings" => array( |
65 | | - "selectedContacts" => array('contact_id_obtained_by_API') |
66 | | - ) |
67 | | - )); |
68 | | -``` |
69 | | --- |
70 | | -Add custom field |
71 | | -```php |
72 | | -$getresponse->setCustomField(array( |
73 | | - 'name' => 'custom_name', |
74 | | - 'type' => 'text', |
75 | | - 'hidden' => 'false', |
76 | | - )); |
77 | | -``` |
78 | | --- |
79 | | -List saved search |
80 | | -```php |
81 | | -$result = $getresponse->searchContacts(); |
82 | | -``` |
83 | | --- |
84 | | -List new web forms |
85 | | -```php |
86 | | -$result = $getresponse->getForms(); |
87 | | -``` |
88 | | --- |
89 | | -List old web forms |
90 | | -```php |
91 | | -$result = $getresponse->getWebForms(); |
92 | | -``` |
93 | | - |
94 | | - |
95 | | - |
| 1 | +### This project is abandoned, soon new version will be available. |
0 commit comments