RainbowSubmarineTest3356::AppUserApi

All URIs are relative to https://api.smooch.io/v1

Method HTTP request Description
app_user_device_update PUT /appusers/userId/devices/deviceId
delete_app_user_profile DELETE /appusers/userId/profile
get_app_user GET /appusers/userId
get_app_user_entity_ids GET /appusers/userId/channels
link_app_user POST /appusers/userId/channels
post_image_message POST /appusers/userId/images
pre_create_app_user POST /appusers
track_event POST /appusers/userId/events
unlink_app_user DELETE /appusers/userId/channels/channel
update_app_user PUT /appusers/userId

app_user_device_update

ClientResponse app_user_device_update(user_id, device_id, app_user_device_update)

Update specified device information.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

device_id = "device_id_example" # String | Id of the device.

app_user_device_update = RainbowSubmarineTest3356::DeviceUpdate.new # DeviceUpdate | Supported properties for an updateAppUserDevice request.


begin
  result = api_instance.app_user_device_update(user_id, device_id, app_user_device_update)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->app_user_device_update: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
device_id String Id of the device.
app_user_device_update DeviceUpdate Supported properties for an updateAppUserDevice request.

Return type

ClientResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

delete_app_user_profile

AppUserResponse delete_app_user_profile(user_id, )

Delete specified app users profile.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.


begin
  result = api_instance.(user_id, )
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->delete_app_user_profile: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.

Return type

AppUserResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_app_user

AppUserResponse get_app_user(user_id, )

Get the specified app user.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.


begin
  result = api_instance.get_app_user(user_id, )
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->get_app_user: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.

Return type

AppUserResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

get_app_user_entity_ids

AppUserResponse get_app_user_entity_ids(user_id, )

Get specified app users channel entity IDs.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.


begin
  result = api_instance.get_app_user_entity_ids(user_id, )
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->get_app_user_entity_ids: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.

Return type

AppUserResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

link_app_user

AppUserResponse link_app_user(user_id, app_user_link)

Link specified app user to given channel.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

app_user_link = RainbowSubmarineTest3356::AppUserLink.new # AppUserLink | Supported properties for a linkAppUser request.


begin
  result = api_instance.link_app_user(user_id, app_user_link)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->link_app_user: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
app_user_link AppUserLink Supported properties for a linkAppUser request.

Return type

AppUserResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

post_image_message

MessageResponse post_image_message(user_id, source, role)

Send an image message to the conversation

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

source = File.new("/path/to/file.txt") # File | Image to be uploaded

role = "role_example" # String | Role of the sender


begin
  result = api_instance.post_image_message(user_id, source, role)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->post_image_message: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
source File Image to be uploaded
role String Role of the sender

Return type

MessageResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

pre_create_app_user

AppUserResponse pre_create_app_user(app_user_pre_create)

Pre-create an app user.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

app_user_pre_create = RainbowSubmarineTest3356::AppUserPreCreate.new # AppUserPreCreate | Supported properties for a preCreateAppUser request.


begin
  result = api_instance.pre_create_app_user(app_user_pre_create)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->pre_create_app_user: #{e}"
end

Parameters

Name Type Description Notes
app_user_pre_create AppUserPreCreate Supported properties for a preCreateAppUser request.

Return type

AppUserResponse

Authorization

jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

track_event

TrackEventResponse track_event(user_id, event)

Track an event for the given app user.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

event = RainbowSubmarineTest3356::Event.new # Event | Supported properties for a trackEvent request.


begin
  result = api_instance.track_event(user_id, event)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->track_event: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
event Event Supported properties for a trackEvent request.

Return type

TrackEventResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

unlink_app_user

unlink_app_user(user_id, channel)

Unlink specified app user from given channel.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

channel = "channel_example" # String | Name of the channel.


begin
  api_instance.unlink_app_user(user_id, channel)
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->unlink_app_user: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
channel String Name of the channel.

Return type

nil (empty response body)

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

update_app_user

AppUserResponse update_app_user(user_id, app_user_update)

Update the specified app user.

Example

# load the gem
require 'rainbow-submarine-test-3356'
# setup authorization
RainbowSubmarineTest3356.configure do |config|
  # Configure API key authorization: appToken
  config.api_key['app-token'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['app-token'] = 'Bearer'

  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = RainbowSubmarineTest3356::AppUserApi.new

user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.

app_user_update = RainbowSubmarineTest3356::AppUserUpdate.new # AppUserUpdate | Supported properties for an updateAppUser request.


begin
  result = api_instance.update_app_user(user_id, app_user_update)
  p result
rescue RainbowSubmarineTest3356::ApiError => e
  puts "Exception when calling AppUserApi->update_app_user: #{e}"
end

Parameters

Name Type Description Notes
user_id String Identifies the user. Can be either the smoochId or the userId.
app_user_update AppUserUpdate Supported properties for an updateAppUser request.

Return type

AppUserResponse

Authorization

appToken, jwt

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json