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

Development

~> 1.3
~> 3.0.9
>= 0

Runtime

 Project Readme

TextVeloper

Wrapper for Textveloper API for sending and manage SMS in Venezuela.

Installation

Add this line to your application's Gemfile:

gem 'text_veloper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install text_veloper

Usage

require 'text_veloper'

# get the account mannager
account_manager = TextVeloper::ApiSelector.account_manager

#set the token account
account_manager.config_token_account "TOKEN_ACCOUNT_STRING"

#get the sub_account(Yo can have many sub_accounts)
sub_account = account_manager.sub_account_api "SUB_TOKEN_STRING"

#send a message
#PHONE_NUMBERS can be a Array with many numbers ["number1", "number2"] or one number "number"
response = sub_account.send_message TEXT_MESSAGE, PHONE_NUMBERS

#Points query / Consulta de puntos
response = sub_account.points_query

#Messages Records
response = sub_account.messages_records

#Account Balance
response = account_manager.balance

# Purchase history
response = account_manager.purchase_history

#NOTE: Al responses are returned by json. Yo can use JSON.parse(response) for get a Ruby Hash

In Rails

rails g text_veloper:initializer

And config your default token for account and sub_account

# For configure the tokens for textveloper gem
TextVeloper::ApiSelector.api.setup do |config|
  config.token_account = ""
  config.sub_token = ""
end

##Other Languages? see this for python: pytextveloper

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request