An attempt towards a wrapper library for Nexmo APIs written in Crystal.
The library aims towards correctness rather than comprehensiveness. Correctness in this sense is about using the compiler to as many poorly formed requests as we can, then testing for well-formed requests at runtime.
Add this to your application's shard.yml
:
dependencies:
nexmo:
github: tommorris/nexmo-crystal
To send an SMS:
require "nexmo"
client = Nexmo::Client.new(api_key: "abc1234", api_secret: "def987654")
client.send_sms(from: "AcmeInc", to: "44700900000", message: "Hello World")
- Account
- Balance
- Pricing
- Settings
- Top Up
- Numbers
- Search
- Buy
- Cancel
- Update
- Number Insight
- Basic
- Standard
- Advanced
- Webhook Notification
- Verify
- Verify
- Check
- Search
- Control
- Messaging
- Send
- Delivery Receipt
- Inbound Messages
- Search
- Message
- Messages
- Rejections
- US Short Codes
- Two-Factor Authentication
- Event Based Alerts
- Sending Alerts
- Campaign Subscription Management
- Voice
- Outbound Calls
- Inbound Call
- Text-To-Speech Call
- Text-To-Speech Prompt
- Write tests for stuff and put it in specs.
- Use a named, defaulted argument for faking API calls rather than mocks and stubs and so on.
- Follow the Crystal style guide.
- Don't check in binaries or
dwarf
files.
- Fork it ( https://github.com/tommorris/nexmo-crystal/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- @tommorris Tom Morris - creator, maintainer