Coder Social home page Coder Social logo

sms_masking's Introduction

SmsMasking

SmsMasking allows you to send SMS messages from your Ruby application using services provided by www.smsmasking.co.id. Please read the documentation.

Disclaimer

This is not official gem of www.smsmasking.co.id.

Index

Installation

Add this line to your application's Gemfile:

gem 'sms_masking'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sms_masking

Usage

Initialize

sms = SmsMasking::Base.new(username: "your_username", password: "your_password")

Parameters :

  • mobile : recipient
  • message : SMS

Send an SMS

Purpose : To Send an SMS

Example :

sms.send_sms({mobile: "085699999999", message: "your_message"})

Parameters :

  • mobile : recipient number
  • message : SMS

Send SMS by Group

Purpose : To Send SMS to a Group

Example :

sms.send_sms_group({group: "My group", msg: "your_message"})

Parameters :

  • group : Group Name
  • message : SMS

Add Phone Book

Purpose : Add new contact to phone book

Example :

sms.add_phone_book({
  name: "John Doe", 
  mobile: "085699999999", 
  group: "My Group", 
  address: "My Address",
  birth: "19900101",
  desc: "My Description"
})

Parameters :

  • name : Contact Name
  • mobile : Recipient
  • group : Contact Group Name
  • address (optional) : Contact Address
  • birth (optional) : Contact Birthday (YYYYMMDD)
  • desc (optional) : Contact Description

Edit Phone Book

Purpose : Edit existing Contact

Example :

sms.edit_phone_book({
  id: 1,
  name: "John Doe", 
  mobile: "085699999999", 
  group: "My Group", 
  address: "My Address",
  birth: "19900101",
  desc: "My Description"
})

Parameters :

  • id : Contact ID Number
  • name : Contact Name
  • mobile : Recipient
  • group : Contact Group Name
  • address (optional) : Contact Address
  • birth (optional) : Contact Birthday (YYYYMMDD)
  • desc (optional) : Contact Description

Delete Phone Book

Purpose : Delete existing contact

Example :

sms.delete_phone_book({id: 1})

Parameters :

  • id : Contact ID Number

Get Contact List

sms.list_phone_book({
  page: 1, 
  size: 10
})

Parameters :

  • page : Page Number (default=1)
  • size : number of records per page (default=10)

Get Contact List by Group

Purpose : To get Contact list by Group Name

sms.list_phone_book_by_group({
  page: 1, 
  size: 10,
  group: "My Group"
})

Parameters :

  • page : Page Number (default=1)
  • size : number of records per page (default=10)
  • group : Group Name

Get Complete Data

Purpose : To retrieve contact detail

sms.contact_detail({id: 1})

Parameters :

  • id : Contact ID Number

Find Name

Purpose : To search contact by name

sms.find_contact({name: "John Doe"})

Parameters :

  • name : Name to search

Find Phone Number

Purpose : To search contact by Phone Number

sms.find_contact({number: "085699999999"})

Parameters :

  • number : Number to search

Add Group

Purpose : Add a new Group Name

sms.add_group({group: "Group 1"})

Parameters :

  • group : Group Name

Edit Group

Purpose : Edit an existing Group

sms.edit_group({id: 1, group: "My Group 1"})

Parameters :

  • group : Group Name

Delete Group

Purpose : Delete an existing Group

sms.delete_group({id: 1})

Parameters :

  • id : Group ID

Get List of Group

Purpose : Retrieve list of existing Group

sms.list_group({
  page: 1, 
  size: 10
})

Parameters :

  • page : Page Number (default=1)
  • size : number of records per page (default=10)

Find Group

Purpose : Find a Group

sms.find_group({group: "My Group 1"})

Parameters :

  • group : Name to search

Checking Customer Account Balance

Purpose : Retrieve account balance

sms.balance

Change Password

Purpose : To change password

sms.change_password({newpasw: "myS3crEt"})

Parameters :

  • newpasw : New Password

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec 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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yunanhelmy/sms_masking. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

sms_masking's People

Contributors

yunanhelmy avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.