php collection new Pixpulse_Client_Requ est collection create collecti

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$collection = new Pixpulse_Client_Request('collection', 'create');
$collection->user_id = $_SESSION['Auth_User']['user_id'];
$collection->title = 'Favourite friends';
$collection->flag_a = 'friend_list';
$collection->flag_b = 'favourite_list';
$client->addRequest($collection);
$response = $client->request();
$collection = $response->collection_create->toArray();
$collection_upd = new Pixpulse_Client_Request('collection', 'updateuser');
$collection_upd->collection_id = $collection['collection_id'];
$collection_upd->user_id = $_SESSION['Auth_User']['user_id'];
$client->addRequest($collection_upd);
$response = $client->request();