dev-master
9999999-devInstela API
The Requires
The Development Requires
Wallogit.com
2017 © Pedro Peláez
Instela API
Instela API makes accessible almost every method used in Instela. With PHP SDK, you can easily access to all API functions in PHP., (*2)
instela/instela-php-sdk][install-packagist] package.\Instela\SDK\Messages\MessagesClient, (*3)
This API is used to interact with the Instela Messaging service., (*4)
All methods of this API requires a valid OAuth 2.0 access token., (*5)
You can create a new instance for this API you can use the default constructor:, (*6)
use Instela\SDK\Messages; $client = MessagesClient(array( 'token' => 'ACCESS_TOKEN' ));
Gets thread list for the authorized user., (*7)
MessagesClient::getThreadList( array $args = array() ): \Instela\SDK\Model\ThreadList
Example:, (*8)
$threadList = $messageClient->getThreadList(array(
'page' => 1, // Optional, default = 1
'per_page' => '25' // Optional, default = 1
));
Return Value:, (*9)
Returns a thread list object, (*10)
Gets the thread for the authorized user., (*11)
MessagesClient::getThread( array $args = array() ): \Instela\SDK\Model\Thread
Example:, (*12)
$thread = $messageClient->getThread(array(
'u1' => 1, // User Id of the first participant of the message thread
'u2' => 50, // User Id of the second participant of the message thread
'page' => 1, // Optional, default = 1
'per_page' => '25' // Optional, default = 1
));
Return Value:, (*13)
Returns a thread object., (*14)
Sends message from the account of the authorized user., (*15)
MessagesClient::sendMessage( array $args = array() ): \Instela\SDK\Model\Message
Example:, (*16)
$message = $messageClient->sendMessage(array(
'receiver' => 1, // User Id of the receiver
'message' => "test message", // Message body
));
Return Value:, (*17)
Returns the sent message., (*18)
Gets message with given id., (*19)
MessagesClient::getMessage( array $args = array() ): \Instela\SDK\Model\Message
Example:, (*20)
$message = $messageClient->getMessage(array(
'id' => 1, // Id of the message
));
Return Value:, (*21)
Returns the found message., (*22)
Instela API