smooch-api 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +181 -0
- data/Rakefile +8 -0
- data/docs/Action.md +16 -0
- data/docs/App.md +10 -0
- data/docs/AppApi.md +609 -0
- data/docs/AppCreate.md +8 -0
- data/docs/AppResponse.md +8 -0
- data/docs/AppUser.md +18 -0
- data/docs/AppUserApi.md +561 -0
- data/docs/AppUserLink.md +9 -0
- data/docs/AppUserPreCreate.md +14 -0
- data/docs/AppUserResponse.md +8 -0
- data/docs/AppUserUpdate.md +12 -0
- data/docs/Client.md +14 -0
- data/docs/ClientInfo.md +15 -0
- data/docs/Conversation.md +9 -0
- data/docs/ConversationApi.md +282 -0
- data/docs/Destination.md +9 -0
- data/docs/DeviceInit.md +12 -0
- data/docs/DeviceResponse.md +8 -0
- data/docs/DeviceUpdate.md +10 -0
- data/docs/DisplaySettings.md +8 -0
- data/docs/Event.md +8 -0
- data/docs/GetMessagesResponse.md +10 -0
- data/docs/Init.md +9 -0
- data/docs/InitApi.md +61 -0
- data/docs/InitResponse.md +9 -0
- data/docs/Integration.md +24 -0
- data/docs/IntegrationApi.md +121 -0
- data/docs/IntegrationCreate.md +23 -0
- data/docs/IntegrationResponse.md +8 -0
- data/docs/JwtResponse.md +8 -0
- data/docs/ListAppsResponse.md +10 -0
- data/docs/ListIntegrationsResponse.md +8 -0
- data/docs/ListSecretKeysResponse.md +8 -0
- data/docs/ListWebhooksResponse.md +8 -0
- data/docs/Menu.md +9 -0
- data/docs/MenuApi.md +155 -0
- data/docs/MenuItem.md +11 -0
- data/docs/MenuResponse.md +8 -0
- data/docs/Message.md +23 -0
- data/docs/MessageItem.md +13 -0
- data/docs/MessagePost.md +20 -0
- data/docs/MessageResponse.md +9 -0
- data/docs/PostMessagesResponse.md +9 -0
- data/docs/SecretKey.md +10 -0
- data/docs/SecretKeyCreate.md +8 -0
- data/docs/SecretKeyResponse.md +8 -0
- data/docs/TrackEventResponse.md +8 -0
- data/docs/TypingActivityTrigger.md +11 -0
- data/docs/Webhook.md +11 -0
- data/docs/WebhookApi.md +287 -0
- data/docs/WebhookCreate.md +9 -0
- data/docs/WebhookResponse.md +8 -0
- data/docs/WebhookUpdate.md +9 -0
- data/git_push.sh +55 -0
- data/lib/smooch-api.rb +91 -0
- data/lib/smooch-api/api/app_api.rb +628 -0
- data/lib/smooch-api/api/app_user_api.rb +585 -0
- data/lib/smooch-api/api/conversation_api.rb +298 -0
- data/lib/smooch-api/api/init_api.rb +75 -0
- data/lib/smooch-api/api/integration_api.rb +135 -0
- data/lib/smooch-api/api/menu_api.rb +173 -0
- data/lib/smooch-api/api/webhook_api.rb +306 -0
- data/lib/smooch-api/api_client.rb +376 -0
- data/lib/smooch-api/api_error.rb +37 -0
- data/lib/smooch-api/configuration.rb +202 -0
- data/lib/smooch-api/models/action.rb +311 -0
- data/lib/smooch-api/models/app.rb +223 -0
- data/lib/smooch-api/models/app_create.rb +193 -0
- data/lib/smooch-api/models/app_response.rb +188 -0
- data/lib/smooch-api/models/app_user.rb +307 -0
- data/lib/smooch-api/models/app_user_link.rb +236 -0
- data/lib/smooch-api/models/app_user_pre_create.rb +253 -0
- data/lib/smooch-api/models/app_user_response.rb +193 -0
- data/lib/smooch-api/models/app_user_update.rb +228 -0
- data/lib/smooch-api/models/client.rb +290 -0
- data/lib/smooch-api/models/client_info.rb +258 -0
- data/lib/smooch-api/models/conversation.rb +208 -0
- data/lib/smooch-api/models/destination.rb +208 -0
- data/lib/smooch-api/models/device_init.rb +270 -0
- data/lib/smooch-api/models/device_response.rb +188 -0
- data/lib/smooch-api/models/device_update.rb +207 -0
- data/lib/smooch-api/models/display_settings.rb +188 -0
- data/lib/smooch-api/models/event.rb +193 -0
- data/lib/smooch-api/models/get_messages_response.rb +210 -0
- data/lib/smooch-api/models/init.rb +202 -0
- data/lib/smooch-api/models/init_response.rb +208 -0
- data/lib/smooch-api/models/integration.rb +358 -0
- data/lib/smooch-api/models/integration_create.rb +343 -0
- data/lib/smooch-api/models/integration_response.rb +188 -0
- data/lib/smooch-api/models/jwt_response.rb +188 -0
- data/lib/smooch-api/models/list_apps_response.rb +210 -0
- data/lib/smooch-api/models/list_integrations_response.rb +190 -0
- data/lib/smooch-api/models/list_secret_keys_response.rb +190 -0
- data/lib/smooch-api/models/list_webhooks_response.rb +195 -0
- data/lib/smooch-api/models/menu.rb +205 -0
- data/lib/smooch-api/models/menu_item.rb +228 -0
- data/lib/smooch-api/models/menu_response.rb +193 -0
- data/lib/smooch-api/models/message.rb +415 -0
- data/lib/smooch-api/models/message_item.rb +250 -0
- data/lib/smooch-api/models/message_post.rb +355 -0
- data/lib/smooch-api/models/message_response.rb +208 -0
- data/lib/smooch-api/models/post_messages_response.rb +200 -0
- data/lib/smooch-api/models/secret_key.rb +223 -0
- data/lib/smooch-api/models/secret_key_create.rb +193 -0
- data/lib/smooch-api/models/secret_key_response.rb +188 -0
- data/lib/smooch-api/models/track_event_response.rb +188 -0
- data/lib/smooch-api/models/typing_activity_trigger.rb +228 -0
- data/lib/smooch-api/models/webhook.rb +261 -0
- data/lib/smooch-api/models/webhook_create.rb +226 -0
- data/lib/smooch-api/models/webhook_response.rb +193 -0
- data/lib/smooch-api/models/webhook_update.rb +221 -0
- data/lib/smooch-api/version.rb +14 -0
- data/smooch-api.gemspec +44 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/spec_helper.rb +110 -0
- metadata +349 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bd48511580e303108b0d1b5097264640a3e8ea20
|
4
|
+
data.tar.gz: 331201e4876844eb949bb1cc0de525367c7aaae3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0ba3c207987d2681dcde95feb0fc2bba74b6abf8ae993c77bdb75bda0ec9a5ac7778a79f66b4d73ab16ff3848b2b6ffc247c5dc1edd4347aded5c15046495318
|
7
|
+
data.tar.gz: 8a0788d056a0e9d2c9d2f1ff0552d2cb5d56b1005efba1e58b32e1a3f85121a18e609232cdfd650c3e1805621d7bb1dc9b407858250f71ed226ac613c21e96f7
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,181 @@
|
|
1
|
+
# smooch-api
|
2
|
+
|
3
|
+
SmoochApi - the Ruby gem for the Smooch API
|
4
|
+
|
5
|
+
The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- Package version: 1.0.0
|
10
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
Install the gem:
|
15
|
+
|
16
|
+
```shell
|
17
|
+
gem install smooch-api
|
18
|
+
```
|
19
|
+
|
20
|
+
Add this to the Gemfile:
|
21
|
+
|
22
|
+
gem 'smooch-api', '~> 1.0.0'
|
23
|
+
|
24
|
+
## Getting Started
|
25
|
+
|
26
|
+
### Authentication with JSON Web Tokens (JWTs)
|
27
|
+
|
28
|
+
JSON Web Tokens (JWTs) are an industry standard authentication mechanism. A great introduction to the technology is available [here](https://jwt.io/introduction/), and a broad set of supported JWT libraries for a variety of languages and platforms are available.
|
29
|
+
|
30
|
+
A JWT is composed of a header, a payload, and a signature. The payload contains information called claims which describe the subject to whom the token was issued.
|
31
|
+
|
32
|
+
Before you can make calls to the Smooch API, you'll need to create a JWT that proves you are authorized to use the API.
|
33
|
+
|
34
|
+
#### **Step 1** Generate a KEY ID and SECRET on the settings tab in the Smooch Dashboard.
|
35
|
+
|
36
|
+
![secret key and id](https://docs.smooch.io/images/secret_keys.png)
|
37
|
+
|
38
|
+
#### **Step 2** Generate the JWT
|
39
|
+
|
40
|
+
Using the [ruby-jwt](https://github.com/jwt/ruby-jwt) gem:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
require 'jwt'
|
44
|
+
|
45
|
+
payload = {:scope => 'app'}
|
46
|
+
jwtHeader = {:kid => KEY_ID}
|
47
|
+
|
48
|
+
token = JWT.encode payload, SECRET, 'HS256', jwtHeader
|
49
|
+
```
|
50
|
+
|
51
|
+
### Running the code
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'smooch-api'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
SmoochApi.configure do |config|
|
59
|
+
# Configure API key authorization: jwt
|
60
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
61
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
62
|
+
end
|
63
|
+
|
64
|
+
api_instance = SmoochApi::AppApi.new
|
65
|
+
|
66
|
+
app_create_body = SmoochApi::AppCreate.new # AppCreate | Body for a createApp request.
|
67
|
+
|
68
|
+
|
69
|
+
begin
|
70
|
+
result = api_instance.create_app(app_create_body)
|
71
|
+
p result
|
72
|
+
rescue SmoochApi::ApiError => e
|
73
|
+
puts "Exception when calling AppApi->create_app: #{e}"
|
74
|
+
end
|
75
|
+
|
76
|
+
```
|
77
|
+
|
78
|
+
## Documentation for API Endpoints
|
79
|
+
|
80
|
+
All URIs are relative to *https://api.smooch.io/v1*
|
81
|
+
|
82
|
+
Class | Method | HTTP request | Description
|
83
|
+
------------ | ------------- | ------------- | -------------
|
84
|
+
*SmoochApi::AppApi* | [**create_app**](docs/AppApi.md#create_app) | **POST** /apps |
|
85
|
+
*SmoochApi::AppApi* | [**create_secret_key**](docs/AppApi.md#create_secret_key) | **POST** /apps/{appId}/keys |
|
86
|
+
*SmoochApi::AppApi* | [**delete_app**](docs/AppApi.md#delete_app) | **DELETE** /apps/{appId} |
|
87
|
+
*SmoochApi::AppApi* | [**delete_integration**](docs/AppApi.md#delete_integration) | **DELETE** /apps/{appId}/integrations/{integrationId} |
|
88
|
+
*SmoochApi::AppApi* | [**delete_secret_key**](docs/AppApi.md#delete_secret_key) | **DELETE** /apps/{appId}/keys/{keyId} |
|
89
|
+
*SmoochApi::AppApi* | [**get_app**](docs/AppApi.md#get_app) | **GET** /apps/{appId} |
|
90
|
+
*SmoochApi::AppApi* | [**get_app_jwt**](docs/AppApi.md#get_app_jwt) | **GET** /apps/{appId}/keys/{keyId}/jwt |
|
91
|
+
*SmoochApi::AppApi* | [**get_integration**](docs/AppApi.md#get_integration) | **GET** /apps/{appId}/integrations/{integrationId} |
|
92
|
+
*SmoochApi::AppApi* | [**get_secret_key**](docs/AppApi.md#get_secret_key) | **GET** /apps/{appId}/keys/{keyId} |
|
93
|
+
*SmoochApi::AppApi* | [**list_apps**](docs/AppApi.md#list_apps) | **GET** /apps |
|
94
|
+
*SmoochApi::AppApi* | [**list_secret_keys**](docs/AppApi.md#list_secret_keys) | **GET** /apps/{appId}/keys |
|
95
|
+
*SmoochApi::AppUserApi* | [**app_user_device_update**](docs/AppUserApi.md#app_user_device_update) | **PUT** /appusers/{userId}/devices/{deviceId} |
|
96
|
+
*SmoochApi::AppUserApi* | [**delete_app_user_profile**](docs/AppUserApi.md#delete_app_user_profile) | **DELETE** /appusers/{userId}/profile |
|
97
|
+
*SmoochApi::AppUserApi* | [**get_app_user**](docs/AppUserApi.md#get_app_user) | **GET** /appusers/{userId} |
|
98
|
+
*SmoochApi::AppUserApi* | [**get_app_user_entity_ids**](docs/AppUserApi.md#get_app_user_entity_ids) | **GET** /appusers/{userId}/channels |
|
99
|
+
*SmoochApi::AppUserApi* | [**link_app_user**](docs/AppUserApi.md#link_app_user) | **POST** /appusers/{userId}/channels |
|
100
|
+
*SmoochApi::AppUserApi* | [**post_image_message**](docs/AppUserApi.md#post_image_message) | **POST** /appusers/{userId}/images |
|
101
|
+
*SmoochApi::AppUserApi* | [**pre_create_app_user**](docs/AppUserApi.md#pre_create_app_user) | **POST** /appusers |
|
102
|
+
*SmoochApi::AppUserApi* | [**track_event**](docs/AppUserApi.md#track_event) | **POST** /appusers/{userId}/events |
|
103
|
+
*SmoochApi::AppUserApi* | [**unlink_app_user**](docs/AppUserApi.md#unlink_app_user) | **DELETE** /appusers/{userId}/channels/{channel} |
|
104
|
+
*SmoochApi::AppUserApi* | [**update_app_user**](docs/AppUserApi.md#update_app_user) | **PUT** /appusers/{userId} |
|
105
|
+
*SmoochApi::ConversationApi* | [**delete_messages**](docs/ConversationApi.md#delete_messages) | **DELETE** /appusers/{userId}/messages |
|
106
|
+
*SmoochApi::ConversationApi* | [**get_messages**](docs/ConversationApi.md#get_messages) | **GET** /appusers/{userId}/messages |
|
107
|
+
*SmoochApi::ConversationApi* | [**post_message**](docs/ConversationApi.md#post_message) | **POST** /appusers/{userId}/messages |
|
108
|
+
*SmoochApi::ConversationApi* | [**reset_unread_count**](docs/ConversationApi.md#reset_unread_count) | **POST** /appusers/{userId}/conversation/read |
|
109
|
+
*SmoochApi::ConversationApi* | [**trigger_typing_activity**](docs/ConversationApi.md#trigger_typing_activity) | **POST** /appusers/{userId}/conversation/activity |
|
110
|
+
*SmoochApi::InitApi* | [**init**](docs/InitApi.md#init) | **POST** /init |
|
111
|
+
*SmoochApi::IntegrationApi* | [**create_integration**](docs/IntegrationApi.md#create_integration) | **POST** /apps/{appId}/integrations |
|
112
|
+
*SmoochApi::IntegrationApi* | [**list_integrations**](docs/IntegrationApi.md#list_integrations) | **GET** /apps/{appId}/integrations |
|
113
|
+
*SmoochApi::MenuApi* | [**delete_menu**](docs/MenuApi.md#delete_menu) | **DELETE** /menu |
|
114
|
+
*SmoochApi::MenuApi* | [**get_menu**](docs/MenuApi.md#get_menu) | **GET** /menu |
|
115
|
+
*SmoochApi::MenuApi* | [**update_menu**](docs/MenuApi.md#update_menu) | **PUT** /menu |
|
116
|
+
*SmoochApi::WebhookApi* | [**create_webhook**](docs/WebhookApi.md#create_webhook) | **POST** /apps/{appId}/webhooks |
|
117
|
+
*SmoochApi::WebhookApi* | [**delete_webhook**](docs/WebhookApi.md#delete_webhook) | **DELETE** /apps/{appId}/webhooks/{webhookId} |
|
118
|
+
*SmoochApi::WebhookApi* | [**get_webhook**](docs/WebhookApi.md#get_webhook) | **GET** /apps/{appId}/webhooks/{webhookId} |
|
119
|
+
*SmoochApi::WebhookApi* | [**list_webhooks**](docs/WebhookApi.md#list_webhooks) | **GET** /apps/{appId}/webhooks |
|
120
|
+
*SmoochApi::WebhookApi* | [**update_webhook**](docs/WebhookApi.md#update_webhook) | **PUT** /apps/{appId}/webhooks/{webhookId} |
|
121
|
+
|
122
|
+
|
123
|
+
## Documentation for Models
|
124
|
+
|
125
|
+
- [SmoochApi::Action](docs/Action.md)
|
126
|
+
- [SmoochApi::App](docs/App.md)
|
127
|
+
- [SmoochApi::AppCreate](docs/AppCreate.md)
|
128
|
+
- [SmoochApi::AppResponse](docs/AppResponse.md)
|
129
|
+
- [SmoochApi::AppUser](docs/AppUser.md)
|
130
|
+
- [SmoochApi::AppUserLink](docs/AppUserLink.md)
|
131
|
+
- [SmoochApi::AppUserPreCreate](docs/AppUserPreCreate.md)
|
132
|
+
- [SmoochApi::AppUserResponse](docs/AppUserResponse.md)
|
133
|
+
- [SmoochApi::AppUserUpdate](docs/AppUserUpdate.md)
|
134
|
+
- [SmoochApi::Client](docs/Client.md)
|
135
|
+
- [SmoochApi::ClientInfo](docs/ClientInfo.md)
|
136
|
+
- [SmoochApi::Conversation](docs/Conversation.md)
|
137
|
+
- [SmoochApi::Destination](docs/Destination.md)
|
138
|
+
- [SmoochApi::DeviceInit](docs/DeviceInit.md)
|
139
|
+
- [SmoochApi::DeviceResponse](docs/DeviceResponse.md)
|
140
|
+
- [SmoochApi::DeviceUpdate](docs/DeviceUpdate.md)
|
141
|
+
- [SmoochApi::DisplaySettings](docs/DisplaySettings.md)
|
142
|
+
- [SmoochApi::Event](docs/Event.md)
|
143
|
+
- [SmoochApi::GetMessagesResponse](docs/GetMessagesResponse.md)
|
144
|
+
- [SmoochApi::Init](docs/Init.md)
|
145
|
+
- [SmoochApi::InitResponse](docs/InitResponse.md)
|
146
|
+
- [SmoochApi::Integration](docs/Integration.md)
|
147
|
+
- [SmoochApi::IntegrationCreate](docs/IntegrationCreate.md)
|
148
|
+
- [SmoochApi::IntegrationResponse](docs/IntegrationResponse.md)
|
149
|
+
- [SmoochApi::JwtResponse](docs/JwtResponse.md)
|
150
|
+
- [SmoochApi::ListAppsResponse](docs/ListAppsResponse.md)
|
151
|
+
- [SmoochApi::ListIntegrationsResponse](docs/ListIntegrationsResponse.md)
|
152
|
+
- [SmoochApi::ListSecretKeysResponse](docs/ListSecretKeysResponse.md)
|
153
|
+
- [SmoochApi::ListWebhooksResponse](docs/ListWebhooksResponse.md)
|
154
|
+
- [SmoochApi::Menu](docs/Menu.md)
|
155
|
+
- [SmoochApi::MenuItem](docs/MenuItem.md)
|
156
|
+
- [SmoochApi::MenuResponse](docs/MenuResponse.md)
|
157
|
+
- [SmoochApi::Message](docs/Message.md)
|
158
|
+
- [SmoochApi::MessageItem](docs/MessageItem.md)
|
159
|
+
- [SmoochApi::MessagePost](docs/MessagePost.md)
|
160
|
+
- [SmoochApi::MessageResponse](docs/MessageResponse.md)
|
161
|
+
- [SmoochApi::PostMessagesResponse](docs/PostMessagesResponse.md)
|
162
|
+
- [SmoochApi::SecretKey](docs/SecretKey.md)
|
163
|
+
- [SmoochApi::SecretKeyCreate](docs/SecretKeyCreate.md)
|
164
|
+
- [SmoochApi::SecretKeyResponse](docs/SecretKeyResponse.md)
|
165
|
+
- [SmoochApi::TrackEventResponse](docs/TrackEventResponse.md)
|
166
|
+
- [SmoochApi::TypingActivityTrigger](docs/TypingActivityTrigger.md)
|
167
|
+
- [SmoochApi::Webhook](docs/Webhook.md)
|
168
|
+
- [SmoochApi::WebhookCreate](docs/WebhookCreate.md)
|
169
|
+
- [SmoochApi::WebhookResponse](docs/WebhookResponse.md)
|
170
|
+
- [SmoochApi::WebhookUpdate](docs/WebhookUpdate.md)
|
171
|
+
|
172
|
+
|
173
|
+
## Documentation for Authorization
|
174
|
+
|
175
|
+
|
176
|
+
### jwt
|
177
|
+
|
178
|
+
- **Type**: API key
|
179
|
+
- **API key parameter name**: Authorization
|
180
|
+
- **Location**: HTTP header
|
181
|
+
|
data/Rakefile
ADDED
data/docs/Action.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# SmoochApi::Action
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**type** | **String** | The action type. |
|
7
|
+
**text** | **String** | The button text. |
|
8
|
+
**payload** | **String** | The payload to be sent with the resulting webhook. Required for *postback* and *reply* actions. | [optional]
|
9
|
+
**metadata** | **Object** | Flat JSON object containing any custom properties associated with the action. | [optional]
|
10
|
+
**amount** | **Integer** | The amount being charged. It needs to be specified in cents and is an integer. Required for *buy* actions. | [optional]
|
11
|
+
**currency** | **String** | The currency of the amount being charged (USD, CAD, etc.). | [optional]
|
12
|
+
**default** | **BOOLEAN** | Flag indicating if the message action is the default for a message item in Facebook Messenger. | [optional]
|
13
|
+
**icon_url** | **String** | An icon to render next to the reply option (Facebook Messenger and Web Messenger only). | [optional]
|
14
|
+
**uri** | **String** | The action URI. This is the link that will be used in the clients when clicking the button. Required for *link* actions. | [optional]
|
15
|
+
|
16
|
+
|
data/docs/App.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# SmoochApi::App
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**_id** | **String** | The app's ID. |
|
7
|
+
**app_token** | **String** | The appToken, used to initialize the Web, iOS and Android clients and to make calls to the app user facing API. |
|
8
|
+
**name** | **String** | The app's name. |
|
9
|
+
|
10
|
+
|
data/docs/AppApi.md
ADDED
@@ -0,0 +1,609 @@
|
|
1
|
+
# SmoochApi::AppApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.smooch.io/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_app**](AppApi.md#create_app) | **POST** /apps |
|
8
|
+
[**create_secret_key**](AppApi.md#create_secret_key) | **POST** /apps/{appId}/keys |
|
9
|
+
[**delete_app**](AppApi.md#delete_app) | **DELETE** /apps/{appId} |
|
10
|
+
[**delete_integration**](AppApi.md#delete_integration) | **DELETE** /apps/{appId}/integrations/{integrationId} |
|
11
|
+
[**delete_secret_key**](AppApi.md#delete_secret_key) | **DELETE** /apps/{appId}/keys/{keyId} |
|
12
|
+
[**get_app**](AppApi.md#get_app) | **GET** /apps/{appId} |
|
13
|
+
[**get_app_jwt**](AppApi.md#get_app_jwt) | **GET** /apps/{appId}/keys/{keyId}/jwt |
|
14
|
+
[**get_integration**](AppApi.md#get_integration) | **GET** /apps/{appId}/integrations/{integrationId} |
|
15
|
+
[**get_secret_key**](AppApi.md#get_secret_key) | **GET** /apps/{appId}/keys/{keyId} |
|
16
|
+
[**list_apps**](AppApi.md#list_apps) | **GET** /apps |
|
17
|
+
[**list_secret_keys**](AppApi.md#list_secret_keys) | **GET** /apps/{appId}/keys |
|
18
|
+
|
19
|
+
|
20
|
+
# **create_app**
|
21
|
+
> AppResponse create_app(app_create_body)
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Create a new app.
|
26
|
+
|
27
|
+
### Example
|
28
|
+
```ruby
|
29
|
+
# load the gem
|
30
|
+
require 'smooch-api'
|
31
|
+
# setup authorization
|
32
|
+
SmoochApi.configure do |config|
|
33
|
+
# Configure API key authorization: jwt
|
34
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
35
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
36
|
+
end
|
37
|
+
|
38
|
+
api_instance = SmoochApi::AppApi.new
|
39
|
+
|
40
|
+
app_create_body = SmoochApi::AppCreate.new # AppCreate | Body for a createApp request.
|
41
|
+
|
42
|
+
|
43
|
+
begin
|
44
|
+
result = api_instance.create_app(app_create_body)
|
45
|
+
p result
|
46
|
+
rescue SmoochApi::ApiError => e
|
47
|
+
puts "Exception when calling AppApi->create_app: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
### Parameters
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**app_create_body** | [**AppCreate**](AppCreate.md)| Body for a createApp request. |
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
[**AppResponse**](AppResponse.md)
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
[jwt](../README.md#jwt)
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: application/json
|
68
|
+
- **Accept**: application/json
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
# **create_secret_key**
|
73
|
+
> SecretKeyResponse create_secret_key(app_id, secret_key_create_body)
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
Create a secret key for the specified app.
|
78
|
+
|
79
|
+
### Example
|
80
|
+
```ruby
|
81
|
+
# load the gem
|
82
|
+
require 'smooch-api'
|
83
|
+
# setup authorization
|
84
|
+
SmoochApi.configure do |config|
|
85
|
+
# Configure API key authorization: jwt
|
86
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
87
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
88
|
+
end
|
89
|
+
|
90
|
+
api_instance = SmoochApi::AppApi.new
|
91
|
+
|
92
|
+
app_id = "app_id_example" # String | Identifies the app.
|
93
|
+
|
94
|
+
secret_key_create_body = SmoochApi::SecretKeyCreate.new # SecretKeyCreate | Body for a createSecretKey request.
|
95
|
+
|
96
|
+
|
97
|
+
begin
|
98
|
+
result = api_instance.create_secret_key(app_id, secret_key_create_body)
|
99
|
+
p result
|
100
|
+
rescue SmoochApi::ApiError => e
|
101
|
+
puts "Exception when calling AppApi->create_secret_key: #{e}"
|
102
|
+
end
|
103
|
+
```
|
104
|
+
|
105
|
+
### Parameters
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**app_id** | **String**| Identifies the app. |
|
110
|
+
**secret_key_create_body** | [**SecretKeyCreate**](SecretKeyCreate.md)| Body for a createSecretKey request. |
|
111
|
+
|
112
|
+
### Return type
|
113
|
+
|
114
|
+
[**SecretKeyResponse**](SecretKeyResponse.md)
|
115
|
+
|
116
|
+
### Authorization
|
117
|
+
|
118
|
+
[jwt](../README.md#jwt)
|
119
|
+
|
120
|
+
### HTTP request headers
|
121
|
+
|
122
|
+
- **Content-Type**: application/json
|
123
|
+
- **Accept**: application/json
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
# **delete_app**
|
128
|
+
> delete_app(app_id, )
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
Delete the specified app.
|
133
|
+
|
134
|
+
### Example
|
135
|
+
```ruby
|
136
|
+
# load the gem
|
137
|
+
require 'smooch-api'
|
138
|
+
# setup authorization
|
139
|
+
SmoochApi.configure do |config|
|
140
|
+
# Configure API key authorization: jwt
|
141
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
142
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
143
|
+
end
|
144
|
+
|
145
|
+
api_instance = SmoochApi::AppApi.new
|
146
|
+
|
147
|
+
app_id = "app_id_example" # String | Identifies the app.
|
148
|
+
|
149
|
+
|
150
|
+
begin
|
151
|
+
api_instance.delete_app(app_id, )
|
152
|
+
rescue SmoochApi::ApiError => e
|
153
|
+
puts "Exception when calling AppApi->delete_app: #{e}"
|
154
|
+
end
|
155
|
+
```
|
156
|
+
|
157
|
+
### Parameters
|
158
|
+
|
159
|
+
Name | Type | Description | Notes
|
160
|
+
------------- | ------------- | ------------- | -------------
|
161
|
+
**app_id** | **String**| Identifies the app. |
|
162
|
+
|
163
|
+
### Return type
|
164
|
+
|
165
|
+
nil (empty response body)
|
166
|
+
|
167
|
+
### Authorization
|
168
|
+
|
169
|
+
[jwt](../README.md#jwt)
|
170
|
+
|
171
|
+
### HTTP request headers
|
172
|
+
|
173
|
+
- **Content-Type**: application/json
|
174
|
+
- **Accept**: application/json
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
# **delete_integration**
|
179
|
+
> delete_integration(app_id, integration_id)
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
Delete the specified integration.
|
184
|
+
|
185
|
+
### Example
|
186
|
+
```ruby
|
187
|
+
# load the gem
|
188
|
+
require 'smooch-api'
|
189
|
+
# setup authorization
|
190
|
+
SmoochApi.configure do |config|
|
191
|
+
# Configure API key authorization: jwt
|
192
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
193
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
194
|
+
end
|
195
|
+
|
196
|
+
api_instance = SmoochApi::AppApi.new
|
197
|
+
|
198
|
+
app_id = "app_id_example" # String | Identifies the app.
|
199
|
+
|
200
|
+
integration_id = "integration_id_example" # String | Identifies the integration.
|
201
|
+
|
202
|
+
|
203
|
+
begin
|
204
|
+
api_instance.delete_integration(app_id, integration_id)
|
205
|
+
rescue SmoochApi::ApiError => e
|
206
|
+
puts "Exception when calling AppApi->delete_integration: #{e}"
|
207
|
+
end
|
208
|
+
```
|
209
|
+
|
210
|
+
### Parameters
|
211
|
+
|
212
|
+
Name | Type | Description | Notes
|
213
|
+
------------- | ------------- | ------------- | -------------
|
214
|
+
**app_id** | **String**| Identifies the app. |
|
215
|
+
**integration_id** | **String**| Identifies the integration. |
|
216
|
+
|
217
|
+
### Return type
|
218
|
+
|
219
|
+
nil (empty response body)
|
220
|
+
|
221
|
+
### Authorization
|
222
|
+
|
223
|
+
[jwt](../README.md#jwt)
|
224
|
+
|
225
|
+
### HTTP request headers
|
226
|
+
|
227
|
+
- **Content-Type**: application/json
|
228
|
+
- **Accept**: application/json
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
# **delete_secret_key**
|
233
|
+
> delete_secret_key(app_id, key_id)
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
Delete the specified secret key.
|
238
|
+
|
239
|
+
### Example
|
240
|
+
```ruby
|
241
|
+
# load the gem
|
242
|
+
require 'smooch-api'
|
243
|
+
# setup authorization
|
244
|
+
SmoochApi.configure do |config|
|
245
|
+
# Configure API key authorization: jwt
|
246
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
247
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
248
|
+
end
|
249
|
+
|
250
|
+
api_instance = SmoochApi::AppApi.new
|
251
|
+
|
252
|
+
app_id = "app_id_example" # String | Identifies the app.
|
253
|
+
|
254
|
+
key_id = "key_id_example" # String | Identifies the secret key.
|
255
|
+
|
256
|
+
|
257
|
+
begin
|
258
|
+
api_instance.delete_secret_key(app_id, key_id)
|
259
|
+
rescue SmoochApi::ApiError => e
|
260
|
+
puts "Exception when calling AppApi->delete_secret_key: #{e}"
|
261
|
+
end
|
262
|
+
```
|
263
|
+
|
264
|
+
### Parameters
|
265
|
+
|
266
|
+
Name | Type | Description | Notes
|
267
|
+
------------- | ------------- | ------------- | -------------
|
268
|
+
**app_id** | **String**| Identifies the app. |
|
269
|
+
**key_id** | **String**| Identifies the secret key. |
|
270
|
+
|
271
|
+
### Return type
|
272
|
+
|
273
|
+
nil (empty response body)
|
274
|
+
|
275
|
+
### Authorization
|
276
|
+
|
277
|
+
[jwt](../README.md#jwt)
|
278
|
+
|
279
|
+
### HTTP request headers
|
280
|
+
|
281
|
+
- **Content-Type**: application/json
|
282
|
+
- **Accept**: application/json
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
# **get_app**
|
287
|
+
> AppResponse get_app(app_id, )
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
Get the specified app.
|
292
|
+
|
293
|
+
### Example
|
294
|
+
```ruby
|
295
|
+
# load the gem
|
296
|
+
require 'smooch-api'
|
297
|
+
# setup authorization
|
298
|
+
SmoochApi.configure do |config|
|
299
|
+
# Configure API key authorization: jwt
|
300
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
301
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
302
|
+
end
|
303
|
+
|
304
|
+
api_instance = SmoochApi::AppApi.new
|
305
|
+
|
306
|
+
app_id = "app_id_example" # String | Identifies the app.
|
307
|
+
|
308
|
+
|
309
|
+
begin
|
310
|
+
result = api_instance.get_app(app_id, )
|
311
|
+
p result
|
312
|
+
rescue SmoochApi::ApiError => e
|
313
|
+
puts "Exception when calling AppApi->get_app: #{e}"
|
314
|
+
end
|
315
|
+
```
|
316
|
+
|
317
|
+
### Parameters
|
318
|
+
|
319
|
+
Name | Type | Description | Notes
|
320
|
+
------------- | ------------- | ------------- | -------------
|
321
|
+
**app_id** | **String**| Identifies the app. |
|
322
|
+
|
323
|
+
### Return type
|
324
|
+
|
325
|
+
[**AppResponse**](AppResponse.md)
|
326
|
+
|
327
|
+
### Authorization
|
328
|
+
|
329
|
+
[jwt](../README.md#jwt)
|
330
|
+
|
331
|
+
### HTTP request headers
|
332
|
+
|
333
|
+
- **Content-Type**: application/json
|
334
|
+
- **Accept**: application/json
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
# **get_app_jwt**
|
339
|
+
> JwtResponse get_app_jwt(app_id, key_id)
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
Get an app-scoped JWT for the specified secret key.
|
344
|
+
|
345
|
+
### Example
|
346
|
+
```ruby
|
347
|
+
# load the gem
|
348
|
+
require 'smooch-api'
|
349
|
+
# setup authorization
|
350
|
+
SmoochApi.configure do |config|
|
351
|
+
# Configure API key authorization: jwt
|
352
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
353
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
354
|
+
end
|
355
|
+
|
356
|
+
api_instance = SmoochApi::AppApi.new
|
357
|
+
|
358
|
+
app_id = "app_id_example" # String | Identifies the app.
|
359
|
+
|
360
|
+
key_id = "key_id_example" # String | Identifies the secret key.
|
361
|
+
|
362
|
+
|
363
|
+
begin
|
364
|
+
result = api_instance.get_app_jwt(app_id, key_id)
|
365
|
+
p result
|
366
|
+
rescue SmoochApi::ApiError => e
|
367
|
+
puts "Exception when calling AppApi->get_app_jwt: #{e}"
|
368
|
+
end
|
369
|
+
```
|
370
|
+
|
371
|
+
### Parameters
|
372
|
+
|
373
|
+
Name | Type | Description | Notes
|
374
|
+
------------- | ------------- | ------------- | -------------
|
375
|
+
**app_id** | **String**| Identifies the app. |
|
376
|
+
**key_id** | **String**| Identifies the secret key. |
|
377
|
+
|
378
|
+
### Return type
|
379
|
+
|
380
|
+
[**JwtResponse**](JwtResponse.md)
|
381
|
+
|
382
|
+
### Authorization
|
383
|
+
|
384
|
+
[jwt](../README.md#jwt)
|
385
|
+
|
386
|
+
### HTTP request headers
|
387
|
+
|
388
|
+
- **Content-Type**: application/json
|
389
|
+
- **Accept**: application/json
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
# **get_integration**
|
394
|
+
> IntegrationResponse get_integration(app_id, integration_id)
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
Get the specified integration.
|
399
|
+
|
400
|
+
### Example
|
401
|
+
```ruby
|
402
|
+
# load the gem
|
403
|
+
require 'smooch-api'
|
404
|
+
# setup authorization
|
405
|
+
SmoochApi.configure do |config|
|
406
|
+
# Configure API key authorization: jwt
|
407
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
408
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
409
|
+
end
|
410
|
+
|
411
|
+
api_instance = SmoochApi::AppApi.new
|
412
|
+
|
413
|
+
app_id = "app_id_example" # String | Identifies the app.
|
414
|
+
|
415
|
+
integration_id = "integration_id_example" # String | Identifies the integration.
|
416
|
+
|
417
|
+
|
418
|
+
begin
|
419
|
+
result = api_instance.get_integration(app_id, integration_id)
|
420
|
+
p result
|
421
|
+
rescue SmoochApi::ApiError => e
|
422
|
+
puts "Exception when calling AppApi->get_integration: #{e}"
|
423
|
+
end
|
424
|
+
```
|
425
|
+
|
426
|
+
### Parameters
|
427
|
+
|
428
|
+
Name | Type | Description | Notes
|
429
|
+
------------- | ------------- | ------------- | -------------
|
430
|
+
**app_id** | **String**| Identifies the app. |
|
431
|
+
**integration_id** | **String**| Identifies the integration. |
|
432
|
+
|
433
|
+
### Return type
|
434
|
+
|
435
|
+
[**IntegrationResponse**](IntegrationResponse.md)
|
436
|
+
|
437
|
+
### Authorization
|
438
|
+
|
439
|
+
[jwt](../README.md#jwt)
|
440
|
+
|
441
|
+
### HTTP request headers
|
442
|
+
|
443
|
+
- **Content-Type**: application/json
|
444
|
+
- **Accept**: application/json
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
# **get_secret_key**
|
449
|
+
> SecretKeyResponse get_secret_key(app_id, key_id)
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
Get the specified secret key.
|
454
|
+
|
455
|
+
### Example
|
456
|
+
```ruby
|
457
|
+
# load the gem
|
458
|
+
require 'smooch-api'
|
459
|
+
# setup authorization
|
460
|
+
SmoochApi.configure do |config|
|
461
|
+
# Configure API key authorization: jwt
|
462
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
463
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
464
|
+
end
|
465
|
+
|
466
|
+
api_instance = SmoochApi::AppApi.new
|
467
|
+
|
468
|
+
app_id = "app_id_example" # String | Identifies the app.
|
469
|
+
|
470
|
+
key_id = "key_id_example" # String | Identifies the secret key.
|
471
|
+
|
472
|
+
|
473
|
+
begin
|
474
|
+
result = api_instance.get_secret_key(app_id, key_id)
|
475
|
+
p result
|
476
|
+
rescue SmoochApi::ApiError => e
|
477
|
+
puts "Exception when calling AppApi->get_secret_key: #{e}"
|
478
|
+
end
|
479
|
+
```
|
480
|
+
|
481
|
+
### Parameters
|
482
|
+
|
483
|
+
Name | Type | Description | Notes
|
484
|
+
------------- | ------------- | ------------- | -------------
|
485
|
+
**app_id** | **String**| Identifies the app. |
|
486
|
+
**key_id** | **String**| Identifies the secret key. |
|
487
|
+
|
488
|
+
### Return type
|
489
|
+
|
490
|
+
[**SecretKeyResponse**](SecretKeyResponse.md)
|
491
|
+
|
492
|
+
### Authorization
|
493
|
+
|
494
|
+
[jwt](../README.md#jwt)
|
495
|
+
|
496
|
+
### HTTP request headers
|
497
|
+
|
498
|
+
- **Content-Type**: application/json
|
499
|
+
- **Accept**: application/json
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
# **list_apps**
|
504
|
+
> ListAppsResponse list_apps(opts)
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
List all apps configured.
|
509
|
+
|
510
|
+
### Example
|
511
|
+
```ruby
|
512
|
+
# load the gem
|
513
|
+
require 'smooch-api'
|
514
|
+
# setup authorization
|
515
|
+
SmoochApi.configure do |config|
|
516
|
+
# Configure API key authorization: jwt
|
517
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
518
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
519
|
+
end
|
520
|
+
|
521
|
+
api_instance = SmoochApi::AppApi.new
|
522
|
+
|
523
|
+
opts = {
|
524
|
+
limit: 56, # Integer | The number of records to return.
|
525
|
+
offset: 56 # Integer | The number of initial records to skip before picking records to return.
|
526
|
+
}
|
527
|
+
|
528
|
+
begin
|
529
|
+
result = api_instance.list_apps(opts)
|
530
|
+
p result
|
531
|
+
rescue SmoochApi::ApiError => e
|
532
|
+
puts "Exception when calling AppApi->list_apps: #{e}"
|
533
|
+
end
|
534
|
+
```
|
535
|
+
|
536
|
+
### Parameters
|
537
|
+
|
538
|
+
Name | Type | Description | Notes
|
539
|
+
------------- | ------------- | ------------- | -------------
|
540
|
+
**limit** | **Integer**| The number of records to return. | [optional]
|
541
|
+
**offset** | **Integer**| The number of initial records to skip before picking records to return. | [optional]
|
542
|
+
|
543
|
+
### Return type
|
544
|
+
|
545
|
+
[**ListAppsResponse**](ListAppsResponse.md)
|
546
|
+
|
547
|
+
### Authorization
|
548
|
+
|
549
|
+
[jwt](../README.md#jwt)
|
550
|
+
|
551
|
+
### HTTP request headers
|
552
|
+
|
553
|
+
- **Content-Type**: application/json
|
554
|
+
- **Accept**: application/json
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
# **list_secret_keys**
|
559
|
+
> ListSecretKeysResponse list_secret_keys(app_id, )
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
List the secret keys for the specified app.
|
564
|
+
|
565
|
+
### Example
|
566
|
+
```ruby
|
567
|
+
# load the gem
|
568
|
+
require 'smooch-api'
|
569
|
+
# setup authorization
|
570
|
+
SmoochApi.configure do |config|
|
571
|
+
# Configure API key authorization: jwt
|
572
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
573
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
574
|
+
end
|
575
|
+
|
576
|
+
api_instance = SmoochApi::AppApi.new
|
577
|
+
|
578
|
+
app_id = "app_id_example" # String | Identifies the app.
|
579
|
+
|
580
|
+
|
581
|
+
begin
|
582
|
+
result = api_instance.list_secret_keys(app_id, )
|
583
|
+
p result
|
584
|
+
rescue SmoochApi::ApiError => e
|
585
|
+
puts "Exception when calling AppApi->list_secret_keys: #{e}"
|
586
|
+
end
|
587
|
+
```
|
588
|
+
|
589
|
+
### Parameters
|
590
|
+
|
591
|
+
Name | Type | Description | Notes
|
592
|
+
------------- | ------------- | ------------- | -------------
|
593
|
+
**app_id** | **String**| Identifies the app. |
|
594
|
+
|
595
|
+
### Return type
|
596
|
+
|
597
|
+
[**ListSecretKeysResponse**](ListSecretKeysResponse.md)
|
598
|
+
|
599
|
+
### Authorization
|
600
|
+
|
601
|
+
[jwt](../README.md#jwt)
|
602
|
+
|
603
|
+
### HTTP request headers
|
604
|
+
|
605
|
+
- **Content-Type**: application/json
|
606
|
+
- **Accept**: application/json
|
607
|
+
|
608
|
+
|
609
|
+
|