Skip to content

Commit 2a846bc

Browse files
Merge pull request #9 from sendbird/feat/v2-platform-sdk
feat: v2 platform sdk
2 parents c34920a + bf362ee commit 2a846bc

File tree

1,217 files changed

+72730
-218259
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,217 files changed

+72730
-218259
lines changed

.openapi-generator/FILES

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

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# [Sendbird PHP Platform SDK](https://sendbird.com/docs/chat/v3/platform-api/getting-started/prepare-to-use-api)
44

55
[![link to docs](https://img.shields.io/badge/SDK-docs-green)](/docs)
6+
[![packagist](https://img.shields.io/packagist/v/sendbird/sendbird-platform-sdk-php.svg)](https://packagist.org/packages/sendbird/sendbird-platform-sdk-php)
7+
68
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.
79
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.
810

@@ -32,10 +34,6 @@ try {
3234

3335
```
3436

35-
# ⚠️ Warnings
36-
37-
This package is not currently published. Please see the Local development section for installation instructions.
38-
3937
# ⚒️ Prerequisite
4038

4139
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.
@@ -65,6 +63,11 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
6563

6664
Then run `composer install`
6765

66+
Or install via:
67+
```bash
68+
composer require sendbird/sendbird-platform-sdk-php
69+
```
70+
6871
### Manual Installation
6972

7073
1. Clone this repository, run `composer install` in the `sendbird-platform-sdk` directory
@@ -80,10 +83,8 @@ require_once('/path/to/sendbird-platform-sdk/vendor/autoload.php');
8083
| | Documentation |
8184
| ----------- | ----------- |
8285
| Announcement | [docs/Api/AnnouncementApi.md](docs/Api/AnnouncementApi.md)|
83-
| Application | [docs/Api/ApplicationApi.md](docs/Api/ApplicationApi.md) |
8486
| Bot | [docs/Api/BotApi.md](docs/Api/BotApi.md) |
8587
| GroupChannel | [docs/Api/GroupChannelApi.md](docs/Api/GroupChannelApi.md) |
8688
| OpenChannel | [docs/Api/OpenChannelApi.md ](docs/Api/OpenChannelApi.md) |
8789
| 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) |
90+
| User | [docs/Api/UserApi.md](docs/Api/UserApi.md) |

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)