Getevents Build Status Code Climate Test Coverage

API wrapper for getevents.co.

Installation

Add this line to your application's Gemfile:

gem 'getevents'

And then execute:

$ bundle

Or install it yourself as:

$ gem install getevents

Usage

Initialisation

You need to signup in order to get credentials. Then, initialize your client:

Getevents.configure do |config|
  config. = GETEVENTS_ACCOUNT_ID
  config.token      = GETEVENTS_TOKEN
end

For testing purpose inside your application:

Getevents.configure do |config|
  config.test_mode = true
end

It will render empty arrays for each methods.

Location

locations = Getevents::Location.search('Paris')
location = locations.first

puts location.country
=> "France"
puts location.lng
=> -1.55336

Event

events = Getevents::Event.search(47.21, -1.55, { start_date: "20150921" })
event = events.first

puts event.name
=> "La fĂȘte de la grenouille"
puts event.start_date
=> "2015-09-21T00:00:00.000Z"

Eventlisting

TODO (not yet implemented)

Eventlisting curate

TODO (not yet implemented)

Contributing

  1. Fork it ( https://github.com/blackbirdco/getevents/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Run tests

$ GETEVENTS_ACCOUNT_ID=YOUR_ACCOUNT_ID GETEVENTS_TOKEN=YOUR_TOKEN rspec spec/