Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sunshine-conversations-client
Advanced tools
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.
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 |
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-14.1.0.gem
(for development, run gem install --dev ./sunshine-conversations-client-14.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', '~> 14.1.0'
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 using -I
as follows:
ruby -Ilib script.rb
Familiarity with Sunshine Conversations API authentication is recommended.
With basic authentication, you can use your API key ID and secret to authenticate API requests. See below for a code sample.
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
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
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
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 | download_message_ref | POST /v2/apps/{appId}/conversations/{conversationId}/download | Download Message Ref |
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 |
FAQs
Unknown package
We found that sunshine-conversations-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.