
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A tiny ruby wrapper around ApiWha API. If you want know more visit http://www.apiwha.com website.
Add this line to your application's Gemfile:
gem 'apiwha'
And then execute:
$ bundle
Or install it yourself as:
$ gem install apiwha
require 'apiwha'
apiwha = Apiwha.new('Your secret API key')
Your secret API key. You can generate it in your dashboard from https://panel.apiwha.com/
Allows you to pull the messages you received and sent.
type: (Optional). Type of message to retrieve. Possible values: IN or OUT.
number: (Optional). Get IN or OUT messsages to or from this number.
markaspulled: (Optional). If you set this value in 1 you will mark your results as pulled.
getnotpulledonly: (Optional). If you set this value in 1 you will retrieve only results that you don't have marked as pulled.
limit: (Default 100).
orderdesc: (Default most recent). If you set this value in 0 you will retrieve result from oldest to newest.
messages = apiwha.pull_messages(options)
[
{
"id":"14409287",
"number":"391112223456",
"from":"391112223456",
"to":"39886677822",
"type":"IN",
"text":"test hello message",
"creation_date":"2019-03-11 14:29:51",
"process_date":"2019-03-11 14:29:51",
"failed_date":null,
"custom_data":null
},
{
"id":"14409219",
"number":"393938491113",
"from":"393891986619",
"to":"393938491113",
"type":"IN",
"text":"test message",
"creation_date":"2019-03-11 14:28:53",
"process_date":"2019-03-11 14:28:53",
"failed_date":null,
"custom_data":null
}
]
Allows you to send messages to any destination that wrote to you.
number: Destination number. Enter the number with country code. You can check the number formatting in https://faq.whatsapp.com/en/general/21016748
text: Text of message to send or URL of media to send.
If this text is an URL that begins with "http" and finishes with ".png" or ".jpg" the system will send a picture.
If this text is an URL that begins with "http" and finishes with ".ogg" the system will send an audio.
If this text is an URL that begins with "http" and finishes with ".pdf" the system will send the pdf document.
custom_data: You can add your custom data in each message that you send. Then, you will receive this custom data by webhook events.
apiwha.send_message(options)
Allows you to query about your credit
credit = apiwha.get_credit
{
"credit":45
}
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.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/apiwha. 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.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Apiwha project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that apiwha 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.