You are reading documentation for version: 0.2.0
The Ruby gem for accessing the Ravelry API painlessly, easily, and awesomely! This gem is actively being developed. Be sure to check the branch for the version you're using.
Important and helpful links:
See documentation for each class (or module) to see how to initialize the objects.
|API||Endpoint||Ravelry gem class / module|
To install, type:
gem install ravelry
Hooray! You now have a gem.
Add to your
gem "ravelry", "~> 0.2.0"
I highly recommend pinning your version because the gem is in active development and small changes and additions will be made regularly.
bundle install and proceed as usual.
API keys must be configured in the gem setup. You can do this anywhere in your application before you make API calls using the gem.
Ravelry.configure do |config| config.access_key = '' config.secret_key = '' config.personal_key = '' config.callback_url = '' end
config.access_key- your Ravelry access key
config.secret_key- your Ravelry secret key
config.personal_key- wait for it! Your Ravelry personal key; primarily used for OAuth (not yet implemented in the gem)
config.callback_url- for OAuth, the callback url for your authentication requests
The keys are available to you throughout your application as:
Ravelry.configuration.access_key Ravelry.configuration.secret_key Ravelry.configuration.personal_key Ravelry.configuration.callback_url
Full documentation for this gem is available here.
This gem makes use of several conventions that are worth noting on a global scale.
Method names ending with
_count return integers.
pattern.comments_count # => 4
Method names ending with
_integer, etc return that object type.
Float to Integer conversions are done using round(0).
pattern.difficulty_average_float # => 4.666666667 pattern.difficulty_average_integer # => 5
Hey! You want to contribute? That is super, super awesome. Visit the project's Trello board to see what's coming up next or what is already in progress.
Send me a pull request! Please write tests, documentation for your code (the test part kind of goes without saying, but I wanted to make sure that you knew about it and the documentation), and update the changelog with your additions under the next unreleased version.
To run specs locally, simply
bundle and then run
Documentation is generated by YARD and is producted using inline comments. Comments use Markdown syntax. You can run
yard server to get a live server of documentation while you're working :)