Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instasent/instasent-ruby-lib
A Ruby wrapper library for Instasent's API
https://github.com/instasent/instasent-ruby-lib
Last synced: 9 days ago
JSON representation
A Ruby wrapper library for Instasent's API
- Host: GitHub
- URL: https://github.com/instasent/instasent-ruby-lib
- Owner: instasent
- License: mit
- Created: 2016-05-24T10:11:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T16:18:08.000Z (almost 4 years ago)
- Last Synced: 2024-04-26T03:23:08.959Z (7 months ago)
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Welcome to __Instasent Ruby SDK__. This repository contains Ruby SDK for Instasent's REST API.
# Notice!
> **Verify** product is currently deprecated and will be removed in the next release. The same functionality can be easily implemented by sending an SMS. If you need help migrating please contact usage
## Installation
The easiest way to install the SDK is via gem:
```
gem install instasent
```And then execute:
```
bundle
```or including the following in your Gemfile:
```
gem 'instasent'
```# Usage
Check the [examples directory](https://github.com/instasent/instasent-ruby-lib/tree/master/examples) to see working examples of this SDK usage
### Sending an SMS
```ruby
require 'instasent'client = Instasent::Client.new('my-token')
response = client.send_sms('Company', '+34666666666', 'test message')
puts response['response_code']
puts response['response_body']
```If you want to send an Unicode SMS (i.e with π emoji) you only need to replace `send_sms` call to `send_sms_unicode`
```ruby
response = client.send_sms_unicode('Company', '+34666666666', 'Unicode test: Γ±a éÑΓΓ³ΓΊ π')
```## Available actions
```
SMS
client.send_sms(sender, to, text)
client.send_sms_unicode(sender, to, text)
client.get_sms(page, per_page)
client.get_sms_by_id(message_id)LOOKUP
client.do_lookup(to)
client.get_lookup_by_id(id)
client.get_lookups(page, per_page)ACCOUNT
client.get_account_balance()
```# Full documentation
Full documentation of the API can be found at http://docs.instasent.com/
# Getting help
If you need help installing or using the SDK, please contact Instasent Support at [email protected]
If you've instead found a bug in the library or have a feature request, go ahead and open an issue or pull request!