eventbrite_gateway 0.0.1.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/Guardfile +9 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +10 -0
- data/eventbrite_gateway.gemspec +32 -0
- data/lib/eventbrite_gateway.rb +7 -0
- data/lib/eventbrite_gateway/api_error.rb +10 -0
- data/lib/eventbrite_gateway/client.rb +22 -0
- data/lib/eventbrite_gateway/gateway.rb +41 -0
- data/lib/eventbrite_gateway/version.rb +3 -0
- data/spec/assets/user_list_events.json +1 -0
- data/spec/assets/user_list_tickets.json +1 -0
- data/spec/cassettes/AuthenticationError.yml +58 -0
- data/spec/cassettes/NotFound.yml +58 -0
- data/spec/cassettes/RequestError.yml +58 -0
- data/spec/eventbrite_gateway/client_spec.rb +39 -0
- data/spec/eventbrite_gateway/gateway_spec.rb +34 -0
- data/spec/eventbrite_gateway_spec.rb +4 -0
- data/spec/spec_helper.rb +24 -0
- metadata +237 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :minitest do
|
5
|
+
# with Minitest::Spec
|
6
|
+
watch(%r{^spec/(.*)_spec\.rb$})
|
7
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
8
|
+
watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
|
9
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Chris Radford
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# EventbriteGateway
|
2
|
+
|
3
|
+
EventbriteGateway provides a gateway model to the eventbrite-client gem, converting the returned output into simple Ruby Hashes and Arrays, as well as improving the overall error handling by extending the provided eventbrite-client instances to use more meaningful exceptions.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'eventbrite_gateway'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install eventbrite_gateway
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
gateway = EventbriteGateway.new(eventbrite_client)
|
23
|
+
gateway.user_list_events
|
24
|
+
```
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'eventbrite_gateway/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "eventbrite_gateway"
|
8
|
+
spec.version = EventbriteGateway::VERSION
|
9
|
+
spec.authors = ["Chris Radford"]
|
10
|
+
spec.email = ["chris@chrisradford.com"]
|
11
|
+
spec.description = %q{A gateway implementation for returning Ruby Hashes from the EventBrite API based upon the eventbrite-client gem}
|
12
|
+
spec.summary = %q{A gateway class for the Eventbrite API}
|
13
|
+
spec.homepage = "https://github.com/chrisradford/eventbrite_gateway"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "eventbrite-client", "~> 0.1"
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency "minitest"
|
26
|
+
spec.add_development_dependency "dotenv"
|
27
|
+
spec.add_development_dependency "vcr"
|
28
|
+
spec.add_development_dependency "webmock"
|
29
|
+
spec.add_development_dependency "guard"
|
30
|
+
spec.add_development_dependency "guard-minitest"
|
31
|
+
spec.add_development_dependency "terminal-notifier-guard"
|
32
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module EventbriteGateway
|
2
|
+
module APIError
|
3
|
+
class NotFound < RuntimeError; end;
|
4
|
+
class AuthenticationError < RuntimeError; end;
|
5
|
+
class ApplicationKeyError < RuntimeError; end;
|
6
|
+
class RequestError < RuntimeError; end;
|
7
|
+
# Errors not previously known about from the API
|
8
|
+
class UndefinedError < RuntimeError; end;
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module EventbriteGateway
|
2
|
+
module Client
|
3
|
+
def method_request method, params
|
4
|
+
querystring = @auth.merge( params.is_a?(Hash) ? params : {} )
|
5
|
+
resp = self.class.get("/#{@data_type}/#{method.to_s}",{:query => querystring})
|
6
|
+
if resp['error']
|
7
|
+
handle_error resp
|
8
|
+
end
|
9
|
+
return resp
|
10
|
+
end
|
11
|
+
|
12
|
+
def handle_error resp
|
13
|
+
class_name = "#{resp['error']['error_type'].gsub(/\s+/, '')}"
|
14
|
+
if EventbriteGateway::APIError.const_defined?(class_name)
|
15
|
+
klass = EventbriteGateway::APIError.const_get(class_name)
|
16
|
+
else
|
17
|
+
klass = EventbriteGateway::APIError::UnknownError
|
18
|
+
end
|
19
|
+
raise klass, resp['error']['error_message'], caller[1..-1]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module EventbriteGateway
|
2
|
+
class Gateway
|
3
|
+
COLLECTION_METHODS = {
|
4
|
+
organizer_list_events: 'events',
|
5
|
+
user_list_events: 'events',
|
6
|
+
user_list_tickets: 'user_tickets',
|
7
|
+
user_list_venues: 'user_venues',
|
8
|
+
user_list_organizers: 'organzers',
|
9
|
+
}
|
10
|
+
|
11
|
+
def initialize client
|
12
|
+
@client = client.extend EventbriteGateway::Client
|
13
|
+
end
|
14
|
+
|
15
|
+
def collection_method method_name, *args, &block
|
16
|
+
response = @client.send(method_name, *args, &block)
|
17
|
+
key = COLLECTION_METHODS.fetch(method_name) do
|
18
|
+
method_name.split('_')[-1].to_s
|
19
|
+
end
|
20
|
+
response[key]
|
21
|
+
rescue RuntimeError => e
|
22
|
+
[]
|
23
|
+
end
|
24
|
+
|
25
|
+
def object_method method_name, *args, &block
|
26
|
+
response = @client.call(method_name, *args, &block)
|
27
|
+
key = method_name.split('_')[-1].to_s
|
28
|
+
response[key]
|
29
|
+
rescue RuntimeError => e
|
30
|
+
{}
|
31
|
+
end
|
32
|
+
|
33
|
+
def method_missing method_name, *args, &block
|
34
|
+
if COLLECTION_METHODS.keys.include? method_name
|
35
|
+
collection_method method_name, *args, &block
|
36
|
+
else
|
37
|
+
object_method method_name, *args, &block
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{"events":[{"event":{"box_header_text_color":"404040","locale":"en_US","link_color":"ff8000","box_background_color":"000000","box_border_color":"dedede","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"ff8000","id":8196151911,"category":"testing","box_header_background_color":"fafafa","capacity":0,"num_attendee_rows":null,"title":"Test Event","start_date":"2013-10-15 19:00:00","status":"Completed","description":"<P>This is test event data</P>","end_date":"2013-10-15 22:00:00","tags":"","timezone_offset":"GMT-0700","text_color":"fff000","title_text_color":"ff0000","password":"","tickets":[{"ticket":{"description":"","end_date":"2013-10-15 18:00:00","min":1,"max":null,"price":"0.00","quantity_sold":0,"visible":"true","currency":"USD","quantity_available":1000,"display_price":"0.00","type":0,"id":20513059,"include_fee":"false","name":"General Admission"}}],"created":"2013-09-05 11:55:31","url":"https://www.eventbrite.com/e/test-event-tickets-8196151911?ref=ebapi","box_text_color":"444444","privacy":"Private","venue":{"city":"San Francisco","name":"Eventbrite HQ","country":"United States","region":"CA","longitude":-122.399631,"postal_code":"94107","address_2":"","address":"651 Brannan St","latitude":37.775227,"country_code":"US","id":4176999,"Lat-Long":"37.775227 / -122.399631"},"modified":"2013-11-22 12:57:21","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9500974671,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-11-25 00:00:00","status":"Draft","description":"","end_date":"2013-11-25 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-11-24 08:00:20","url":"https://www.eventbrite.com/e/movember-tickets-9500974671?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-11-24 08:00:20","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9500978683,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-11-25 00:00:00","status":"Draft","description":"","end_date":"2013-11-25 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-11-24 08:01:17","url":"https://www.eventbrite.com/e/movember-tickets-9500978683?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-11-24 08:01:17","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9500990719,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-11-25 00:00:00","status":"Draft","description":"","end_date":"2013-11-25 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-11-24 08:02:13","url":"https://www.eventbrite.com/e/movember-tickets-9500990719?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-11-24 08:02:16","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9501020809,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-11-25 00:00:00","status":"Draft","description":"","end_date":"2013-11-25 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-11-24 08:06:26","url":"https://www.eventbrite.com/e/movember-tickets-9501020809?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-11-24 08:06:29","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9501022815,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-11-25 00:00:00","status":"Draft","description":"","end_date":"2013-11-25 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-11-24 08:06:31","url":"https://www.eventbrite.com/e/movember-tickets-9501022815?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-11-24 08:06:36","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9735536251,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-10 00:00:00","status":"Draft","description":"","end_date":"2013-12-10 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-09 13:48:17","url":"https://www.eventbrite.com/e/movember-tickets-9735536251?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-09 13:48:20","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9735538257,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-10 00:00:00","status":"Draft","description":"","end_date":"2013-12-10 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-09 13:48:22","url":"https://www.eventbrite.com/e/movember-tickets-9735538257?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-09 13:48:25","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9836025818,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-16 00:00:00","status":"Draft","description":"","end_date":"2013-12-16 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-15 12:59:36","url":"https://www.eventbrite.com/e/movember-tickets-9836025818?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-15 13:23:48","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9836029830,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-16 00:00:00","status":"Draft","description":"","end_date":"2013-12-16 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-15 12:59:41","url":"https://www.eventbrite.com/e/movember-tickets-9836029830?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-15 12:59:44","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9836035848,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-16 00:00:00","status":"Draft","description":"","end_date":"2013-12-16 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-15 13:00:15","url":"https://www.eventbrite.com/e/movember-tickets-9836035848?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-15 13:00:19","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9836037854,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-16 00:00:00","status":"Draft","description":"","end_date":"2013-12-16 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-15 13:00:20","url":"https://www.eventbrite.com/e/movember-tickets-9836037854?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-15 13:00:23","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9836053902,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-16 00:00:00","status":"Draft","description":"","end_date":"2013-12-16 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-15 13:01:33","url":"https://www.eventbrite.com/e/movember-tickets-9836053902?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-15 13:01:37","repeats":"no"}},{"event":{"box_header_text_color":"404040","locale":"en_US","link_color":"0f90ba","box_background_color":"ffffff","box_border_color":"dedede","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"f7f7f7","id":9203575141,"category":"","box_header_background_color":"fafafa","capacity":0,"num_attendee_rows":null,"title":"Second Test Event","start_date":"2013-12-16 19:00:00","status":"Draft","description":"","end_date":"2013-12-16 22:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"404040","title_text_color":"","password":"","tickets":[{"ticket":{"description":"","end_date":"2013-12-16 18:00:00","min":1,"max":null,"price":"0.00","quantity_sold":0,"visible":"true","currency":"USD","quantity_available":100,"display_price":"0.00","type":0,"id":21734611,"include_fee":"false","name":"Your Ticket"}}],"created":"2013-11-06 07:53:09","url":"https://www.eventbrite.com/e/second-test-event-tickets-9203575141?ref=ebapi","box_text_color":"666666","privacy":"Private","modified":"2013-12-16 00:44:03","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840306622,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:30:46","url":"https://www.eventbrite.com/e/movember-tickets-9840306622?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:30:48","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840310634,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:30:49","url":"https://www.eventbrite.com/e/movember-tickets-9840310634?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:30:50","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840314646,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:31:39","url":"https://www.eventbrite.com/e/movember-tickets-9840314646?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:31:40","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840316652,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:31:41","url":"https://www.eventbrite.com/e/movember-tickets-9840316652?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:31:43","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840322670,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:32:05","url":"https://www.eventbrite.com/e/movember-tickets-9840322670?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:32:06","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9840324676,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-17 00:00:00","status":"Draft","description":"","end_date":"2013-12-17 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-16 00:32:07","url":"https://www.eventbrite.com/e/movember-tickets-9840324676?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-16 00:32:09","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9867915200,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-18 00:00:00","status":"Draft","description":"","end_date":"2013-12-18 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-17 11:40:16","url":"https://www.eventbrite.com/e/movember-tickets-9867915200?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-17 11:40:20","repeats":"no"}},{"event":{"box_header_text_color":"005580","locale":"en_US","link_color":"EE6600","box_background_color":"FFFFFF","box_border_color":"D5D5D3","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"background_color":"FFFFFF","id":9867919212,"category":"","box_header_background_color":"EFEFEF","capacity":0,"num_attendee_rows":null,"title":"Movember","start_date":"2013-12-18 00:00:00","status":"Draft","description":"","end_date":"2013-12-18 00:00:00","tags":"","timezone_offset":"GMT-0800","text_color":"005580","title_text_color":"","password":"","created":"2013-12-17 11:40:24","url":"https://www.eventbrite.com/e/movember-tickets-9867919212?ref=ebapi","box_text_color":"000000","privacy":"Private","modified":"2013-12-17 11:40:56","repeats":"no"}}]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"user_tickets":[{"user":{"id":71513061,"email":"mitch+brands@eventbrite.com"}},{"orders":[{"order":{"status":"Order Completed","gross":"0.00","first_name":"Chris","last_name":"Radford","attendees":[{"attendee":{"status":"Attending","first_name":"Chris","last_name":"Radford","created":"2014-01-18 09:29:22","modified":"2014-01-18 09:29:24","id":310622543}}],"created":"2014-01-18 09:29:22","event":{"description":"","end_date":"2014-02-27 22:00:00","title":"Test Event","url":"https://www.eventbrite.com/e/test-event-tickets-10237557811","privacy":"Public","start_date":"2014-02-27 19:00:00","logo_ssl":"https://www.eventbrite.com/php/logo.php?id=","logo":"http://eventbrite-s3.s3.amazonaws.com/eventlogos/71513061/","timezone":"America/Los_Angeles","organizer":{"url":"http://www.eventbrite.com/o/4627659437","description":"","long_description":"","id":4627659437,"name":""},"id":10237557811},"modified":"2014-01-18 09:29:24","delivery_method":"eTicket","currency":"USD","payment_type":"free","id":244982321}}]}]}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.eventbrite.com/json/user_list_events?
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer TESTING
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Sat, 18 Jan 2014 23:47:31 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Expires:
|
28
|
+
- Fri, 01 Jan 1990 00:00:00 GMT
|
29
|
+
X-Service:
|
30
|
+
- djc
|
31
|
+
Pragma:
|
32
|
+
- no-cache
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache, must-revalidate, no-cache="Set-Cookie", private
|
35
|
+
P3p:
|
36
|
+
- CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
|
37
|
+
Set-Cookie:
|
38
|
+
- AN=; Domain=.eventbrite.com; expires=Thu, 01-Jan-1970 00:00:00 GMT; httponly;
|
39
|
+
Path=/
|
40
|
+
- G=v%3D1%26i%3D415aed07-709f-4d12-ae11-ad6d46d9d1b6%26a%3D3e1%26s%3DAPDvTK6FpxzPhT8nBnkXHhWOW2BQgyBKhg;
|
41
|
+
Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:31 GMT; httponly; Path=/
|
42
|
+
- SP=AGQgbbmzFR7J52IO5d1MAlcMQJZSeBcqzlryP2ny0GKTaDWm919UAP5UvjP0oek2LJKf4llRBKloo7YnkxvSKM0UGRavbxsK6eD9x6bTZO3M6uQ7MJXz2_lOxQtmxEWWJW9nkWioAa_-sQ-QFwH3neFLFZQdEWOk8u-6wx-AsQlM5foMsnU7LMrziWMDxQz9SfWUD9W9OFwfcqQeT1-igMA9r6u6fTHPHBagylOdumVaFx4htD-a1A4;
|
43
|
+
Domain=.eventbrite.com; httponly; Path=/
|
44
|
+
- SS=AE3DLHR3Pen1HfiT9gIXufvN3G7bzxVc2w; Domain=.eventbrite.com; httponly; Path=/;
|
45
|
+
secure
|
46
|
+
- eblang=lo%3Den_US%26la%3Den-us; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015
|
47
|
+
23:47:31 GMT; httponly; Path=/
|
48
|
+
- mgref=typeins; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:31 GMT;
|
49
|
+
httponly; Max-Age=31536000; Path=/
|
50
|
+
- mgrefby=; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:31 GMT; httponly;
|
51
|
+
Max-Age=31536000; Path=/
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"error": {"error_type": "Authentication Error", "error_message":
|
55
|
+
"Invalid oauth token"}}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Sat, 18 Jan 2014 23:47:31 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.eventbrite.com/json/event_get?
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer FFWGYODVYSN2LXMCNFNW
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Sat, 18 Jan 2014 23:47:33 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Expires:
|
28
|
+
- Fri, 01 Jan 1990 00:00:00 GMT
|
29
|
+
X-Service:
|
30
|
+
- djc
|
31
|
+
Pragma:
|
32
|
+
- no-cache
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache, must-revalidate, no-cache="Set-Cookie", private
|
35
|
+
P3p:
|
36
|
+
- CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
|
37
|
+
Set-Cookie:
|
38
|
+
- AN=; Domain=.eventbrite.com; expires=Thu, 01-Jan-1970 00:00:00 GMT; httponly;
|
39
|
+
Path=/
|
40
|
+
- G=v%3D1%26i%3Df04e24dc-f17b-45cd-a534-4068c53f62f2%26a%3D3e1%26s%3DAPDvTK7KTcsQgVxlxGxTFecF6GHL5mFCoA;
|
41
|
+
Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:33 GMT; httponly; Path=/
|
42
|
+
- SP=AGQgbbkWoU82w26kTpdu2cbwffB1UWIywjNQ8PBDvwMqIJx-5NUqeKVVaNQwxj5sZwX5Smsiko0CtpBTXvqpFZsWWimIarjeVFTTC46tItIOgtDRF4AhRM6SK7cd-boJGI-4rqH9y8tV78JND7gq2vs4nHlGtVV7lcQjQjFG5eMDqf8yeGIrNyPUufPo0P8jRH_tp78mwfUBdLPvfkeTU4as54IxvmgUDhQnifynPIaUkUfobmFEx4c;
|
43
|
+
Domain=.eventbrite.com; httponly; Path=/
|
44
|
+
- SS=AE3DLHSwD0qx_lfU8uKPjaZ9-geNvsxZTg; Domain=.eventbrite.com; httponly; Path=/;
|
45
|
+
secure
|
46
|
+
- eblang=lo%3Den_US%26la%3Den-us; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015
|
47
|
+
23:47:33 GMT; httponly; Path=/
|
48
|
+
- mgref=typeins; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:33 GMT;
|
49
|
+
httponly; Max-Age=31536000; Path=/
|
50
|
+
- mgrefby=; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:33 GMT; httponly;
|
51
|
+
Max-Age=31536000; Path=/
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"error": {"error_type": "Not Found", "error_message": "No records
|
55
|
+
were found with the given parameters."}}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Sat, 18 Jan 2014 23:47:33 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.eventbrite.com/json/not_an_endpoint?
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer TESTING
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Sat, 18 Jan 2014 23:47:32 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Expires:
|
28
|
+
- Fri, 01 Jan 1990 00:00:00 GMT
|
29
|
+
X-Service:
|
30
|
+
- djc
|
31
|
+
Pragma:
|
32
|
+
- no-cache
|
33
|
+
Cache-Control:
|
34
|
+
- no-cache, must-revalidate, no-cache="Set-Cookie", private
|
35
|
+
P3p:
|
36
|
+
- CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
|
37
|
+
Set-Cookie:
|
38
|
+
- AN=; Domain=.eventbrite.com; expires=Thu, 01-Jan-1970 00:00:00 GMT; httponly;
|
39
|
+
Path=/
|
40
|
+
- G=v%3D1%26i%3D7d0cde85-514b-49ce-88e2-a327c1d2ab3c%26a%3D3e1%26s%3DAPDvTK4jvi41Jou62RTPk5Pr56xi7zZWxw;
|
41
|
+
Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:32 GMT; httponly; Path=/
|
42
|
+
- SP=AGQgbbmoOMCIuD9oaYuKwNoWpY_ON-yEwVIRZUqJmUTYAjB7BNne_941yQt4_vIG6I_791fZ6SRF95XtNhwUaDx2ZQpAPDJdI5GZVRkMXnmDWNCCKQuw3obf4fyVSoBjS6EV847ZTTa679E0aPasWeB1zRVC4p90tjOwLfWp5-ELfc34IT9iOGv3LUm1jC1cMSLOw3bZZi5XTVUZQTByXevj0G6rRrZzYC1LGJ7y83tYBqJC12m3KnE;
|
43
|
+
Domain=.eventbrite.com; httponly; Path=/
|
44
|
+
- SS=AE3DLHQuQxkT_AGqqE1ET-E29SJllQ_saQ; Domain=.eventbrite.com; httponly; Path=/;
|
45
|
+
secure
|
46
|
+
- eblang=lo%3Den_US%26la%3Den-us; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015
|
47
|
+
23:47:32 GMT; httponly; Path=/
|
48
|
+
- mgref=typeins; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:32 GMT;
|
49
|
+
httponly; Max-Age=31536000; Path=/
|
50
|
+
- mgrefby=; Domain=.eventbrite.com; expires=Sun, 18-Jan-2015 23:47:32 GMT; httponly;
|
51
|
+
Max-Age=31536000; Path=/
|
52
|
+
body:
|
53
|
+
encoding: US-ASCII
|
54
|
+
string: ! '{"error": {"error_type": "Request Error", "error_message": "Not a
|
55
|
+
valid API command. Please check the documentation."}}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Sat, 18 Jan 2014 23:47:32 GMT
|
58
|
+
recorded_with: VCR 2.8.0
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
require 'eventbrite-client'
|
3
|
+
|
4
|
+
describe EventbriteGateway::Client do
|
5
|
+
before do
|
6
|
+
@client = EventbriteClient.new(access_token: 'TESTING').
|
7
|
+
extend(EventbriteGateway::Client)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "takes and extends an EventbriteClient" do
|
11
|
+
@client.must_be_instance_of EventbriteClient
|
12
|
+
end
|
13
|
+
|
14
|
+
it "raises AuthenticationError for bad access tokens" do
|
15
|
+
lambda do
|
16
|
+
VCR.use_cassette 'AuthenticationError' do
|
17
|
+
@client.user_list_events
|
18
|
+
end
|
19
|
+
end.must_raise EventbriteGateway::APIError::AuthenticationError
|
20
|
+
end
|
21
|
+
|
22
|
+
it "raises RequestError for invalid API endpoints" do
|
23
|
+
lambda do
|
24
|
+
VCR.use_cassette 'RequestError' do
|
25
|
+
@client.not_an_endpoint
|
26
|
+
end
|
27
|
+
end.must_raise EventbriteGateway::APIError::RequestError
|
28
|
+
end
|
29
|
+
|
30
|
+
it "raises x for invalid application key" do
|
31
|
+
lambda do
|
32
|
+
VCR.use_cassette 'NotFound' do
|
33
|
+
EventbriteClient.new(access_token: ENV['EB_ACCESS_TOKEN']).
|
34
|
+
extend(EventbriteGateway::Client).
|
35
|
+
event_get '123456789'
|
36
|
+
end
|
37
|
+
end.must_raise EventbriteGateway::APIError::NotFound
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe EventbriteGateway::Gateway do
|
4
|
+
it "cannot be created without an evenbrite-client" do
|
5
|
+
lambda {EventbriteGateway::Gateway.new}.must_raise ArgumentError
|
6
|
+
end
|
7
|
+
|
8
|
+
it "takes an eventbrite-client on creation" do
|
9
|
+
EventbriteGateway::Gateway.new(EBClient.new(nil)).
|
10
|
+
must_be_instance_of EventbriteGateway::Gateway
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "User API methods" do
|
14
|
+
it "returns an Array for User events" do
|
15
|
+
EventbriteGateway::Gateway.new(EBClient.new(:user_list_events)).
|
16
|
+
user_list_events.must_be_instance_of Array
|
17
|
+
end
|
18
|
+
|
19
|
+
it "returns an empty Array for empty User events" do
|
20
|
+
EventbriteGateway::Gateway.new(EBClient.new(nil)).
|
21
|
+
user_list_events.must_be_instance_of Array
|
22
|
+
end
|
23
|
+
|
24
|
+
it "returns an Array for User tickets" do
|
25
|
+
EventbriteGateway::Gateway.new(EBClient.new(:user_list_tickets)).
|
26
|
+
user_list_tickets.must_be_instance_of Array
|
27
|
+
end
|
28
|
+
|
29
|
+
it "return an Arry for empty User tickets" do
|
30
|
+
EventbriteGateway::Gateway.new(EBClient.new(nil)).
|
31
|
+
user_list_tickets.must_be_instance_of Array
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'minitest/spec'
|
3
|
+
require 'json'
|
4
|
+
require 'eventbrite_gateway'
|
5
|
+
require 'dotenv'
|
6
|
+
require 'vcr'
|
7
|
+
|
8
|
+
VCR.configure do |c|
|
9
|
+
c.cassette_library_dir = 'spec/cassettes'
|
10
|
+
c.hook_into :webmock
|
11
|
+
end
|
12
|
+
|
13
|
+
Dotenv.load
|
14
|
+
|
15
|
+
EBClient = Struct.new(:file_name) do
|
16
|
+
def method_missing method_name, *args, &block
|
17
|
+
if file_name
|
18
|
+
file = File.read "spec/assets/#{file_name}.json"
|
19
|
+
JSON.parse file
|
20
|
+
else
|
21
|
+
raise RuntimeError, 'No records were found with the given parameters', caller[1..-1]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,237 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eventbrite_gateway
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.beta
|
5
|
+
prerelease: 6
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Chris Radford
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-01-18 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: eventbrite-client
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.1'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.5'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.5'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: minitest
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: dotenv
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: vcr
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: webmock
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: guard
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: guard-minitest
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: terminal-notifier-guard
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
description: A gateway implementation for returning Ruby Hashes from the EventBrite
|
175
|
+
API based upon the eventbrite-client gem
|
176
|
+
email:
|
177
|
+
- chris@chrisradford.com
|
178
|
+
executables: []
|
179
|
+
extensions: []
|
180
|
+
extra_rdoc_files: []
|
181
|
+
files:
|
182
|
+
- .gitignore
|
183
|
+
- Gemfile
|
184
|
+
- Guardfile
|
185
|
+
- LICENSE.txt
|
186
|
+
- README.md
|
187
|
+
- Rakefile
|
188
|
+
- eventbrite_gateway.gemspec
|
189
|
+
- lib/eventbrite_gateway.rb
|
190
|
+
- lib/eventbrite_gateway/api_error.rb
|
191
|
+
- lib/eventbrite_gateway/client.rb
|
192
|
+
- lib/eventbrite_gateway/gateway.rb
|
193
|
+
- lib/eventbrite_gateway/version.rb
|
194
|
+
- spec/assets/user_list_events.json
|
195
|
+
- spec/assets/user_list_tickets.json
|
196
|
+
- spec/cassettes/AuthenticationError.yml
|
197
|
+
- spec/cassettes/NotFound.yml
|
198
|
+
- spec/cassettes/RequestError.yml
|
199
|
+
- spec/eventbrite_gateway/client_spec.rb
|
200
|
+
- spec/eventbrite_gateway/gateway_spec.rb
|
201
|
+
- spec/eventbrite_gateway_spec.rb
|
202
|
+
- spec/spec_helper.rb
|
203
|
+
homepage: https://github.com/chrisradford/eventbrite_gateway
|
204
|
+
licenses:
|
205
|
+
- MIT
|
206
|
+
post_install_message:
|
207
|
+
rdoc_options: []
|
208
|
+
require_paths:
|
209
|
+
- lib
|
210
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
211
|
+
none: false
|
212
|
+
requirements:
|
213
|
+
- - ! '>='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ! '>'
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 1.3.1
|
222
|
+
requirements: []
|
223
|
+
rubyforge_project:
|
224
|
+
rubygems_version: 1.8.23
|
225
|
+
signing_key:
|
226
|
+
specification_version: 3
|
227
|
+
summary: A gateway class for the Eventbrite API
|
228
|
+
test_files:
|
229
|
+
- spec/assets/user_list_events.json
|
230
|
+
- spec/assets/user_list_tickets.json
|
231
|
+
- spec/cassettes/AuthenticationError.yml
|
232
|
+
- spec/cassettes/NotFound.yml
|
233
|
+
- spec/cassettes/RequestError.yml
|
234
|
+
- spec/eventbrite_gateway/client_spec.rb
|
235
|
+
- spec/eventbrite_gateway/gateway_spec.rb
|
236
|
+
- spec/eventbrite_gateway_spec.rb
|
237
|
+
- spec/spec_helper.rb
|