/TimSDK

:rainbow:TencentCloud IM unofficial SDK.

Primary LanguagePHPMIT LicenseMIT

TimSDK

Build Status Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads License

IM Sdk for Tencent Instant Messaging.

Requirement

  1. PHP >= 5.5.9
  2. Composer
  3. Openssl Extension

Installation

$ composer require jimchen/tim-sdk -vvv

Usage

Basic Usage:

use TimSDK;
use TimSDK\Core\API;

$options = [
  'app_id'      => '14000xxxx',
  'identifier'  => 'admin',
  'private_key' => 'Your private key',
  'public_key'  => 'Your public key',
  'http'        => [
	'timeout'  => 5,
	'base_uri' => 'Your base url',
  ],
];

$app = new TimCloud($options);

/**
 * Call api uri
 */
$response = $app->request(API::DIRTY_WORDS_GET);

/**
 * or call api alias
 */
$response = $app->request('DIRTY_WORDS_GET');

/**
 * or call a magic function
 */
$response = $app->requestDirtyWordsGet();

var_dump($response);

more API Constants

more details focus on this demo

Documentation

  1. Configuration Parameters
  2. TimCloud

License

MIT