No release in over 3 years
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 4.4.6, ~> 4.4
>= 0.2.11, ~> 0.2
>= 0.2.16, ~> 0.2
>= 4.1.2, ~> 4.1
>= 3.4.0, ~> 3.4
>= 3.0.1, ~> 3.0
>= 1.24.3, ~> 1.24

Runtime

>= 1.8.3, ~> 1.8
>= 1.0.1, ~> 1.0
 Project Readme

sunshine-conversations-ruby

SunshineConversationsClient - the Ruby gem for the Sunshine Conversations API

This SDK is automatically generated by the OpenAPI Generator Codegen project using the Sunshine Conversations API spec.

  • API version: 13.1.0
  • Package version: 13.1.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Sunshine Conversations API Version

The Sunshine Conversations API offers multiple versions. Each release of this project targets one and only one Sunshine Conversations API version. If you depend on an older version of the Sunshine Conversations API, you may need to use an older release of this library. Use the table below as your guide:

Sunshine Conversations API version zendesk/sunshine-conversations-ruby version to use
v2 Implementation guide 9.* or newer
v1.1 Upgrade guide 4.0.0 or newer
v1 3.* or older

Installation

Build a gem

To build the Ruby code into a gem:

gem build sunshine-conversations-client.gemspec

Then either install the gem locally:

gem install ./sunshine-conversations-client-13.1.0.gem

(for development, run gem install --dev ./sunshine-conversations-client-13.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'sunshine-conversations-client', '~> 13.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'sunshine-conversations-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Familiarity with Sunshine Conversations API authentication is recommended.

Basic Authentication (recommended)

With basic authentication, you can use your API key ID and secret to authenticate API requests. See below for a code sample.

Authentication with JSON Web Tokens (JWTs)

See the JSON Web Tokens (JWTs) guide for more information and guidelines on when to use this method. In general, you'll want to favor using basic authentication.

To generate a JWT, use your API key ID and secret.

Using the ruby-jwt gem:

require 'jwt'

payload = {:scope => 'app'}
jwtHeader = {:kid => API_KEY_ID}

token = JWT.encode payload, API_KEY_SECRET, 'HS256', jwtHeader

Running the code

Please follow the installation procedure and then run the following code:

# 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
  config.access_token = 'YOUR_BEARER_TOKEN'
end

api_instance = SunshineConversationsClient::ActivitiesApi.new
app_id = '5d8cff3cd55b040010928b5b' # String | Identifies the app.
conversation_id = '029c31f25a21b47effd7be90' # String | Identifies the conversation.
activity_post = {"author":{"type":"user","userId":"5963c0d619a30a2e00de36b8"},"type":"conversation:read"} # ActivityPost | 

begin
  #Post Activity
  result = api_instance.post_activity(app_id, conversation_id, activity_post)
  p result
rescue SunshineConversationsClient::ApiError => e
  puts "Exception when calling ActivitiesApi->post_activity: #{e}"
end

Region

Sunshine Conversations is available in the following regions. The US region will be used by default. To target any other region, specify the region's API host in config.host. For example:

SunshineConversationsClient.configure do |config|
  config.host = 'api.eu-1.smooch.io'
end

Documentation for API Endpoints

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

Class Method HTTP request Description
SunshineConversationsClient::ActivitiesApi post_activity POST /v2/apps/{appId}/conversations/{conversationId}/activity Post Activity
SunshineConversationsClient::AppKeysApi create_app_key POST /v2/apps/{appId}/keys Create App Key
SunshineConversationsClient::AppKeysApi delete_app_key DELETE /v2/apps/{appId}/keys/{keyId} Delete App Key
SunshineConversationsClient::AppKeysApi get_app_key GET /v2/apps/{appId}/keys/{keyId} Get App Key
SunshineConversationsClient::AppKeysApi list_app_keys GET /v2/apps/{appId}/keys List App Keys
SunshineConversationsClient::AppsApi create_app POST /v2/apps Create App
SunshineConversationsClient::AppsApi delete_app DELETE /v2/apps/{appId} Delete App
SunshineConversationsClient::AppsApi get_app GET /v2/apps/{appId} Get App
SunshineConversationsClient::AppsApi list_apps GET /v2/apps List Apps
SunshineConversationsClient::AppsApi update_app PATCH /v2/apps/{appId} Update App
SunshineConversationsClient::AttachmentsApi delete_attachment POST /v2/apps/{appId}/attachments/remove Delete Attachment
SunshineConversationsClient::AttachmentsApi upload_attachment POST /v2/apps/{appId}/attachments Upload Attachment
SunshineConversationsClient::ClientsApi create_client POST /v2/apps/{appId}/users/{userIdOrExternalId}/clients Create Client
SunshineConversationsClient::ClientsApi list_clients GET /v2/apps/{appId}/users/{userIdOrExternalId}/clients List Clients
SunshineConversationsClient::ClientsApi remove_client DELETE /v2/apps/{appId}/users/{userIdOrExternalId}/clients/{clientId} Remove Client
SunshineConversationsClient::ConversationsApi create_conversation POST /v2/apps/{appId}/conversations Create Conversation
SunshineConversationsClient::ConversationsApi delete_conversation DELETE /v2/apps/{appId}/conversations/{conversationId} Delete Conversation
SunshineConversationsClient::ConversationsApi get_conversation GET /v2/apps/{appId}/conversations/{conversationId} Get Conversation
SunshineConversationsClient::ConversationsApi list_conversations GET /v2/apps/{appId}/conversations List Conversations
SunshineConversationsClient::ConversationsApi update_conversation PATCH /v2/apps/{appId}/conversations/{conversationId} Update Conversation
SunshineConversationsClient::CustomIntegrationApiKeysApi create_custom_integration_key POST /v2/apps/{appId}/integrations/{integrationId}/keys Create Integration Key
SunshineConversationsClient::CustomIntegrationApiKeysApi delete_custom_integration_key DELETE /v2/apps/{appId}/integrations/{integrationId}/keys/{keyId} Delete Integration Key
SunshineConversationsClient::CustomIntegrationApiKeysApi get_custom_integration_key GET /v2/apps/{appId}/integrations/{integrationId}/keys/{keyId} Get Integration Key
SunshineConversationsClient::CustomIntegrationApiKeysApi list_custom_integration_keys GET /v2/apps/{appId}/integrations/{integrationId}/keys List Integration Keys
SunshineConversationsClient::DevicesApi get_device GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices/{deviceId} Get Device
SunshineConversationsClient::DevicesApi list_devices GET /v2/apps/{appId}/users/{userIdOrExternalId}/devices List Devices
SunshineConversationsClient::IntegrationsApi create_integration POST /v2/apps/{appId}/integrations Create Integration
SunshineConversationsClient::IntegrationsApi delete_integration DELETE /v2/apps/{appId}/integrations/{integrationId} Delete Integration
SunshineConversationsClient::IntegrationsApi get_integration GET /v2/apps/{appId}/integrations/{integrationId} Get Integration
SunshineConversationsClient::IntegrationsApi list_integrations GET /v2/apps/{appId}/integrations List Integrations
SunshineConversationsClient::IntegrationsApi update_integration PATCH /v2/apps/{appId}/integrations/{integrationId} Update Integration
SunshineConversationsClient::MessagesApi delete_all_messages DELETE /v2/apps/{appId}/conversations/{conversationId}/messages Delete All Messages
SunshineConversationsClient::MessagesApi delete_message DELETE /v2/apps/{appId}/conversations/{conversationId}/messages/{messageId} Delete Message
SunshineConversationsClient::MessagesApi list_messages GET /v2/apps/{appId}/conversations/{conversationId}/messages List Messages
SunshineConversationsClient::MessagesApi post_message POST /v2/apps/{appId}/conversations/{conversationId}/messages Post Message
SunshineConversationsClient::OAuthEndpointsApi authorize GET /oauth/authorize Authorize
SunshineConversationsClient::OAuthEndpointsApi get_token POST /oauth/token Get Token
SunshineConversationsClient::OAuthEndpointsApi revoke_access DELETE /oauth/authorization Revoke Access
SunshineConversationsClient::ParticipantsApi join_conversation POST /v2/apps/{appId}/conversations/{conversationId}/join Join Conversation
SunshineConversationsClient::ParticipantsApi leave_conversation POST /v2/apps/{appId}/conversations/{conversationId}/leave Leave Conversation
SunshineConversationsClient::ParticipantsApi list_participants GET /v2/apps/{appId}/conversations/{conversationId}/participants List Participants
SunshineConversationsClient::SwitchboardActionsApi accept_control POST /v2/apps/{appId}/conversations/{conversationId}/acceptControl Accept Control
SunshineConversationsClient::SwitchboardActionsApi offer_control POST /v2/apps/{appId}/conversations/{conversationId}/offerControl Offer Control
SunshineConversationsClient::SwitchboardActionsApi pass_control POST /v2/apps/{appId}/conversations/{conversationId}/passControl Pass Control
SunshineConversationsClient::SwitchboardActionsApi release_control POST /v2/apps/{appId}/conversations/{conversationId}/releaseControl Release Control
SunshineConversationsClient::SwitchboardIntegrationsApi create_switchboard_integration POST /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations Create Switchboard Integration
SunshineConversationsClient::SwitchboardIntegrationsApi delete_switchboard_integration DELETE /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations/{switchboardIntegrationId} Delete Switchboard Integration
SunshineConversationsClient::SwitchboardIntegrationsApi list_switchboard_integrations GET /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations List Switchboard Integrations
SunshineConversationsClient::SwitchboardIntegrationsApi update_switchboard_integration PATCH /v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations/{switchboardIntegrationId} Update Switchboard Integration
SunshineConversationsClient::SwitchboardsApi create_switchboard POST /v2/apps/{appId}/switchboards Create Switchboard
SunshineConversationsClient::SwitchboardsApi delete_switchboard DELETE /v2/apps/{appId}/switchboards/{switchboardId} Delete Switchboard
SunshineConversationsClient::SwitchboardsApi list_switchboards GET /v2/apps/{appId}/switchboards List Switchboards
SunshineConversationsClient::SwitchboardsApi update_switchboard PATCH /v2/apps/{appId}/switchboards/{switchboardId} Update Switchboard
SunshineConversationsClient::UsersApi create_user POST /v2/apps/{appId}/users Create User
SunshineConversationsClient::UsersApi delete_user DELETE /v2/apps/{appId}/users/{userIdOrExternalId} Delete User
SunshineConversationsClient::UsersApi delete_user_personal_information DELETE /v2/apps/{appId}/users/{userIdOrExternalId}/personalinformation Delete User Personal Information
SunshineConversationsClient::UsersApi get_user GET /v2/apps/{appId}/users/{userIdOrExternalId} Get User
SunshineConversationsClient::UsersApi update_user PATCH /v2/apps/{appId}/users/{userIdOrExternalId} Update User
SunshineConversationsClient::WebhooksApi create_webhook POST /v2/apps/{appId}/integrations/{integrationId}/webhooks Create Webhook
SunshineConversationsClient::WebhooksApi delete_webhook DELETE /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} Delete Webhook
SunshineConversationsClient::WebhooksApi get_webhook GET /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} Get Webhook
SunshineConversationsClient::WebhooksApi list_webhooks GET /v2/apps/{appId}/integrations/{integrationId}/webhooks List Webhooks
SunshineConversationsClient::WebhooksApi update_webhook PATCH /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} Update Webhook

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication

bearerAuth

  • Type: Bearer authentication (JWT)