Skip to content

Commit 995774a

Browse files
committed
added viewBotById
1 parent 92cae27 commit 995774a

23 files changed

+1011
-173
lines changed

.openapi-generator/FILES

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ docs/ChooseAPushNotificationContentTemplateResponse.md
1818
docs/CreateABotRequest.md
1919
docs/CreateABotResponse.md
2020
docs/CreateABotResponseBot.md
21-
docs/CreateABotResponseBotStyle.md
2221
docs/CreateAChannelMetadataRequest.md
2322
docs/CreateAChannelMetadataResponse.md
2423
docs/CreateAGroupChannelRequest.md
@@ -54,7 +53,6 @@ docs/LeaveMyGroupChannelsRequest.md
5453
docs/ListBlockedUsersResponse.md
5554
docs/ListBotsResponse.md
5655
docs/ListBotsResponseBotsInner.md
57-
docs/ListBotsResponseBotsInnerAi.md
5856
docs/ListBotsResponseBotsInnerBot.md
5957
docs/ListBotsResponseBotsInnerBotStyle.md
6058
docs/ListBotsResponseBotsInnerBotStyleColor.md
@@ -129,6 +127,8 @@ docs/UpdateAUserRequest.md
129127
docs/UpdateAUserResponse.md
130128
docs/UpdateAnOpenChannelRequest.md
131129
docs/UpdateAnOpenChannelResponse.md
130+
docs/UpdateBotByIdData.md
131+
docs/UpdateBotByIdResponse.md
132132
docs/UpdateChannelInvitationPreferenceRequest.md
133133
docs/UpdateChannelInvitationPreferenceResponse.md
134134
docs/UpdateCountPreferenceOfAChannelRequest.md
@@ -141,6 +141,8 @@ docs/UpdatePushPreferencesRequest.md
141141
docs/UpdatePushPreferencesResponse.md
142142
docs/UserApi.md
143143
docs/ViewAUserResponse.md
144+
docs/ViewBotByIdResponse.md
145+
docs/ViewBotByIdResponseBot.md
144146
docs/ViewCountPreferenceOfAChannelResponse.md
145147
docs/ViewNumberOfChannelsWithUnreadMessagesResponse.md
146148
docs/ViewNumberOfDailyActiveUsersResponse.md
@@ -181,7 +183,6 @@ sendbird_platform_sdk/model/choose_a_push_notification_content_template_response
181183
sendbird_platform_sdk/model/create_a_bot_request.py
182184
sendbird_platform_sdk/model/create_a_bot_response.py
183185
sendbird_platform_sdk/model/create_a_bot_response_bot.py
184-
sendbird_platform_sdk/model/create_a_bot_response_bot_style.py
185186
sendbird_platform_sdk/model/create_a_channel_metadata_request.py
186187
sendbird_platform_sdk/model/create_a_channel_metadata_response.py
187188
sendbird_platform_sdk/model/create_a_group_channel_request.py
@@ -216,7 +217,6 @@ sendbird_platform_sdk/model/leave_my_group_channels_request.py
216217
sendbird_platform_sdk/model/list_blocked_users_response.py
217218
sendbird_platform_sdk/model/list_bots_response.py
218219
sendbird_platform_sdk/model/list_bots_response_bots_inner.py
219-
sendbird_platform_sdk/model/list_bots_response_bots_inner_ai.py
220220
sendbird_platform_sdk/model/list_bots_response_bots_inner_bot.py
221221
sendbird_platform_sdk/model/list_bots_response_bots_inner_bot_style.py
222222
sendbird_platform_sdk/model/list_bots_response_bots_inner_bot_style_color.py
@@ -286,6 +286,8 @@ sendbird_platform_sdk/model/update_a_user_request.py
286286
sendbird_platform_sdk/model/update_a_user_response.py
287287
sendbird_platform_sdk/model/update_an_open_channel_request.py
288288
sendbird_platform_sdk/model/update_an_open_channel_response.py
289+
sendbird_platform_sdk/model/update_bot_by_id_data.py
290+
sendbird_platform_sdk/model/update_bot_by_id_response.py
289291
sendbird_platform_sdk/model/update_channel_invitation_preference_request.py
290292
sendbird_platform_sdk/model/update_channel_invitation_preference_response.py
291293
sendbird_platform_sdk/model/update_count_preference_of_a_channel_request.py
@@ -297,6 +299,8 @@ sendbird_platform_sdk/model/update_push_preferences_for_a_channel_response.py
297299
sendbird_platform_sdk/model/update_push_preferences_request.py
298300
sendbird_platform_sdk/model/update_push_preferences_response.py
299301
sendbird_platform_sdk/model/view_a_user_response.py
302+
sendbird_platform_sdk/model/view_bot_by_id_response.py
303+
sendbird_platform_sdk/model/view_bot_by_id_response_bot.py
300304
sendbird_platform_sdk/model/view_count_preference_of_a_channel_response.py
301305
sendbird_platform_sdk/model/view_number_of_channels_with_unread_messages_response.py
302306
sendbird_platform_sdk/model/view_number_of_daily_active_users_response.py
@@ -312,6 +316,4 @@ setup.cfg
312316
setup.py
313317
test-requirements.txt
314318
test/__init__.py
315-
test/test_send_a_message_request_push_message_template.py
316-
test/test_send_a_message_request_push_message_template_one_of.py
317319
tox.ini

docs/BotApi.md

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ All URIs are relative to *https://api-APP_ID.sendbird.com*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**create_a_bot**](BotApi.md#create_a_bot) | **POST** /v3/bots | Create a bot
8+
[**delete_bot_by_id**](BotApi.md#delete_bot_by_id) | **DELETE** /v3/bots/{bot_userid} | Delete a bot
89
[**join_channels**](BotApi.md#join_channels) | **POST** /v3/bots/{bot_userid}/channels | Join channels
910
[**leave_a_group_channel**](BotApi.md#leave_a_group_channel) | **DELETE** /v3/bots/{bot_userid}/channels/{channel_url} | Leave channels - When leaving a specific channel
1011
[**leave_group_channels**](BotApi.md#leave_group_channels) | **DELETE** /v3/bots/{bot_userid}/channels | Leave channels - When leaving all channels
1112
[**list_bots**](BotApi.md#list_bots) | **GET** /v3/bots | List bots
1213
[**send_a_bot_message**](BotApi.md#send_a_bot_message) | **POST** /v3/bots/{bot_userid}/send | Send a bot's message
14+
[**update_bot_by_id**](BotApi.md#update_bot_by_id) | **PUT** /v3/bots/{bot_userid} | Update a bot
15+
[**view_bot_by_id**](BotApi.md#view_bot_by_id) | **GET** /v3/bots/{bot_userid} | View a bot
1316

1417

1518
# **create_a_bot**
@@ -85,6 +88,83 @@ No authorization required
8588
- **Accept**: application/json
8689

8790

91+
### HTTP response details
92+
93+
| Status code | Description | Response headers |
94+
|-------------|-------------|------------------|
95+
**200** | Successful response | - |
96+
97+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
98+
99+
# **delete_bot_by_id**
100+
> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_bot_by_id(bot_userid)
101+
102+
Delete a bot
103+
104+
## Delete a bot Deletes a bot from an application. https://sendbird.com/docs/chat/v3/platform-api/guides/bot-interface#2-delete-a-bot ----------------------------
105+
106+
### Example
107+
108+
109+
```python
110+
import time
111+
import sendbird_platform_sdk
112+
from sendbird_platform_sdk.api import bot_api
113+
from pprint import pprint
114+
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
115+
# See configuration.py for a list of all supported configuration parameters.
116+
configuration = sendbird_platform_sdk.Configuration(
117+
host = "https://api-APP_ID.sendbird.com"
118+
)
119+
120+
121+
# Enter a context with an instance of the API client
122+
with sendbird_platform_sdk.ApiClient() as api_client:
123+
# Create an instance of the API class
124+
api_instance = bot_api.BotApi(api_client)
125+
bot_userid = "bot_userid_example" # str |
126+
api_token = "{{API_TOKEN}}" # str | (optional)
127+
128+
# example passing only required values which don't have defaults set
129+
try:
130+
# Delete a bot
131+
api_response = api_instance.delete_bot_by_id(bot_userid)
132+
pprint(api_response)
133+
except sendbird_platform_sdk.ApiException as e:
134+
print("Exception when calling BotApi->delete_bot_by_id: %s\n" % e)
135+
136+
# example passing only required values which don't have defaults set
137+
# and optional values
138+
try:
139+
# Delete a bot
140+
api_response = api_instance.delete_bot_by_id(bot_userid, api_token=api_token)
141+
pprint(api_response)
142+
except sendbird_platform_sdk.ApiException as e:
143+
print("Exception when calling BotApi->delete_bot_by_id: %s\n" % e)
144+
```
145+
146+
147+
### Parameters
148+
149+
Name | Type | Description | Notes
150+
------------- | ------------- | ------------- | -------------
151+
**bot_userid** | **str**| |
152+
**api_token** | **str**| | [optional]
153+
154+
### Return type
155+
156+
**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**
157+
158+
### Authorization
159+
160+
No authorization required
161+
162+
### HTTP request headers
163+
164+
- **Content-Type**: Not defined
165+
- **Accept**: application/json
166+
167+
88168
### HTTP response details
89169

90170
| Status code | Description | Response headers |
@@ -544,3 +624,171 @@ No authorization required
544624

545625
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
546626

627+
# **update_bot_by_id**
628+
> UpdateBotByIdResponse update_bot_by_id(bot_userid)
629+
630+
Update a bot
631+
632+
## Update a bot Updates information on a bot. https://sendbird.com/docs/chat/v3/platform-api/guides/bot-interface#2-update-a-bot ----------------------------
633+
634+
### Example
635+
636+
637+
```python
638+
import time
639+
import sendbird_platform_sdk
640+
from sendbird_platform_sdk.api import bot_api
641+
from sendbird_platform_sdk.model.update_bot_by_id_data import UpdateBotByIdData
642+
from sendbird_platform_sdk.model.update_bot_by_id_response import UpdateBotByIdResponse
643+
from pprint import pprint
644+
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
645+
# See configuration.py for a list of all supported configuration parameters.
646+
configuration = sendbird_platform_sdk.Configuration(
647+
host = "https://api-APP_ID.sendbird.com"
648+
)
649+
650+
651+
# Enter a context with an instance of the API client
652+
with sendbird_platform_sdk.ApiClient() as api_client:
653+
# Create an instance of the API class
654+
api_instance = bot_api.BotApi(api_client)
655+
bot_userid = "bot_userid_example" # str |
656+
api_token = "{{API_TOKEN}}" # str | (optional)
657+
update_bot_by_id_data = UpdateBotByIdData(
658+
bot_userid="bot_userid_example",
659+
bot_nickname="bot_nickname_example",
660+
bot_profile_url="bot_profile_url_example",
661+
bot_callback_url="bot_callback_url_example",
662+
is_privacy_mode=True,
663+
enable_mark_as_read=True,
664+
show_member=True,
665+
channel_invitation_preference=1,
666+
) # UpdateBotByIdData | (optional)
667+
668+
# example passing only required values which don't have defaults set
669+
try:
670+
# Update a bot
671+
api_response = api_instance.update_bot_by_id(bot_userid)
672+
pprint(api_response)
673+
except sendbird_platform_sdk.ApiException as e:
674+
print("Exception when calling BotApi->update_bot_by_id: %s\n" % e)
675+
676+
# example passing only required values which don't have defaults set
677+
# and optional values
678+
try:
679+
# Update a bot
680+
api_response = api_instance.update_bot_by_id(bot_userid, api_token=api_token, update_bot_by_id_data=update_bot_by_id_data)
681+
pprint(api_response)
682+
except sendbird_platform_sdk.ApiException as e:
683+
print("Exception when calling BotApi->update_bot_by_id: %s\n" % e)
684+
```
685+
686+
687+
### Parameters
688+
689+
Name | Type | Description | Notes
690+
------------- | ------------- | ------------- | -------------
691+
**bot_userid** | **str**| |
692+
**api_token** | **str**| | [optional]
693+
**update_bot_by_id_data** | [**UpdateBotByIdData**](UpdateBotByIdData.md)| | [optional]
694+
695+
### Return type
696+
697+
[**UpdateBotByIdResponse**](UpdateBotByIdResponse.md)
698+
699+
### Authorization
700+
701+
No authorization required
702+
703+
### HTTP request headers
704+
705+
- **Content-Type**: application/json
706+
- **Accept**: application/json
707+
708+
709+
### HTTP response details
710+
711+
| Status code | Description | Response headers |
712+
|-------------|-------------|------------------|
713+
**200** | Successful response | - |
714+
715+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
716+
717+
# **view_bot_by_id**
718+
> ViewBotByIdResponse view_bot_by_id(bot_userid)
719+
720+
View a bot
721+
722+
## View a bot Retrieves information on a bot. https://sendbird.com/docs/chat/v3/platform-api/guides/bot-interface#2-view-a-bot ----------------------------
723+
724+
### Example
725+
726+
727+
```python
728+
import time
729+
import sendbird_platform_sdk
730+
from sendbird_platform_sdk.api import bot_api
731+
from sendbird_platform_sdk.model.view_bot_by_id_response import ViewBotByIdResponse
732+
from pprint import pprint
733+
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
734+
# See configuration.py for a list of all supported configuration parameters.
735+
configuration = sendbird_platform_sdk.Configuration(
736+
host = "https://api-APP_ID.sendbird.com"
737+
)
738+
739+
740+
# Enter a context with an instance of the API client
741+
with sendbird_platform_sdk.ApiClient() as api_client:
742+
# Create an instance of the API class
743+
api_instance = bot_api.BotApi(api_client)
744+
bot_userid = "bot_userid_example" # str |
745+
api_token = "{{API_TOKEN}}" # str | (optional)
746+
747+
# example passing only required values which don't have defaults set
748+
try:
749+
# View a bot
750+
api_response = api_instance.view_bot_by_id(bot_userid)
751+
pprint(api_response)
752+
except sendbird_platform_sdk.ApiException as e:
753+
print("Exception when calling BotApi->view_bot_by_id: %s\n" % e)
754+
755+
# example passing only required values which don't have defaults set
756+
# and optional values
757+
try:
758+
# View a bot
759+
api_response = api_instance.view_bot_by_id(bot_userid, api_token=api_token)
760+
pprint(api_response)
761+
except sendbird_platform_sdk.ApiException as e:
762+
print("Exception when calling BotApi->view_bot_by_id: %s\n" % e)
763+
```
764+
765+
766+
### Parameters
767+
768+
Name | Type | Description | Notes
769+
------------- | ------------- | ------------- | -------------
770+
**bot_userid** | **str**| |
771+
**api_token** | **str**| | [optional]
772+
773+
### Return type
774+
775+
[**ViewBotByIdResponse**](ViewBotByIdResponse.md)
776+
777+
### Authorization
778+
779+
No authorization required
780+
781+
### HTTP request headers
782+
783+
- **Content-Type**: Not defined
784+
- **Accept**: application/json
785+
786+
787+
### HTTP response details
788+
789+
| Status code | Description | Response headers |
790+
|-------------|-------------|------------------|
791+
**200** | Successful response | - |
792+
793+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
794+

docs/CreateABotResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**bot** | [**CreateABotResponseBot**](CreateABotResponseBot.md) | |
88
**bot_callback_url** | **str** | | [optional]
9-
**bot_style** | [**CreateABotResponseBotStyle**](CreateABotResponseBotStyle.md) | | [optional]
9+
**bot_style** | [**ListBotsResponseBotsInnerBotStyle**](ListBotsResponseBotsInnerBotStyle.md) | | [optional]
1010
**channel_invitation_preference** | **int** | | [optional]
1111
**created_at** | **int** | | [optional]
1212
**enable_mark_as_read** | **bool** | | [optional]

docs/ListBotsResponseBotsInner.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**ai** | [**ListBotsResponseBotsInnerAi**](ListBotsResponseBotsInnerAi.md) | | [optional]
87
**bot** | [**ListBotsResponseBotsInnerBot**](ListBotsResponseBotsInnerBot.md) | | [optional]
98
**bot_callback_url** | **str** | | [optional]
109
**bot_style** | [**ListBotsResponseBotsInnerBotStyle**](ListBotsResponseBotsInnerBotStyle.md) | | [optional]

docs/UpdateBotByIdResponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**bot** | [**CreateBotResponseBot**](CreateBotResponseBot.md) | | [optional]
7+
**bot** | [**ViewBotByIdResponseBot**](ViewBotByIdResponseBot.md) | | [optional]
88
**bot_callback_url** | **str** | | [optional]
99
**enable_mark_as_read** | **bool** | | [optional]
1010
**is_privacy_mode** | **bool** | | [optional]
1111
**show_member** | **bool** | | [optional]
12-
**channel_invitation_preference** | **float** | | [optional]
12+
**channel_invitation_preference** | **int** | | [optional]
1313
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/ViewBotByIdResponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**bot** | [**CreateBotResponseBot**](CreateBotResponseBot.md) | | [optional]
7+
**bot** | [**ViewBotByIdResponseBot**](ViewBotByIdResponseBot.md) | | [optional]
88
**bot_callback_url** | **str** | | [optional]
99
**enable_mark_as_read** | **bool** | | [optional]
1010
**is_privacy_mode** | **bool** | | [optional]
1111
**show_member** | **bool** | | [optional]
12-
**channel_invitation_preference** | **float** | | [optional]
12+
**channel_invitation_preference** | **int** | | [optional]
1313
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
1414

1515
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

0 commit comments

Comments
 (0)