
Security News
ESLint Adds Support for Parallel Linting, Closing 10-Year-Old Feature Request
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Ruby wrapper for GlobeLabs API
Add to Gemfile
gem 'globelabs'
then
$ bundle install
or
$ gem install globelabs
require 'globelabs'
globelabs = GlobeLabs::Client.new(key: 'app_id', secret: 'app_secret', send_address: 'short_code')
note: skip this part if you already have the access token
globelabs.get_access_token(code)
# =>
# {
# "access_token":"1ixLbltjWkzwqLMXT-8UF-UQeKRma0hOOWFA6o91oXw",
# "subscriber_number":"9171234567"
# }
Send an SMS message to one or more mobile terminals:
globelabs.send_message(token, subscriber_number, message)
# =>
# {
# "outboundSMSMessageRequest": {
# "address": "tel:+639175595283",
# "deliveryInfoList": {
# "deliveryInfo": [],
# "resourceURL": "https://devapi.globelabs.com.ph/smsmessaging/v1/outbound/8011/requests?access_token=3YM8xurK_IPdhvX4OUWXQljcHTIPgQDdTESLXDIes4g"
# },
# "senderAddress": "8011",
# "outboundSMSTextMessage": {
# "message": "Hello World"
# },
# "receiptRequest": {
# "notifyURL": "http://test-sms1.herokuapp.com/callback",
# "callbackData": null,
# "senderName": null,
# "resourceURL": "https://devapi.globelabs.com.ph/smsmessaging/v1/outbound/8011/requests?access_token=3YM8xurK_IPdhvX4OUWXQljcHTIPgQDdTESLXDIes4g"
# }
# }
# }
Locate a subscriber’s location:
globelabs.locate(token, subscriber_number)
# =>
# {
# "terminalLocationList": {
# "terminalLocation": {
# "address": "tel:9171234567",
# "currentLocation": {
# "accuracy": 100,
# "latitude": "14.5609722",
# "longitude": "121.0193394",
# "map_url": "http://maps.google.com/maps?z=17&t=m&q=loc:14.5609722+121.0193394",
# "timestamp": "Fri Jun 06 2014 09:25:15 GMT+0000 (UTC)"
# },
# "locationRetrievalStatus": "Retrieved"
# }
# }
# }
Charge/bill a subscriber:
options = {
amount: "20",
description: "sample description",
endUserId: "915xxxxxxx",
reference_code: '1234567',
transactionOperationStatus: 'Charged'
}
globelabs.charge(token, options)
# =>
# {
# "amountTransaction":
# {
# "endUserId": "9171234567",
# "paymentAmount":
# {
# "chargingInformation":
# {
# "amount": "0.00",
# "currency": "PHP",
# "description": "my application"
# },
# "totalAmountCharged": "0.00"
# },
# "referenceCode": "12341000023",
# "serverReferenceCode": "528f5369b390e16a62000006",
# "resourceURL": null
# }
# }
In case you lost of track of your reference code:
globelabs.last_reference_code
# =>
# {
# "referenceCode": "12341000005",
# "status": "SUCCESS",
# "shortcode": "21581234"
# }
git checkout -b feature/new_feature
)git commit -am 'Add new feature'
)git push origin feature/new_feature
)FAQs
Unknown package
We found that globe_labs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.