Documentation.

Ruby

We’ve first developed the API in Ruby on Rails in order to make it easily usable with the ruby gems system. We are still developing the documentation for it to be available with more languages like Javascript, Python, Php, Java, C, etc... The API is available with curl, contact us if you want more info about it.

Ruby

We’ve first developed the API in Ruby on Rails in order to make it easily usable with the ruby gems system. We are still developing the documentation for it to be available with more languages like Javascript, Python, Php, Java, C, etc... The API is available with curl, contact us if you want more info about it.

Installation

Add this line to your application’s Gemfile:

Copy

And then execute:

Copy

Or install it yourself as:

Copy

Usage

Te usage of this gem is simple : example in simple application: exaple of status : - status = 0 => message sended - other status => error

require “Textie”

#Then initialize the connection with :
textie = Textie::Api.new(“email”,“user_token”,“app_token”)

#then do what you want :
#send a simple message
textie.sendMessage(“0488888888”,“your message”)

#response = {“status”=> 0, “message”=>your_message, “to”=>phone_number}
#create a contact :
textie.createContact(“name”,“phone number”)

#response = {id: id,nom: name,number: number,created_at: date, updated_at: date}
#get a contact by id:
textie.getContact(id)

#response = {id: id,nom: name,number: number,created_at: date, updated_at: date}
#send message with a contact id
textie.sendMessageWithContact(contact_id,message)

#response = {“status”=> 0, “message”=>your_message, “contact”=>contact_id}

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Installation

Add this line to your application’s Gemfile:

Copy

And then execute:

Copy

Or install it yourself as:

Copy

Usage

Te usage of this gem is simple : example in simple application: exaple of status : - status = 0 => message sended - other status => error

require “Textie”

#Then initialize the connection with :
textie = Textie::Api.new(“email”,“user_token”,“app_token”)

#then do what you want :
#send a simple message
textie.sendMessage(“0488888888”,“your message”)

#response = {“status”=> 0, “message”=>your_message, “to”=>phone_number}
#create a contact :
textie.createContact(“name”,“phone number”)

#response = {id: id,nom: name,number: number,created_at: date, updated_at: date}
#get a contact by id:
textie.getContact(id)

#response = {id: id,nom: name,number: number,created_at: date, updated_at: date}
#send message with a contact id
textie.sendMessageWithContact(contact_id,message)

#response = {“status”=> 0, “message”=>your_message, “contact”=>contact_id}

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.