Permalink
Browse files

changing internal ruby hash syntax to add ruby1.8 support

  • Loading branch information...
1 parent 68896ad commit e64cbfaa8efd973199d6e0482a63d1c88dad3830 @ryanj ryanj committed Jul 12, 2012
Showing with 7 additions and 5 deletions.
  1. +2 −0 README.md
  2. +1 −1 eventbrite-client.gemspec
  3. +4 −4 lib/eventbrite-client.rb
View
@@ -49,6 +49,8 @@ Rendering an event in html as a [ticketWidget](http://www.eventbrite.com/t/how-t
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 - <http://developer.eventbrite.com/doc/>
* API QuickStart Guide - <http://developer.eventbrite.com/doc/getting-started/>
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{eventbrite-client}
- s.version = "0.1.2"
+ s.version = "0.1.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ryan Jarvinen"]
@@ -14,13 +14,13 @@ def initialize( auth_tokens )
#use api_key OR api_key + user_key OR api_key+email+pass
if auth_tokens.include? :user_key
# read/write access on the user account associated with :user_key
- @auth = {app_key: auth_tokens[:app_key], user_key: auth_tokens[:user_key]}
+ @auth = {:app_key => auth_tokens[:app_key], :user_key => auth_tokens[:user_key]}
elsif auth_tokens.include?(:user) && auth_tokens.include?(:password)
# read/write access on the user account matching this login info
- @auth = {app_key: auth_tokens[:app_key], user: auth_tokens[:user], :password => auth_tokens[:password]}
+ @auth = {:app_key => auth_tokens[:app_key], :user => auth_tokens[:user], :password => auth_tokens[:password]}
else
# read-only access to public data
- @auth = {app_key: auth_tokens[:app_key]}
+ @auth = {:app_key => auth_tokens[:app_key]}
end
end
end
@@ -31,7 +31,7 @@ def initialize( auth_tokens )
def method_request( method, params )
#merge auth params into our request querystring
querystring = @auth.merge( params.is_a?(Hash) ? params : {} )
- resp = self.class.get("/#{@data_type}/#{method.to_s}",{query: querystring})
+ resp = self.class.get("/#{@data_type}/#{method.to_s}",{:query => querystring})
if resp['error']
raise RuntimeError, resp['error']['error_message'], caller[1..-1]
end

0 comments on commit e64cbfa

Please sign in to comment.