Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanj/eventbrite-client.rb
A tiny EventBrite API client for ruby
https://github.com/ryanj/eventbrite-client.rb
Last synced: 18 days ago
JSON representation
A tiny EventBrite API client for ruby
- Host: GitHub
- URL: https://github.com/ryanj/eventbrite-client.rb
- Owner: ryanj
- License: mit
- Created: 2011-09-01T18:32:52.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-07-26T06:22:53.000Z (over 12 years ago)
- Last Synced: 2024-10-11T00:12:53.255Z (about 1 month ago)
- Language: Ruby
- Homepage: http://eventbrite.github.com
- Size: 112 KB
- Stars: 25
- Watchers: 4
- Forks: 48
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#eventbrite-client.rb#
##Description##
A tiny ruby-based http client for the Eventbrite APIFor the latest information on this project, take a look at:
* [This project's source code repo](http://github.com/eventbrite/eventbrite-client.rb/)
* [The Eventbrite API documentation](http://developer.eventbrite.com/doc/)##Usage Examples##
###Installation via rubygems ###
gem install eventbrite-client
###Loading the Eventbrite API Client library code###
require 'eventbrite-client'
###Initializing the client###
Your API / Application key is required to initialize the client - http://eventbrite.com/api/keySet your user_key if you want to access private data - http://eventbrite.com/userkeyapi
eb_auth_tokens = { app_key: 'YOUR_APP_KEY',
user_key: 'YOUR_USER_KEY'}
eb_client = EventbriteClient.new(eb_auth_tokens)###Initializing the client using an OAuth2.0 access_token###
You can also initialize our API client using an OAuth2.0 `access_token`, like this:eb_client = EventbriteClient.new({ access_token: 'YOUR_USER_ACCESS_TOKEN'})
###Calling API methods###
See [Eventbrite's API method documentation](http://developer.eventbrite.com/doc/) for more information about the list of available client methods.Here is an example using the API's [user_list_events](http://developer.eventbrite.com/doc/users/user_list_events/) method:
response = eb_client.user_list_events()
The [event_get](http://developer.eventbrite.com/doc/events/event_get/) API call should look like this:
response = eb_client.event_get({ id: 1848891083})
### Widgets ###
Rendering an event in html as a [ticketWidget](http://www.eventbrite.com/t/how-to-use-ticket-widget) is easy:response = eb_client.event_get({ id: 1848891083})
widget_html = EventbriteWidgets::ticketWidget(response['event'])Additional widget examples are available [on developer.eventbrite.com](http://developer.eventbrite.com/doc/widgets/#ruby)
##Resources##
* API Documentation -
* API QuickStart Guide -
* Eventbrite Open Source -
* Eventbrite App Showcase -
* 0.3x source -
* 0.2x source -