2017 © Pedro Peláez
 

library instela-php-sdk

Instela API

image

instela/instela-php-sdk

Instela API

  • Monday, January 4, 2016
  • by cagataygurturk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Instela API PHP SDK

Build Status, (*1)

Instela API makes accessible almost every method used in Instela. With PHP SDK, you can easily access to all API functions in PHP., (*2)

Getting Started

  1. Minimum requirements – To run the SDK, your system will need to meet the [minimum requirements][docs-requirements], including having PHP >= 5.5 compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
  2. Install the SDK – Using [Composer] is the recommended way to install the AWS SDK for PHP. The SDK is available via [Packagist] under the [instela/instela-php-sdk][install-packagist] package.
  3. Using the SDK – Please read this document to learn how to use the API.

Usage

Available API's

MessagesClient

\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'
));

getThreadList

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)


getThread

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)


sendMessage

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)


getMessage

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)


The Versions

04/01 2016

dev-master

9999999-dev

Instela API

  Sources   Download

The Requires

 

The Development Requires