Metoda zwraca listy subskrybentów użytkownika
Wywołanie
1 2 3 4 5 6 7 |
POST https://getall.pl/api/ Array ( [key] => {klucz api} [method] => ResponderGetLists ) |
Zwracane dane w formacie JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Array ( [0] => Array ( [listid] => {Identyfikator listy} [name] => {Nazwa listy} [count] => {Ilość subskrybentów na liście} ) ... [status] => {Status odpowiedzi: 'ok' lub 'bad'} [error] => {Przyczyna błędu, jeśli wystąpił} ) |
Przykład wywołania metody
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 |
<?php /** * Getall.pl Test API method * * @author Getall.pl * @copyright Getall.pl * @version 1.0 * @since 2015-09-15 */ include('getall.api.class.php'); // Klucz API $api_key = 'WSTAW SWÓJ KLUCZ API'; $getall = new GetAll($api_key); $user_lists = $getall -> ResponderGetLists(); if($user_lists -> status == 'ok') { for($i=0;$i<count($user_lists -> data);$i++) { echo $user_lists -> data[$i] -> name.'<BR>'; } } else echo $user_lists -> error; ?> |
Pobierz klasę PHP do API Opisy błędów Uzyskaj klucz do API