Skip to content
Browse files

updating the example scripts to match the hash notation format offere…

…d in ruby1.9
  • Loading branch information...
1 parent 7a1853b commit f01036694d7c4e2749384cf6d61f67720d3e34b8 @ryanj ryanj committed Jun 15, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
10 README.md
@@ -23,14 +23,14 @@ Your API / Application key is required to initialize the client - http://eventbr
Set 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_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'})
+ 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.
@@ -41,12 +41,12 @@ Here is an example using the API's [user_list_events](http://developer.eventbrit
The [event_get](http://developer.eventbrite.com/doc/events/event_get/) API call should look like this:
- response = eb_client.event_get({'id' => 1848891083})
+ 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})
+ response = eb_client.event_get({ id: 1848891083})
widget_html = EventbriteWidgets::ticketWidget(response['event'])
##Resources##

0 comments on commit f010366

Please sign in to comment.
Something went wrong with that request. Please try again.