{"id":18576885,"url":"https://github.com/greensms-io/greensms-ruby","last_synced_at":"2025-04-10T09:30:40.580Z","repository":{"id":55678428,"uuid":"310337824","full_name":"greensms-io/greensms-ruby","owner":"greensms-io","description":"Ruby GREENSMS API client: SMS, Call, Voice, VK, WhatsApp, Viber","archived":false,"fork":false,"pushed_at":"2023-04-10T20:56:16.000Z","size":84,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T19:48:26.071Z","etag":null,"topics":["2fa-codes","call-for-code","sms","sms-api","sms-notifications","sms-verification","viber-api"],"latest_commit_sha":null,"homepage":"https://api.greensms.ru","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greensms-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-05T15:17:31.000Z","updated_at":"2023-03-22T01:11:26.000Z","dependencies_parsed_at":"2024-07-13T23:54:27.895Z","dependency_job_id":null,"html_url":"https://github.com/greensms-io/greensms-ruby","commit_stats":null,"previous_names":["greensms-io/greensms-ruby","greensms-ru/greensms-ruby"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greensms-io%2Fgreensms-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greensms-io","download_url":"https://codeload.github.com/greensms-io/greensms-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191619,"owners_count":21062538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2fa-codes","call-for-code","sms","sms-api","sms-notifications","sms-verification","viber-api"],"created_at":"2024-11-06T23:27:00.241Z","updated_at":"2025-04-10T09:30:40.003Z","avatar_url":"https://github.com/greensms-io.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# greensms-ruby\n\n## Documentation\n\nThe documentation for the GREENSMS API can be found [here][apidocs].\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'greensms'\n```\n\nAnd then execute:\n\n```bash\n$ bundle install\n```\n\nOr install it yourself as:\n\n```\n$ gem install greensms\n```\n\n## Sample Usage\n\nCheck out these [code examples](examples) to get up and running quickly.\n\n```ruby\n\nrequire \"greensms\"\n\n# Register at my.greeensms.ru first\n@client = GreenSMS::GreenSMSClient.new(user: \"test\", pass: \"test\")\n\nresponse = @client.sms.send(to: '71231234567', txt: 'Message to deliver')\nputs response[\"request_id\"]\n\n\n```\n\n### Environment Variables\n\n`greensms-ruby` supports credential storage in environment variables. If no credentials are provided following env vars will be used: `GREENSMS_USER`/`GREENSMS_PASS` OR `GREENSMS_TOKEN`\n\n### Token Auth\n\n```ruby\n\nrequire \"greensms\"\n\n# Register at my.greeensms.ru first\n@client = GreenSMS::GreenSMSClient.new(token: \"Your Auth Token comes here\")\n\nresponse = @client.account.balance\nputs response[\"balance\"]\n\n\n```\n\n## Compatibility\n\n`greensms-ruby` is compatible with Ruby 2.4+ onwards until the latest version\n\n## Methods\n\n- You can either use username/password combination or auth token to create an object with constructor\n- All methods support named keyword arguments `(to: \"\", extended: true)`\n- Each API Function is available as `MODULE.FUNCTION()`\n- Parameters for each API can be referred from [here][apidocs]\n- Response keys can be used as hash keys `response['key']`\n- Response keys by default are available in `snake_case`. If you want to use `camelCase`, then pass `camel_case_response: true`, in the constructor\n\n## Handling Exceptions\n\n- Exceptions for all APIs are thrown with `RestError` class. It extends the default Ruby StandardError class.\n- Each error, will have `error`, `code`, `message`, `errorType` fields.\n- In case of _Validation Error_, additional params are available to show field-wise rule failures. Can be accessed by `e.params` property on the error object\n\n## Getting help\n\nIf you need help installing or using the library, please contact us: [support@greensms.ru](mailto:support@greensms.ru).\n\nIf you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub [here](https://github.com/greensms-ru/greensms-ruby). If you're not familiar with the GitHub pull request/contribution process, [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n[apidocs]: https://api.greensms.ru/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreensms-io%2Fgreensms-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreensms-io%2Fgreensms-ruby/lists"}