Skip to content

Commit 1cff477

Browse files
Muhamad RidwanMuhamad Ridwan
authored andcommitted
feat: v2 platform sdk
1 parent c34920a commit 1cff477

File tree

1,216 files changed

+72722
-218252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,216 files changed

+72722
-218252
lines changed

.openapi-generator/FILES

Lines changed: 309 additions & 849 deletions
Large diffs are not rendered by default.

README.md-e

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
![Sendbird banner image](http://ww1.prweb.com/prfiles/2021/09/14/18371217/Sendbird_Logo_RGB_lg.png)
2+
3+
# [Sendbird PHP Platform SDK](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api)
4+
5+
[![link to docs](https://img.shields.io/badge/SDK-docs-green)](/docs)
6+
This is a SDK written for PHP that makes talking to the [Sendbird Platform API](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api) easier.
7+
With this library you can extend your Sendbird integration to include advanced features like message-, and channel automation, user management, create user authentication tokens, and create bots.
8+
9+
# 🔥 Quick start
10+
11+
```php
12+
<?php
13+
require_once('/PATH_TO/sendbird-platform-sdk-php/vendor/autoload.php');
14+
$config = \Sendbird\Configuration::getDefaultConfiguration();
15+
16+
$api_token = 'MASTER_API_TOKEN_FROM_DASHBOARD';
17+
$config->setHost("API_REQUEST_URL_FROM_DASHBOARD");
18+
19+
$apiInstance = new Sendbird\Api\UserApi(
20+
new GuzzleHttp\Client(),
21+
$config
22+
);
23+
24+
$list_users_params['api_token'] = $api_token;
25+
26+
try {
27+
$result = $apiInstance->listUsers($list_users_params);
28+
print_r($result);
29+
} catch (Exception $e) {
30+
echo 'Exception when calling listUsers: ', $e->getMessage(), PHP_EOL;
31+
}
32+
33+
```
34+
35+
# ⚠️ Warnings
36+
37+
This package is not currently published. Please see the Local development section for installation instructions.
38+
39+
# ⚒️ Prerequisite
40+
41+
In order to make requests with this SDK you will need you master API token. This can be found through the [Sendbird dashboard](https://dashboard.sendbird.com/). Each app you create in Sendbird has its own master api token. These tokens can be found in Settings > Application > General.
42+
![how to find you api token](https://i.imgur.com/0YMKtpX.png)
43+
44+
# 💻 Requirements
45+
46+
You will need [PHP](https://www.php.net/) installed. This has been developed and tested with PHP 7.3 and later.
47+
48+
### Composer
49+
50+
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
51+
52+
```json
53+
{
54+
"repositories": [
55+
{
56+
"type": "vcs",
57+
"url": "https://github.com/sendbird/sendbird-platform-sdk-php.git"
58+
}
59+
],
60+
"require": {
61+
"sendbird/sendbird-platform-sdk-php": "*@dev"
62+
}
63+
}
64+
```
65+
66+
Then run `composer install`
67+
68+
### Manual Installation
69+
70+
1. Clone this repository, run `composer install` in the `sendbird-platform-sdk` directory
71+
2. Include `autoload.php` in your project
72+
73+
```php
74+
<?php
75+
require_once('/path/to/sendbird-platform-sdk/vendor/autoload.php');
76+
```
77+
78+
##### Helpful links
79+
80+
| | Documentation |
81+
| ----------- | ----------- |
82+
| Announcement | [docs/Api/AnnouncementApi.md](docs/Api/AnnouncementApi.md)|
83+
| Application | [docs/Api/ApplicationApi.md](docs/Api/ApplicationApi.md) |
84+
| Bot | [docs/Api/BotApi.md](docs/Api/BotApi.md) |
85+
| GroupChannel | [docs/Api/GroupChannelApi.md](docs/Api/GroupChannelApi.md) |
86+
| OpenChannel | [docs/Api/OpenChannelApi.md ](docs/Api/OpenChannelApi.md) |
87+
| Message | [docs/Api/MessageApi.md](docs/Api/MessageApi.md) |
88+
| User | [docs/Api/UserApi.md](docs/Api/UserApi.md) |
89+
| Webhooks | [docs/Api/WebhooksApi.md](docs/Api/WebhooksApi.md) |

0 commit comments

Comments
 (0)