Skip to content

Latest commit

 

History

History
132 lines (90 loc) · 3.54 KB

File metadata and controls

132 lines (90 loc) · 3.54 KB

SunshineConversationsClient::DevicesApi

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

Method HTTP request Description
get_device GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices/{deviceId} Get Device
list_devices GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices List Devices

get_device

DeviceResponse get_device(app_id, user_id_or_external_id, device_id)

Get Device

Fetches a specific Device.

Example

# 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::DevicesApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
user_id_or_external_id = 42589ad070d43be9b00ff7e5 # String | The user's id or externalId.
device_id = 5d8cff3cd55b040010928b5b # String | The device's id.
# Be sure to add the required body parameters

begin
  #Get Device
  result = api_instance.get_device(app_id, user_id_or_external_id, device_id)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling DevicesApi->get_device: #{e}"
end

Parameters

Name Type Description Notes
app_id String Identifies the app.
user_id_or_external_id String The user's id or externalId.
device_id String The device's id.

Return type

DeviceResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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

list_devices

DeviceListResponse list_devices(app_id, user_id_or_external_id)

List Devices

Get all the devices for a particular user. The Devices are sorted based on last seen time.

Example

# 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::DevicesApi.new
app_id = 5d8cff3cd55b040010928b5b # String | Identifies the app.
user_id_or_external_id = 42589ad070d43be9b00ff7e5 # String | The user's id or externalId.
# Be sure to add the required body parameters

begin
  #List Devices
  result = api_instance.list_devices(app_id, user_id_or_external_id)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling DevicesApi->list_devices: #{e}"
end

Parameters

Name Type Description Notes
app_id String Identifies the app.
user_id_or_external_id String The user's id or externalId.

Return type

DeviceListResponse

Authorization

basicAuth, bearerAuth

HTTP request headers

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