This class interface contains all command that run in api server.

package Ant\ChateaClient\Client

 Methods

Add new Photo Album in user accont

addAlbum(\Ant\ChateaClient\Client\number $user_id, string $title, string $description) : array | string
example Photo Album $your_api_instance->addAlbum(1,'new Album', 'this is me personal photobook'); array( "id" => 2, "participant" => array( "id" => 1, "username" => "alex", "email" => "alex@chateagratis.net" ), "title" => "new Album", "description" => "this is me personal photobook" );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user ID

$title

string

One name for the Album

$description

string

A short description of type photos

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with new album data | Message with error in json format

Examples


Insert a photo entity into album id

addAlbumPhoto(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $photo_id, \Ant\ChateaClient\Client\number $album_id) : array | string
example photo 1 on album 1 $your_api_instance->addAlbumPhoto(1,1,1); // ouput message Photo inserted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$photo_id

\Ant\ChateaClient\Client\number

The photo id to insert

$album_id

\Ant\ChateaClient\Client\number

The album id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with the album one user | Message with error in json format

Examples


Create un new Channel

addChanel(string $name, string $title, string $description, string $channel_type) : array | string
example channel name','API - Channel Name', 'This is channel about loves, friends and others', 'love');

Sample Ouput

array( "id" =>96 "name" =>"new channel name", "slug" =>"new-channel-name", "title" =>"API - Channel Name", "description" =>"This is channel about loves, friends and others", "owner" => array( "id" =>1 "username" =>"alan" ), "channel_type" => array( "name" =>"love" ), "_links" => array( "self" => array( "href" =>"https://api.chatsfree.net/api/channels/96" ), "fans" => array( "href" =>"https://api.chatsfree.net/api/channels/96/fans" ), "owner" => array( "href" =>"https://api.chatsfree.net/api/users/1" ) ) );

Parameters

$name

string

The name of channel this is unique

$title

string

The title of channel

$description

string

The long description of channel

$channel_type

string

The type pof channel, This value have a subset available in server, you can view the channels type with command @link #showChannelsTypes()

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with new channel | Message with error in json format

Examples


Sends a friendship request between two users

addFriends(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $friend_id) : string
example a friendship request between user 1 to user 3 $your_api_instance->addFriends(1,3);

Parameters

$user_id

\Ant\ChateaClient\Client\number

Your user id

$friend_id

\Ant\ChateaClient\Client\number

The user id that retrieve the request

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMassage endorsement , if the request have been sent

Examples


Accept request new Friend

addFriendshipRequest(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $user_accept_id) : string
example accept like new Friend to user 3 $your_api_instance->showFriendshipsRequest(1,3); Friendship accepted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that you retrieve request new Friend

$user_accept_id

\Ant\ChateaClient\Client\number

The user id pending friendship

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage accepted | Message with error in json format

Examples


upload new photo at server api

addPhoto(\Ant\ChateaClient\Client\number $user_id, string $imageFile, string $imageTile) : array | string
example Photo $your_api_instance->addPhoto(1,'my face in wall', '/home/alex/my_face_wall.png'); array( "id" => 9, "participant" => array( "id" => 1, "username" => "alex", ), "publicated_at" => "2013-10-30T08:11:22+0100", "path" => "2013/10/30/5270b11b25f5c.png", "number_votes" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/photos/9", ), "creator" => array( "href" => "http://api.chateagratis.net/api/users/1", ), "path" => array( "href" => "http://api.chateagratis.net/uploads/2013/10/30/5270b11b25f5c.png", "type" => "image/*", ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user owner of photo

$imageFile

string

The path to upload photo

$imageTile

string

The name of photo

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with new album data | Message with error in json format

Examples


Add one vote at photo

addPhotoVote(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $photo_id, int $score) : array | string
example ( "score" => 10, "photo" => array( "id" => 6, "number_votes" => 21, "score" => 47.571428571428, ), "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/photos/6/votes", ), "photo" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/photos/6", ), "participant" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$photo_id

\Ant\ChateaClient\Client\number

The photo id to retrieve data

$score

int

The score photo, The score ha to be between one and ten

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with you vote | Message with error in json format

Examples


Report a photo

addReportPhoto(\Ant\ChateaClient\Client\number $photo_id, string $reason) : array | string
example Photo report $your_api_instance->addReportPhoto(1,'This photo is not adequate'); array( "reason" => "this is not me photo", "created_at" => "2013-10-29T12:13:07+0100", "id" => 9, );

Parameters

$photo_id

\Ant\ChateaClient\Client\number

The Photo ID to be reported

$reason

string

The reason this report

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with report | Message with error in json format

Examples


Create new thread

addThread(\Ant\ChateaClient\Client\number $user_id, string $recipient_name, string $subject, string $body) : array | string
example new thread $your_api_instance->addThread(1,'alex2','Subject sample',"this is my body in 1rst message ") array( "id" => 5, "subject" => "Subject sample", );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that create the thread

$recipient_name

string

The ID username that retrieve the message

$subject

string

The short description of thread

$body

string

The long text of thread

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with data thread | Message with error in json format

Examples


Add one message on thread

addThreadMessage(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $thread_id, string $body) : array | string
example one message on thread $your_api_instance->showThreadMessages(1,1,'this is entity body'); array( "id" => 15, "body" => "this is entity body", "created_at" => "2013-10-30T14:00:53+0100" );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that create the thread

$thread_id

\Ant\ChateaClient\Client\number

The ID of thread

$body

string

the text of message

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with messages | Message with error in json format

Examples


Blocked one user

addUserBlocked(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $user_blocked_id) : string
example one user $your_api_instance->addUserBlocked(1,6); //output User blocked

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$user_blocked_id

\Ant\ChateaClient\Client\number

User to blocked by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can blocked an user | Message with error in json format

Examples


Make channel's fan one user

addUserChannelFan(\Ant\ChateaClient\Client\number $channel_id, \Ant\ChateaClient\Client\number $user_id) : string
example the user 1 fan of channel 1 $your_api_instance->addUserChannelFan(1,1);

The ouput message:

The user is a fan of the channel successfully

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel id to receive a fan

$user_id

\Ant\ChateaClient\Client\number

The user id will be fan

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMassage ok if user is new fan

Examples


Add new profile one user

addUserProfile(\Ant\ChateaClient\Client\number $user_id, string $about, string $seeking, $gender, $youWant, $birthday) : array | string
example profile one user $your_api_instance->addUserProfile(1,'about-10','bisexual'); array( "id" => 11, "about" => "about-10", "seeking" => "bisexual", "count_visits" => 0, "publicated_at" => "2013-10-30T16:43:51+0100", );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$about

string

Short description your profile

$seeking

string

Choice between

$gender

$youWant

$birthday

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with profile data | Message with error in json format

Examples


Report a user

addUserReports(\Ant\ChateaClient\Client\number $user_reported_id, string $reason) : array | string

Parameters

$user_reported_id

\Ant\ChateaClient\Client\number

The user id that is report

$reason

string

Description for report the user

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error array( "reason" => "this user is heterosexual", "created_at" => "2013-10-30T17:03:29+0100", "id" => 44, );

Returns

arraystringAssociative array with report data | Message with error in json format

Change user password

changePassword(string $current_password, string $new_password, string $repeat_new_password) : string
example //ouput message Password changed sucessfully

Parameters

$current_password

string

your actual password

$new_password

string

your new password

$repeat_new_password

string

repeat your new password

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringmessage password changed sucessfully if your password have been changed | Message with error in json format

Examples


Delete one album

delAlbum(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $album_id) : string
example an abum 1 to user 1 $your_api_instance->delAlbum(1,1); // ouput message Album deleted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$album_id

\Ant\ChateaClient\Client\number

The album id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can delete the album | Message with error in json format

Examples


Delete channel

delChannel(\Ant\ChateaClient\Client\number $channel_id) : string
example

Ouput this message:

Channel deleted

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel to update by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringThe message ok, if channel has been deleted

Examples


Delete friends between two users

delFriend(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $user_delete_id) : string
example delete friendship to user 3 $your_api_instance->delFriend(1,3); Friendship deleted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that you delere friend

$user_delete_id

\Ant\ChateaClient\Client\number

The user id, you want deleted.

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage delete | Message with error in json format

Examples


Decline a friendship request

delFriendshipRequest(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $user_decline_id) : string
example declined like new Friend to user 3 $your_api_instance->delFriendshipRequest(1,3); Friendship declined

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that you decliene new Friend

$user_decline_id

\Ant\ChateaClient\Client\number

The user id pending friendship

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage declined | Message with error in json format

Examples


Delete my user

delMe() : string
example me user $your_api_instance->delMe(); //ouput message User deleted

Exceptions

\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage deleted user | Message with error in json format

Examples


Delete a Photo

delPhoto(\Ant\ChateaClient\Client\number $photo_id) : string
example Photo $your_api_instance->delPhoto(1); Photo deleted

Parameters

$photo_id

\Ant\ChateaClient\Client\number

The photo id you like deleting

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can delete the photo | Message with error in json format

Examples


Delete a photo of album

delPhotoAlbum(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $photo_id) : string
example an abum 1 to user 1 $your_api_instance->delAlbum(1,1); Photo deleted of Album

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$photo_id

\Ant\ChateaClient\Client\number

The photo id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can delete photo of album | Message with error in json format

Examples


Delete one vote of one photo

delPhotoVote(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $photo_id) : string
example one vote of photo 6 $your_api_instance->delPhotoVote(1,6); //output Vote deleted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to delete data

$photo_id

\Ant\ChateaClient\Client\number

The phot id to delete vote

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can delete the vote | Message with error in json format

Examples


Delete one thread ant all messages

delThread(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $thread_id) : string
example thread 6 $your_api_instance->delThread(6); //ouput message Thread deleted

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that create the thread

$thread_id

\Ant\ChateaClient\Client\number

The ID of thread

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can delete thread | Message with error in json format

Examples


UnBlocked one user

delUserBlocked(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $user_blocked_id) : string
example one user $your_api_instance->delUserBlocked(1,6); //output User unblocked

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$user_blocked_id

\Ant\ChateaClient\Client\number

User to blocked by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMessage sucessfully if can blocked an user | Message with error in json format

Examples


Remove channel's fan one user

delUserChannelFan(\Ant\ChateaClient\Client\number $channel_id, \Ant\ChateaClient\Client\number $user_id) : string
example the user 1 fan of channel 1 $your_api_instance->delUserChannelFan(1,1);

The ouput message:

The user has been removed as fan of the channel successfully

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel id to receive a fan

$user_id

\Ant\ChateaClient\Client\number

The user id will be fan

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringMassage ok if user is not fan

Examples


Request reset the user password. The server send email with new password, this this request is only once for day.

forgotPassword(string $username_or_email) : string
example $your_api_instance->forgotPassword('you_email@antwebs.es');

Ouput

Parameters

$username_or_email

string

The user email or username

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringmessage ok message if your new password have been sent

Examples


Revokes the access token and logout the user session in server.

logout() : string

Exceptions

\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

stringa message ok and the HTTP status code 200

Get my user

me() 
example array( 'id' => '1', 'username' => 'xabier', 'email' => 'xabier@antweb.es', "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1", ), "channels" => array( "href" => "http://api.chateagratis.net/api/users/1/channels", ), "channels_fan" => array( "href" => "http://api.chateagratis.net/api/users/1/channelsFan", ), "blocked_users" => array( "href" => "http://api.chateagratis.net/api/users/1/blocked", ) ) );

Exceptions

\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Examples


Register new user at server

register(string $username, string $email, string $new_password, string $repeat_new_password, string $affiliate_host, $ip) : array | string
example user name','new_password','repeat_new_password','your hosts name');

Ouput

array{ "id"=> 1234, "username"=> "new-username", "email"=> "newUserName@ant.com" }

Parameters

$username

string

The name of user. This is unique for user

$email

string

The email for user. This is unique for user

$new_password

string

The user password

$repeat_new_password

string

Repeat the password

$affiliate_host

string

The name of your server, where you make send request. You don't use protocols (http:// or ftp ) or subdomains only use primary name

$ip

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with you profile | Message with error in json format

Examples


Show one album of user

showAlbum(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $album_id) : array | string
example an abum 1 to user 1 $your_api_instance->showUserAlbum(1,1); array( "id" => 1, "title" => "la foto 1", "description" => "default album", "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/albums/1", ), "participant" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "photos" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/albums/1/photos", ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$album_id

\Ant\ChateaClient\Client\number

The album id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with the album one user | Message with error in json format

Examples


Show all abums one user

showAlbums(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example all abums to user 1, only 1rst $your_api_instance->showUserAlbums(1); array( "total" => 1, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/albums", ) ), "resources" => array( array( "id" => 1, "title" => "la foto 1", "description" => "default album", "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/albums/1", ), "participant" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "photos" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/albums/1/photos", ) ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all albums one user | Message with error in json format

Examples


Get channel. Show data channel by id

showChannel(\Ant\ChateaClient\Client\number $channel_id) : array | string
example

Sample Ouput

array( "id" =>96 "name" =>"update channel name", "slug" =>"update-channel-name", "title" =>"API - Channel title", "description" =>"This is channel about loves, friends and others", "owner" => array( "id" =>1 "username" =>"alex" ), "channel_type" => array( "name" =>"love" ), "_links" => array( "self" => array( "href" =>"https://api.chatsfree.net/api/channels/96" ), "fans" => array( "href" =>"https://api.chatsfree.net/api/channels/96/fans" ), "owner" => array( "href" =>"https://api.chatsfree.net/api/users/1" ) ) );

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel to retrieve by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with channel data | Message with error in json format

Examples


Get fans (users) the channel

showChannelFans(\Ant\ChateaClient\Client\number $channel_id, int $limit, int $offset) : array | string
example Channels Fans of channel 2, only the first $your_api_instance->showChannelFans(3,1,0);

Sample Ouput

array( "total" => 2, "limit" => 2, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/channels/2/fans" ) ), "resources" => array( array( "id" => 1, "username" => "alex", "email" => "alex@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1" ), "channels" => array( "href" => "http://api.chateagratis.net/api/users/1/channels" ), "channels_fan" => array( "href" => "http://api.chateagratis.net/api/users/1/channelsFan" ), "blocked_users" => array( "href" => "http://api.chateagratis.net/api/users/1/blocked" ) ) ) ) );

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel to retrieve fans

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with users that are fans a channel | Message with error in json format

Examples


List all channels register in Server

showChannels(int $limit, int $offset, array $filter) : array | string
example first twenty channels what type is love $your_api_instance->showChannels(25,0, array('channelType'=>'love'));

Sample Ouput

array( "id"=>11, "name" => "channel 11", "slug" => "channel-11", "owner"=>array( id: 1 username: alex ), "channel_type" => array( "name" => "default" ), "_links" => array( "self" => array( href => "http://api.chateagratis.net/api/channels/11" ), "fans" => array( "href" => "http://api.chateagratis.net/api/channels/11/fans" ), "owner" => array( "href => http://api.chateagratis.net/api/users/1" ) );

Parameters

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

$filter

array

Associative array with format filter_name =>value_name

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with channels data | Message with error in json format

Examples


Get Channles types

showChannelsTypes(int $limit, int $offset) : array | string
example Channels types, only the first $your_api_instance->showChannelsTypes(1,0);

Sample Ouput

array( "total" => 6, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/channelstype" ), ), "resources" => array( array( "name" => "adult", "_links" => array( "channelsType" => array( "href" => "http://api.chateagratis.net/api/channels?filter%3DchannelType=adult", ) ) ) ) );

Parameters

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error
\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors

Returns

arraystringAssociative array with channels types use one channel | Message with error in json format

Examples


Get me friends

showFriends(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example User friends for user id = 1, only the first friend $your_api_instance->showFriends(1,1,0); array( "total" => 4, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/friends", ), ), "resources" => array( array( "id" => 3, "username" => "alex3", "email" => "alex3@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/3", ), "channels" => array( "href" => "http://api.chateagratis.net/api/users/3/channels", ), "channels_fan" => array( "href" => "http://api.chateagratis.net/api/users/3/channelsFan", ), "blocked_users" => array( "href" => "http://api.chateagratis.net/api/users/3/blocked", ), ), ), ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id retrieve friends

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with users's are friends one user | Message with error in json format

Examples


Show list user, that one user will pending have your friendship

showFriendshipsPending(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example a friendship pending by user 1, only the first friendship $your_api_instance->showFriendshipsPending(1); array( "total" => 4, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/friends/pending", ), ), "resources" => array( array( "id" => 3, "username" => "alex3", "username_canonical" => "alex3", "email" => "alex3@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/3", ), "channels" => array( "href" => "http://api.chateagratis.net/api/users/3/channels", ), "channels_fan" => array( "href" => "http://api.chateagratis.net/api/users/3/channelsFan", ), "blocked_users" => array( "href" => "http://api.chateagratis.net/api/users/3/blocked", ), ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that you retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with users's are friends one user | Message with error in json format

Examples


Show the friendship requests sent by user id, and it pending to be accepted

showFriendshipsRequest(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example the friendship requests sent by user 1, only the first request friendship $your_api_instance->showFriendshipsRequest(1,1,0); array( "total" => 4, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/friends/pending", ), ), "resources" => array( array( "id" => 3, "username" => "alex3", "username_canonical" => "alex3", "email" => "alex3@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/3", ), "channels" => array( "href" => "http://api.chateagratis.net/api/users/3/channels", ), "channels_fan" => array( "href" => "http://api.chateagratis.net/api/users/3/channelsFan", ), "blocked_users" => array( "href" => "http://api.chateagratis.net/api/users/3/blocked", ), ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that you retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with users's are friends one user | Message with error in json format

Examples


Show Photo

showPhoto(string $photo_id) : array | string
example a photo $your_api_instance->showPhoto(1); array( "id" => 1, "participant" => array( "id" => 1, "username" => "alex", ), "publicated_at" => "2013-10-29T12:27:34+0100", "path" => "photo1-path.jpg", "title" => "la foto 1", "number_votes" => 15, "score" => 15, "album" => array( "id" => 1, "title" => "la foto 1", "description" => "default album", ), "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/photos/1", ), "creator" => array( "href" => "http://api.chateagratis.net/api/users/1", ), "path" => array( "href" => "http://api.chateagratis.net/api/users/uploads/photo1-path.jpg", "type" => "image/*", ), "album" => array( "href" => "http://api.chateagratis.net/api/users/1/albums/1", ), ) );

Parameters

$photo_id

string

The photo ID that you to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with photo data | Message with error in json format

Examples


List all photos of an album

showPhotoAlbum(string $album_id, int $limit, int $offset) : array | string
example first photo of photo album $your_api_instance->showPhotoAlbum(1); array( "total" => 6, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/albums/1/photos", ) ), "resources" => array( array( "id" => 1, "participant" => array( "id" => 1, "username" => "alex", ), "publicated_at" => "2013-10-29T12:27:34+0100", "path" => "photo1-path.jpg", "title" => "la foto 1", "number_votes" => 15, "score" => 15, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/photos/1", ), "creator" => array( "href" => "http://api.chateagratis.net/api/users/1", ), "path" => array( "href" => "http://api.chateagratis.net/api/users/uploads/photo1-path.jpg", "type" => "image/*", ), "album" => array( "href" => "http://api.chateagratis.net/api/users/1/albums/1", ), ), ), ) );

Parameters

$album_id

string

The photo album ID that you to retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with photos an album | Message with error in json format

Examples


Show score I had put to one photo

showPhotoVotes(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $photo_id) : array | string
example score User id 1 had put to 5 photo $your_api_instance->showPhotoVotes(1,5); array( "score" => 100, "photo" => array( "id" => 5, "number_votes" => 15, "score" => 55, ), "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/photos/5/votes", ), "photo" => array( "href" => "http://api.chateagratis.net/api/photos/5", ), "participant" => array( "href" => "http://api.chateagratis.net/api/users/1", ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$photo_id

\Ant\ChateaClient\Client\number

The photo id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with photos an album | Message with error in json format

Examples


Shows the details of a report

showReport(\Ant\ChateaClient\Client\number $report_id) : array | string
example report ID 1 $your_api_instance->showReport(1); array( "reason" => "I dislike a lot this guy", "created_at" => "2013-08-27T15:01:01+0200", "reviewed_at" => "2013-08-27T16:01:01+0200", "id" => 1, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/reports/1", ), "reporter" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "resource" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2", ) ) );

Parameters

$report_id

\Ant\ChateaClient\Client\number

The report id to retrieve data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all albums one user | Message with error in json format

Examples


Show all reports

showReports(int $limit, int $offset) : array | string
example all reports, only 1rst $your_api_instance->showReports(); array( "total" => 42, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/reports", ) ), "resources" => array( array( "reason" => "I dislike a lot this guy", "created_at" => "2013-08-27T15:01:01+0200", "reviewed_at" => "2013-08-27T16:01:01+0200", "id" => 1, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/reports/1", ), "reporter" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "resource" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2", ) ) ) ) );

Parameters

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all albums one user | Message with error in json format

Examples


List all message one thread

showThreadMessages(\Ant\ChateaClient\Client\number $user_id, \Ant\ChateaClient\Client\number $thread_id) : array | string
example messages on thread $your_api_instance->showThreadMessages(1,1); array( array( "id" => 1, "body" => "este es el contenido del msg 1", "created_at" => "2013-08-25T15:01:01+0200", ),array( "id" => 2, "body" => "este es el contenido del msg 2", "created_at" => "2013-08-25T15:31:01+0200", ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id that create the thread

$thread_id

\Ant\ChateaClient\Client\number

The ID of thread

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with messages | Message with error in json format

Examples


Show user messages have in inbox

showThreadsInbox(\Ant\ChateaClient\Client\number $user_id) : array | string
example messages inbox $your_api_instance->addThread(1); array( array( "id" => 1, "subject" => "hola thread 1", ), array( "id" => 4, "subject" => "hola thread 4", ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id see her/his inbox

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with the subject | Message with error in json format

Examples


Show all thread that you sent

showThreadsSent(\Ant\ChateaClient\Client\number $user_id) : array | string
example messages sent $your_api_instance->showThreadsSent(1); array( array( "id" => 1, "subject" => "thread sent 1", ), array( "id" => 4, "subject" => "thread sent 2", ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id see her/his sent messages

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with the subject | Message with error in json format

Examples


Show user by ID

showUser(\Ant\ChateaClient\Client\number $user_id) : array | string
example user with DI 1 $your_api_instance->showUser(); array( "id" => 1, "username" => "alex", "email" => "alex@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "channels" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/channels", ), "channels_fan" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/channelsFan", ), "blocked_users" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/blocked", ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with user data | Message with error in json format

Examples


Show channels created for the user

showUserChannels(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example Channels created by user id = 1, only the first channel $your_api_instance->showUserChannels(1,1,0); array( "total" => 32, "limit" => 32, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/channels", ), ), "resources" => array( array( "id" => 1, "name" => "channel 1", "slug" => "channel-1", "owner" => array( "id" => 1, "username" => "alex", ), "channel_type" => array( "name" => "adult", ), "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/channels/1", ), "fans" => array( "href" => "http://api.chateagratis.net/api/channels/1/fans", ), "owner" => array( "href" => "http://api.chateagratis.net/api/users/1", ), ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User id to retrieve channel

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with channels created one user | Message with error in json format

Examples


Show channels favorites one user

showUserChannelsFan(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example Channels favorites for user id = 1, only the first channel $your_api_instance->showUserChannelsFan(1,1,0); array( "total" => 2, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/channelsFan" ), ), "resources" => array( array( "id" => 2, "name" => "channel 2", "slug" => "channel-2", "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/channels/2" ), "fans" => array( "href" => "http://api.chateagratis.net/api/channels/2/fans", ), "owner" => array( "href" => "http://api.chateagratis.net/api/users/2" ) ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User id to retrieve fans channels

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with channel's is fan one user | Message with error in json format

Examples


Show all votes of one user

showUserPhotoVotes(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example votes User id 1 had put to all photos, only first voto $your_api_instance->showUserPhotoVotes(1,1,0); array( "total" => 3, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/votes", ) ), "resources" => array( array( "score" => 3, "photo" => array( "id" => 2, "number_votes" => 25, "score" => 25, ), "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/photos/2/votes", ), "photo" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/photos/2", ), "participant" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ) ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all votes one user | Message with error in json format

Examples


Show all photos one user

showUserPhotos(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example photos of user id, only the first $your_api_instance->showUserPhotos(1,1,0); array ( "total" => 40, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/users/1/photos", ), ), "resources" => array( array( "id" => 1, "participant" => array( "id" => 1, "username" => "alex", ), "publicated_at" => "2013-10-29T12:27:34+0100", "path" => "photo1-path.jpg", "title" => "la foto 1", "number_votes" => 15, "score" => 15, "album" => array( "id" => 1, "title" => "la foto 1", "description" => "default album", ), "_links" => array( "self" => array( "href" => "http://api.chateagratis.net/api/photos/1", ), "creator" => array( "href" => "http://api.chateagratis.net/api/users/1", ), "path" => array( "href" => "http://api.chateagratis.net/api/users/uploads/photo1-path.jpg", "type" => "image/*", ), "album" => array( "href" => "http://api.chateagratis.net/api/users/1/albums/1", ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

The user id to retrieve data

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with photos an album | Message with error in json format

Examples


Show profile by user ID

showUserProfile(\Ant\ChateaClient\Client\number $user_id) : array | string
example profile one user $your_api_instance->showUserProfile(1); array( "id" => 11, "about" => "about-10", "seeking" => "bisexual", "count_visits" => 0, "publicated_at" => "2013-10-30T16:43:51+0100", );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with profile data | Message with error in json format

Examples


Show count visits on one profile and who visits of one profile

showUserVisitors(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error array( array( "participant" => array( "id" => 1, "username" => "alex", "email" => "alex@chateagratis.net", ), "participant_voyeur" => array( "id" => 2, "username" => "alex2", "email" => "alex2@chateagratis.net", ), "frequency" => 1, ) );

Returns

arraystring

Get all the users

showUsers(int $limit, int $offset) : array | string
example all users, only first $your_api_instance->showUsers(); array( "total" => 12, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users", ) ), "resources" => array( array( "id" => 1, "username" => "alex", "email" => "alex@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1", ), "channels" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/channels", ), "channels_fan" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/channelsFan", ), "blocked_users" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/1/blocked", ) ) ) ) );

Parameters

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all users | Message with error in json format

Examples


Show user blocked by ID user

showUsersBlocked(\Ant\ChateaClient\Client\number $user_id, int $limit, int $offset) : array | string
example all users blocked, only first $your_api_instance->showUsersBlocked(1); array( "total" => 2, "limit" => 1, "offset" => 0, "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users", ) ), "resources" => array( array( "id" => 2, "username" => "alex2", "email" => "alex2@chateagratis.net", "_links" => array( "self" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2", ), "channels" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2/channels", ), "channels_fan" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2/channelsFan", ), "blocked_users" => array( "href" => "http://api.chatsfree.net/app_dev.php/api/users/2/blocked", ) ) ) ) );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$limit

int

number of items to retrieve at most

$offset

int

The distance (displacement) from the start of a data

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with all users blocked | Message with error in json format

Examples


Update a channel

updateChannel(\Ant\ChateaClient\Client\number $channel_id, string $name, string $title, string $description, string $channel_type) : array | string
example 'update channel name','API - Channel title', 'This is channel about loves, friends and others', 'love');

Sample Ouput

array( "id" =>96 "name" =>"update channel name", "slug" =>"update-channel-name", "title" =>"API - Channel title", "description" =>"This is channel about loves, friends and others", "owner" => array( "id" =>1 "username" =>"alex" ), "channel_type" => array( "name" =>"love" ), "_links" => array( "self" => array( "href" =>"https://api.chatsfree.net/api/channels/96" ), "fans" => array( "href" =>"https://api.chatsfree.net/api/channels/96/fans" ), "owner" => array( "href" =>"https://api.chatsfree.net/api/users/1" ) ) );

Parameters

$channel_id

\Ant\ChateaClient\Client\number

Channel to update by ID

$name

string

The new name of channel, if you would like update this field.

$title

string

The new title of channel, if you would like update this field.

$description

string

The new description, of channel if you would like update this field.

$channel_type

string

The type, of channel if you would like update this field.

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with updated channel | Message with error in json format

Examples


Update a profile of me user

updateMe(string $username, string $email, string $current_password) : array | string
example array( 'id' => '1', 'username' => 'xabier', 'email' => 'xabier@antweb.es', );

Parameters

$username

string

your user name | the new username

$email

string

your email | the new user email

$current_password

string

your password. This method can not change your password for this use @link #changePassword

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with you profile updated | Message with error in json format

Examples


Update user profile

updateUserProfile(\Ant\ChateaClient\Client\number $user_id, string $about, string $seeking) : array | string
example profile an user $your_api_instance->updateUserProfile(1,'about-103156','homosexual')); array( "id" => 11, "about" => "about-10", "seeking" => "homosexual", "count_visits" => 0, "publicated_at" => "2013-10-30T16:43:51+0100", );

Parameters

$user_id

\Ant\ChateaClient\Client\number

User to retrieve by ID

$about

string

Short description your profile

$seeking

string

Choice between

Exceptions

\Ant\ChateaClient\Client\InvalidArgumentException This exception is thrown if any parameter has errors
\Ant\ChateaClient\Client\ApiException This exception is thrown if server send one error

Returns

arraystringAssociative array with profile data | Message with error in json format

Examples