MoceanAPI Client Library for Ruby
This is the Ruby client library for use Mocean's API. To use this, you'll need a Mocean account. Sign up for free at moceanapi.com.
Installation
To use the client library you'll need to have created a Mocean account.
To install the Ruby client library using Gem.
gem install moceansdk
Usage
Create a client with your API key and secret:
require "moceanapi/init"
token = Client.new("API_KEY_HERE", "API_SECRET_HERE")
mocean = Mocean.new(token)
Example
To use Mocean's SMS API to send an SMS message, call the mocean.sms.create().send() method.
The API can be called directly, using a simple array of parameters, the keys match the parameters of the API.
res = mocean.sms.create({
"mocean-text"=>'Hello World',
"mocean-from"=>'MOCEAN',
"mocean-to"=>'60123456789'
}).send()
puts res
License
This library is released under the MIT License