eventbrite-client 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -0
- data/eventbrite-client.gemspec +1 -1
- data/lib/eventbrite-client.rb +4 -4
- metadata +1 -1
data/README.md
CHANGED
@@ -49,6 +49,8 @@ Rendering an event in html as a [ticketWidget](http://www.eventbrite.com/t/how-t
|
|
49
49
|
response = eb_client.event_get({ id: 1848891083})
|
50
50
|
widget_html = EventbriteWidgets::ticketWidget(response['event'])
|
51
51
|
|
52
|
+
Additional widget examples are available [on developer.eventbrite.com](http://developer.eventbrite.com/doc/widgets/#ruby)
|
53
|
+
|
52
54
|
##Resources##
|
53
55
|
* API Documentation - <http://developer.eventbrite.com/doc/>
|
54
56
|
* API QuickStart Guide - <http://developer.eventbrite.com/doc/getting-started/>
|
data/eventbrite-client.gemspec
CHANGED
data/lib/eventbrite-client.rb
CHANGED
@@ -14,13 +14,13 @@ class EventbriteClient
|
|
14
14
|
#use api_key OR api_key + user_key OR api_key+email+pass
|
15
15
|
if auth_tokens.include? :user_key
|
16
16
|
# read/write access on the user account associated with :user_key
|
17
|
-
@auth = {app_key
|
17
|
+
@auth = {:app_key => auth_tokens[:app_key], :user_key => auth_tokens[:user_key]}
|
18
18
|
elsif auth_tokens.include?(:user) && auth_tokens.include?(:password)
|
19
19
|
# read/write access on the user account matching this login info
|
20
|
-
@auth = {app_key
|
20
|
+
@auth = {:app_key => auth_tokens[:app_key], :user => auth_tokens[:user], :password => auth_tokens[:password]}
|
21
21
|
else
|
22
22
|
# read-only access to public data
|
23
|
-
@auth = {app_key
|
23
|
+
@auth = {:app_key => auth_tokens[:app_key]}
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -31,7 +31,7 @@ class EventbriteClient
|
|
31
31
|
def method_request( method, params )
|
32
32
|
#merge auth params into our request querystring
|
33
33
|
querystring = @auth.merge( params.is_a?(Hash) ? params : {} )
|
34
|
-
resp = self.class.get("/#{@data_type}/#{method.to_s}",{query
|
34
|
+
resp = self.class.get("/#{@data_type}/#{method.to_s}",{:query => querystring})
|
35
35
|
if resp['error']
|
36
36
|
raise RuntimeError, resp['error']['error_message'], caller[1..-1]
|
37
37
|
end
|