https://github.com/mergentlabs/mergent-ruby
Ruby library for the Mergent API.
https://github.com/mergentlabs/mergent-ruby
mergent ruby
Last synced: about 1 year ago
JSON representation
Ruby library for the Mergent API.
- Host: GitHub
- URL: https://github.com/mergentlabs/mergent-ruby
- Owner: mergentlabs
- License: mit
- Created: 2021-11-21T22:24:17.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-12T16:30:15.000Z (almost 3 years ago)
- Last Synced: 2025-03-02T11:19:06.335Z (over 1 year ago)
- Topics: mergent, ruby
- Language: Ruby
- Homepage: https://mergent.co
- Size: 51.8 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mergent Ruby Library
[](https://badge.fury.io/rb/mergent)
[](https://github.com/mergentlabs/mergent-ruby/actions/workflows/ci.yml)
The Mergent Ruby library provides convenient access to the Mergent API from
applications written in the Ruby language.
## Installation
Add this line to your application's Gemfile:
```ruby
gem "mergent"
```
And then execute:
$ bundle install
Or install it yourself as:
$ gem install mergent
## Usage
The library needs to be configured with your project's API key. Set
`Mergent.api_key` to its value:
```ruby
# set the Mergent API key
Mergent.api_key = "..."
# create a Task
task = Mergent::Task.create({ request: { url: "https://example.com" } })
# get the newly created Task's ID
task.id
# create a Schedule
schedule = Mergent::Schedule.create({ cron: "0 8 * * *", request: { url: "https://example.com" } })
# get the newly created Schedule's cron schedule
schedule.cron
```
See the [Mergent Ruby docs](https://docs.mergent.co/libraries/ruby) for more
details.
## Development
After checking out the repo, run `bundle` to install dependencies. Then, run
`rake spec` to run the tests.
To install this gem onto your local machine, run `bundle exec rake install`.
To release a new version, update the changelog, bump the version number in
`version.rb`, commit that change, and then run `bundle exec rake release`, which
will create a git tag for the version, push git commits and the created tag, and
push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at
https://github.com/mergentlabs/mergent-ruby.
## Distributing
1. Update the changelog in `CHANGELOG.md`
1. Update the version in `lib/mergent/version.rb`
1. Commit the version bump and tag using `git tag $VERSION`
1. Push with `git push --tags`
1. Build & publish with `rake release`
## License
The gem is available as open source under the terms of the
[MIT License](https://opensource.org/licenses/MIT).