YCloudApiClient - the Ruby gem for the YCloud API
The YCloud API is organized around REST. Our API is designed to have predictable, resource-oriented URLs, return JSON responses, and use standard HTTP response codes and verbs.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v2
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build ycloud_api.gemspec
Then either install the gem locally:
gem install ./ycloud_api-1.0.0.gem
(for development, run gem install --dev ./ycloud_api-1.0.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 'ycloud_api', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/jiacheo/ycloud-ruby-sdk, then add the following in the Gemfile:
gem 'ycloud_api', :git => 'https://github.com/jiacheo/ycloud-ruby-sdk.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'ycloud_api'
# Setup authorization
YCloudApiClient.configure do |config|
# Configure API key authorization: api_key
config.api_key['api_key'] = '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['api_key'] = 'Bearer'
end
api_instance = YCloudApiClient::BalanceApi.new
begin
#Retrieve balance
result = api_instance.balance_retrieve
p result
rescue YCloudApiClient::ApiError => e
puts "Exception when calling BalanceApi->balance_retrieve: #{e}"
end
All URIs are relative to https://api.ycloud.com/v2
Class | Method | HTTP request | Description |
---|---|---|---|
YCloudApiClient::BalanceApi | balance_retrieve | GET /balance | Retrieve balance |
YCloudApiClient::EmailsApi | email_send | POST /emails | Send an email |
YCloudApiClient::SMSApi | sms_list | GET /sms | List SMS records |
YCloudApiClient::SMSApi | sms_send | POST /sms | Send an SMS |
YCloudApiClient::VerifyApi | verification_check | POST /verify/verificationChecks | Check a verification |
YCloudApiClient::VerifyApi | verification_send | POST /verify/verifications | Start a verification |
YCloudApiClient::VoicesApi | voice_list | GET /voices | List voice records |
YCloudApiClient::VoicesApi | voice_send | POST /voices | Send a voice code |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_create | POST /webhookEndpoints | Create a webhook endpoint |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_delete | DELETE /webhookEndpoints/{id} | Delete a webhook endpoint |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_list | GET /webhookEndpoints | List webhook endpoints |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_retrieve | GET /webhookEndpoints/{id} | Retrieve a webhook endpoint |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_rotate_secret | POST /webhookEndpoints/{id}/rotateSecret | Rotate a webhook endpoint secret |
YCloudApiClient::WebhookEndpointsApi | webhook_endpoint_update | PATCH /webhookEndpoints/{id} | Update a webhook endpoint |
YCloudApiClient::WhatsAppMessagesApi | whatsapp_message_retrieve | GET /whatsapp/messages/{id} | Retrieve a WhatsApp message |
YCloudApiClient::WhatsAppMessagesApi | whatsapp_message_send | POST /whatsapp/messages | Send a WhatsApp message |
YCloudApiClient::WhatsAppPhoneNumbersApi | whatsapp_phone_number_list | GET /whatsapp/phoneNumbers | List WhatsApp phone numbers |
YCloudApiClient::WhatsAppPhoneNumbersApi | whatsapp_phone_number_retrieve | GET /whatsapp/phoneNumbers/{wabaId}/{phoneNumber} | Retrieve a WhatsApp phone number |
YCloudApiClient::WhatsAppTemplatesApi | whatsapp_template_create | POST /whatsapp/templates | Create a WhatsApp template |
YCloudApiClient::WhatsAppTemplatesApi | whatsapp_template_delete_by_name | DELETE /whatsapp/templates/{wabaId}/{name} | Delete WhatsApp templates by name |
YCloudApiClient::WhatsAppTemplatesApi | whatsapp_template_list | GET /whatsapp/templates | List WhatsApp templates |
YCloudApiClient::WhatsAppTemplatesApi | whatsapp_template_retrieve_by_name_and_language | GET /whatsapp/templates/{wabaId}/{name}/{language} | Retrieve a WhatsApp template |
- YCloudApiClient::Balance
- YCloudApiClient::Email
- YCloudApiClient::EmailContentType
- YCloudApiClient::EmailDelivery
- YCloudApiClient::EmailSendRequest
- YCloudApiClient::Error
- YCloudApiClient::ErrorResponse
- YCloudApiClient::Event
- YCloudApiClient::EventType
- YCloudApiClient::Mailbox
- YCloudApiClient::Page
- YCloudApiClient::Sms
- YCloudApiClient::SmsPage
- YCloudApiClient::SmsSendRequest
- YCloudApiClient::Verification
- YCloudApiClient::VerificationChannel
- YCloudApiClient::VerificationCheck
- YCloudApiClient::VerificationCheckRequest
- YCloudApiClient::VerificationSendRequest
- YCloudApiClient::VerificationStatus
- YCloudApiClient::Voice
- YCloudApiClient::VoicePage
- YCloudApiClient::VoiceSendRequest
- YCloudApiClient::WebhookEndpoint
- YCloudApiClient::WebhookEndpointCreateRequest
- YCloudApiClient::WebhookEndpointPage
- YCloudApiClient::WebhookEndpointStatus
- YCloudApiClient::WebhookEndpointUpdateRequest
- YCloudApiClient::WhatsappInboundMessage
- YCloudApiClient::WhatsappInboundMessageButton
- YCloudApiClient::WhatsappInboundMessageInteractive
- YCloudApiClient::WhatsappInboundMessageInteractiveButtonReply
- YCloudApiClient::WhatsappInboundMessageInteractiveListReply
- YCloudApiClient::WhatsappInboundMessageLocation
- YCloudApiClient::WhatsappInboundMessageMedia
- YCloudApiClient::WhatsappInboundMessageText
- YCloudApiClient::WhatsappInboundMessageType
- YCloudApiClient::WhatsappMessage
- YCloudApiClient::WhatsappMessageContact
- YCloudApiClient::WhatsappMessageContactAddressesInner
- YCloudApiClient::WhatsappMessageContactEmailsInner
- YCloudApiClient::WhatsappMessageContactName
- YCloudApiClient::WhatsappMessageContactOrg
- YCloudApiClient::WhatsappMessageContactPhonesInner
- YCloudApiClient::WhatsappMessageContactUrlsInner
- YCloudApiClient::WhatsappMessageInteractive
- YCloudApiClient::WhatsappMessageInteractiveAction
- YCloudApiClient::WhatsappMessageInteractiveActionButtonsInner
- YCloudApiClient::WhatsappMessageInteractiveActionButtonsInnerReply
- YCloudApiClient::WhatsappMessageInteractiveActionSectionsInner
- YCloudApiClient::WhatsappMessageInteractiveActionSectionsInnerRowsInner
- YCloudApiClient::WhatsappMessageInteractiveBody
- YCloudApiClient::WhatsappMessageInteractiveFooter
- YCloudApiClient::WhatsappMessageInteractiveHeader
- YCloudApiClient::WhatsappMessageLocation
- YCloudApiClient::WhatsappMessageMedia
- YCloudApiClient::WhatsappMessageSendRequest
- YCloudApiClient::WhatsappMessageStatus
- YCloudApiClient::WhatsappMessageTemplate
- YCloudApiClient::WhatsappMessageTemplateComponentsInner
- YCloudApiClient::WhatsappMessageTemplateComponentsInnerParametersInner
- YCloudApiClient::WhatsappMessageTemplateLanguage
- YCloudApiClient::WhatsappMessageText
- YCloudApiClient::WhatsappMessageType
- YCloudApiClient::WhatsappPhoneNumber
- YCloudApiClient::WhatsappPhoneNumberCodeVerificationStatus
- YCloudApiClient::WhatsappPhoneNumberNameStatus
- YCloudApiClient::WhatsappPhoneNumberPage
- YCloudApiClient::WhatsappPhoneNumberQualityRating
- YCloudApiClient::WhatsappPhoneNumberStatus
- YCloudApiClient::WhatsappTemplate
- YCloudApiClient::WhatsappTemplateCategory
- YCloudApiClient::WhatsappTemplateComponent
- YCloudApiClient::WhatsappTemplateComponentButton
- YCloudApiClient::WhatsappTemplateComponentButtonType
- YCloudApiClient::WhatsappTemplateComponentExample
- YCloudApiClient::WhatsappTemplateCreateRequest
- YCloudApiClient::WhatsappTemplatePage
- YCloudApiClient::WhatsappTemplateStatus
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header