All URIs are relative to https://api.smooch.io
Method | HTTP request | Description |
---|---|---|
create_app | POST /v2/apps | Create App |
delete_app | DELETE /v2/apps/{appId} | Delete App |
get_app | GET /v2/apps/{appId} | Get App |
list_apps | GET /v2/apps | List Apps |
update_app | PATCH /v2/apps/{appId} | Update App |
AppResponse create_app(app_create_body)
Create App
Creates a new app. When using service account credentials, the service account is automatically granted access to the app.
# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this line to use JWTs
# config.access_token = 'YOUR_JWT'
end
api_instance = SunshineConversationsClient::AppsApi.new
app_create_body = SunshineConversationsClient::AppCreateBody.new # AppCreateBody |
# Be sure to add the required body parameters
begin
#Create App
result = api_instance.create_app(app_create_body)
p result
rescue SunshineConversationsClient::ApiError => e
puts "Exception when calling AppsApi->create_app: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_create_body | AppCreateBody |
- Content-Type: application/json
- Accept: application/json
Object delete_app(app_id)
Delete App
Removes the specified app, including all its enabled integrations.
# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this line to use JWTs
# config.access_token = 'YOUR_JWT'
end
api_instance = SunshineConversationsClient::AppsApi.new
app_id = '5d8cff3cd55b040010928b5b' # String | Identifies the app.
# Be sure to add the required body parameters
begin
#Delete App
result = api_instance.delete_app(app_id)
p result
rescue SunshineConversationsClient::ApiError => e
puts "Exception when calling AppsApi->delete_app: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | String | Identifies the app. |
Object
- Content-Type: Not defined
- Accept: application/json
AppResponse get_app(app_id)
Get App
Fetches an individual app.
# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this line to use JWTs
# config.access_token = 'YOUR_JWT'
end
api_instance = SunshineConversationsClient::AppsApi.new
app_id = '5d8cff3cd55b040010928b5b' # String | Identifies the app.
# Be sure to add the required body parameters
begin
#Get App
result = api_instance.get_app(app_id)
p result
rescue SunshineConversationsClient::ApiError => e
puts "Exception when calling AppsApi->get_app: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | String | Identifies the app. |
- Content-Type: Not defined
- Accept: application/json
AppListResponse list_apps(opts)
List Apps
Lists all apps that a user is part of. This API is paginated through cursor pagination. shell /v2/apps?page[after]=5e1606762556d93e9c176f69&page[size]=10
# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this line to use JWTs
# config.access_token = 'YOUR_JWT'
end
api_instance = SunshineConversationsClient::AppsApi.new
# Be sure to add the required body parameters
opts = {
page: SunshineConversationsClient::Page.new, # Page | Contains parameters for applying cursor pagination.
filter: SunshineConversationsClient::AppListFilter.new # AppListFilter | Contains parameters for filtering the results.
}
begin
#List Apps
result = api_instance.list_apps(opts)
p result
rescue SunshineConversationsClient::ApiError => e
puts "Exception when calling AppsApi->list_apps: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
page | Page | Contains parameters for applying cursor pagination. | [optional] |
filter | AppListFilter | Contains parameters for filtering the results. | [optional] |
- Content-Type: Not defined
- Accept: application/json
AppResponse update_app(app_id, app_update_body)
Update App
Updates an app.
# load the gem
require 'sunshine-conversations-client'
# setup authorization
SunshineConversationsClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
# Configure Bearer authorization (JWT): bearerAuth
# Uncomment this line to use JWTs
# config.access_token = 'YOUR_JWT'
end
api_instance = SunshineConversationsClient::AppsApi.new
app_id = '5d8cff3cd55b040010928b5b' # String | Identifies the app.
app_update_body = SunshineConversationsClient::AppUpdateBody.new # AppUpdateBody |
# Be sure to add the required body parameters
begin
#Update App
result = api_instance.update_app(app_id, app_update_body)
p result
rescue SunshineConversationsClient::ApiError => e
puts "Exception when calling AppsApi->update_app: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | String | Identifies the app. | |
app_update_body | AppUpdateBody |
- Content-Type: application/json
- Accept: application/json