Project

talkgh

0.0
No commit activity in last 3 years
No release in over 3 years
Talkgh Client Library for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.0
~> 12.0
~> 0.16
~> 3.0

Runtime

~> 2
 Project Readme

Talkgh SMS Client Library for Ruby

This is a Ruby client library for the Talkgh, you'll need to signup at talkgh to get started.

  • Requirements
  • Installation
  • Usage
  • License

Requirements

Talkgh ruby client library requires ruby version...

'>= 2.1.0'

Installation

To install library using Rubygems:

gem install talkgh

Alternatively you can clone the repository:

git clone git@github.com/victronix/talkgh-ruby.git

Usage

Begin by requiring the talkgh library:

require 'talkgh'

Then create a client object with your api token:

client = Talkgh::Client.new(api_token: 'YOUR-API-TOKEN')

Send an SMS

You can now use the client object to send an SMS.

response = client.sms.send(
    sender: 'SENDER-NAME',
    des:    'NUMBER',
    mess:   'Hello world'


if response.code == '0000'
  puts "Sent message successfully"
else
  puts "Error: #{response.code}"
end

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT