Sprintly::Data::Ruby
The Sprintly Data Ruby gem easily fetches Products and Items for an authorized Sprintly user.
Installation
Add this line to your application's Gemfile:
gem 'sprintly-data-ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sprintly-data-ruby
Usage
Before using the gem, you must set environment variables for SPRINTLY_EMAIL and SPRINTLY_API_KEY. You can find your Sprintly API key from the User Account page in Sprintly.
An example method call to receive all products for the authorized Sprintly user looks like this:
Sprintly::Product.all
The gem also contains an instance method to retrieve all stories that are of a certain status for any given product. The following will return all items in the backlog for the first Sprintly Product returned by the .all query.
Sprintly::Product.all.first.get_items_by_status("backlog")
You can also see all items for a given product by replacing the product_id below with a valid Sprintly Product ID.
Sprintly::Item.for_product(product_id)
Development
After checking out the repo, run bin/setup to install dependencies. 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.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/quickleft/sprintly-data-ruby.
License
The gem is available as open source under the terms of the MIT License.