Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 

Requirements

  • Sign up for a free BSG account
  • Create a new access_key (live or test access key)

Examples

First, you need to create an instance of BSG::Client. Be sure to replace YOUR_ACCESS_KEY with something real in the bottom example.

require 'pp'              # Only needed for this example
client = BSG::Client.new(YOUR_ACCESS_KEY)

That's easy enough. Now we can query the server for information.

Messages

Chances are that the most common use you'll have for this API client is the ability to send out text messages. For that purpose we have created the message_create method, which takes the required originator, one or more msisdn and a body text for parameters.

pp client.message_create(destination: 'phone', originator: 'SENDER', body: 'message text', msisdn: '380662341945', reference: 'MyReference')

#<BSG::MESSAGE:0x007faad71306f8
 @error=0,
 @id="172",
 @price="0.2300000",
 @currency="EUR">

About

A Ruby gem for communicating with the BSG API

Resources

License

Releases

No releases published

Packages

No packages published

Languages