Gem to fetch data from our Conferences stored at Codegram Conferences.
Add this line to your application's Gemfile:
gem 'confs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install confs
Add an initializer with the API access data on your new project:
Confs.config.conference_name = 'YOUR_ACCESS_NAME'
Confs.config.conference_token = 'YOUR_ACCESS_TOKEN'
To initialize the client use Confs::Client.new
, you would
typically do as follows:
def client
@client ||= Confs::Client.new
end
To fetch each collection you just need a single call to fetch any collection now:
client.speakers #returns a Speaker collection
client.talks #returns a Talk collection
client.workshops #returns a Workshop collection
client.events #returns a Event collection
client.posts #returns a Post collection
client.job_offers #returns a JobOffer collection
client.sponsors #returns a Sponsor collection
- Fork it
- 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 new Pull Request