此包最新版本(v1.0.4)没有可用的许可证信息。

v1.0.4 2021-02-25 14:22 UTC

This package is auto-updated.

Last update: 2024-09-25 22:03:26 UTC


README

目前,SDK处于测试版,因此请自行承担风险。功能可能会在没有警告的情况下发生变化。

安装

使用composer添加此包。

composer require streamally/sdk

注册用户

$response = (new \StreamAlly\StreamAlly('sampleApiToken'))->register([
    // Name is required
   'name' => 'John Smith',
    // Email is required
   'email' => 'john@example.net',
 
    // Show ID from StreamAlly Studio
    'show_id' => '3240438024',

    // Country code should be included
    // Only include phone if user has opted-in to text messages
   'phone' => '19541234567',
    // By default, if not included, one device will be assigned
   'devices' => 2,
    // Send a notification by email and/or text message
    'notify' => 1,
]);

响应

响应包括API返回的JSON,格式为关联数组。


[
   "success" => true,
   "user" => [
        "id" => 3299393,
        "name" => "John Smith",
         ...
    ],
    "links" => [
        "https://studio.streamally.live/go/1234578?token=134545674"
    ]
]