eventbrite-api 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -5
- data/Gemfile +8 -7
- data/Gemfile.lock +59 -53
- data/README.md +1 -1
- data/VERSION +1 -1
- data/eventbrite-api.gemspec +24 -19
- data/lib/eventbrite-api.rb +4 -1
- data/lib/eventbrite/api/client.rb +3 -1
- data/lib/eventbrite/api/helper.rb +0 -7
- data/lib/eventbrite/api/model/base.rb +4 -4
- data/lib/eventbrite/api/model/user_contact.rb +11 -0
- data/lib/eventbrite/api/model/user_contact_list.rb +11 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140621c5c9c7a54c96c87598def7bd942119e260
|
4
|
+
data.tar.gz: 7263bb0a70ffffb170dc4ca88eddf04eeced0ba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23fe0365e0906dc879a185d14b5f779a3b16e4ef0d639939c82c429039751283e536438d0b6b922288a2878da4f0482164a896ee60a6e2ba0801476d6505f676
|
7
|
+
data.tar.gz: fde00feba5f8d807eb09945ae1869bb97465cfd64ce8a0d102a3002a75b2cda9b136c66b628fd7d0516fc8cda3d452c65ac14962972e8b8cb37769a4dd237c88
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.3.3@eventbrite-api
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
source
|
1
|
+
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem
|
3
|
+
gem 'oauth2'
|
4
|
+
gem 'deep_merge', require: 'deep_merge/rails_compat'
|
4
5
|
|
5
6
|
group :development do
|
6
|
-
gem
|
7
|
+
gem 'jeweler'
|
7
8
|
end
|
8
9
|
|
9
10
|
group :test do
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
11
|
+
gem 'rspec'
|
12
|
+
gem 'webmock'
|
13
|
+
gem 'timecop'
|
14
|
+
gem 'simplecov', require: false
|
14
15
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,90 +1,96 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
addressable (2.
|
5
|
-
builder (3.2.
|
6
|
-
crack (0.4.
|
4
|
+
addressable (2.4.0)
|
5
|
+
builder (3.2.3)
|
6
|
+
crack (0.4.3)
|
7
7
|
safe_yaml (~> 1.0.0)
|
8
|
+
deep_merge (1.1.1)
|
8
9
|
descendants_tracker (0.0.4)
|
9
10
|
thread_safe (~> 0.3, >= 0.3.1)
|
10
|
-
diff-lcs (1.
|
11
|
+
diff-lcs (1.3)
|
11
12
|
docile (1.1.5)
|
12
|
-
faraday (0.9.
|
13
|
+
faraday (0.9.2)
|
13
14
|
multipart-post (>= 1.2, < 3)
|
14
|
-
git (1.
|
15
|
-
github_api (0.
|
16
|
-
addressable (~> 2.
|
15
|
+
git (1.3.0)
|
16
|
+
github_api (0.16.0)
|
17
|
+
addressable (~> 2.4.0)
|
17
18
|
descendants_tracker (~> 0.0.4)
|
18
19
|
faraday (~> 0.8, < 0.10)
|
19
|
-
hashie (>= 3.
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
hashie (3.
|
24
|
-
highline (1.7.
|
25
|
-
jeweler (2.
|
20
|
+
hashie (>= 3.4)
|
21
|
+
mime-types (>= 1.16, < 3.0)
|
22
|
+
oauth2 (~> 1.0)
|
23
|
+
hashdiff (0.3.5)
|
24
|
+
hashie (3.5.6)
|
25
|
+
highline (1.7.8)
|
26
|
+
jeweler (2.3.7)
|
26
27
|
builder
|
27
|
-
bundler (>= 1
|
28
|
+
bundler (>= 1)
|
28
29
|
git (>= 1.2.5)
|
29
|
-
github_api
|
30
|
+
github_api (~> 0.16.0)
|
30
31
|
highline (>= 1.6.15)
|
31
32
|
nokogiri (>= 1.5.10)
|
33
|
+
psych (~> 2.2)
|
32
34
|
rake
|
33
35
|
rdoc
|
34
|
-
|
35
|
-
json (1.
|
36
|
-
jwt (1.
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
semver2
|
37
|
+
json (2.1.0)
|
38
|
+
jwt (1.5.6)
|
39
|
+
mime-types (2.99.3)
|
40
|
+
mini_portile2 (2.2.0)
|
41
|
+
multi_json (1.12.1)
|
42
|
+
multi_xml (0.6.0)
|
40
43
|
multipart-post (2.0.0)
|
41
|
-
nokogiri (1.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
faraday (>= 0.8, < 0.10)
|
44
|
+
nokogiri (1.8.0)
|
45
|
+
mini_portile2 (~> 2.2.0)
|
46
|
+
oauth2 (1.4.0)
|
47
|
+
faraday (>= 0.8, < 0.13)
|
46
48
|
jwt (~> 1.0)
|
47
49
|
multi_json (~> 1.3)
|
48
50
|
multi_xml (~> 0.5)
|
49
|
-
rack (
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
rspec (3.
|
55
|
-
rspec-core (~> 3.
|
56
|
-
rspec-expectations (~> 3.
|
57
|
-
rspec-mocks (~> 3.
|
58
|
-
rspec-core (3.
|
59
|
-
rspec-support (~> 3.
|
60
|
-
rspec-expectations (3.
|
51
|
+
rack (>= 1.2, < 3)
|
52
|
+
psych (2.2.4)
|
53
|
+
rack (2.0.3)
|
54
|
+
rake (12.0.0)
|
55
|
+
rdoc (5.1.0)
|
56
|
+
rspec (3.6.0)
|
57
|
+
rspec-core (~> 3.6.0)
|
58
|
+
rspec-expectations (~> 3.6.0)
|
59
|
+
rspec-mocks (~> 3.6.0)
|
60
|
+
rspec-core (3.6.0)
|
61
|
+
rspec-support (~> 3.6.0)
|
62
|
+
rspec-expectations (3.6.0)
|
61
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
-
rspec-support (~> 3.
|
63
|
-
rspec-mocks (3.
|
64
|
+
rspec-support (~> 3.6.0)
|
65
|
+
rspec-mocks (3.6.0)
|
64
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-support (3.
|
67
|
+
rspec-support (~> 3.6.0)
|
68
|
+
rspec-support (3.6.0)
|
67
69
|
safe_yaml (1.0.4)
|
68
|
-
|
70
|
+
semver2 (3.4.2)
|
71
|
+
simplecov (0.14.1)
|
69
72
|
docile (~> 1.1.0)
|
70
|
-
|
71
|
-
simplecov-html (~> 0.
|
72
|
-
simplecov-html (0.
|
73
|
-
thread_safe (0.3.
|
74
|
-
|
75
|
-
|
76
|
-
webmock (1.20.4)
|
73
|
+
json (>= 1.8, < 3)
|
74
|
+
simplecov-html (~> 0.10.0)
|
75
|
+
simplecov-html (0.10.1)
|
76
|
+
thread_safe (0.3.6)
|
77
|
+
timecop (0.9.1)
|
78
|
+
webmock (3.0.1)
|
77
79
|
addressable (>= 2.3.6)
|
78
80
|
crack (>= 0.3.2)
|
81
|
+
hashdiff
|
79
82
|
|
80
83
|
PLATFORMS
|
81
|
-
java
|
82
84
|
ruby
|
83
85
|
|
84
86
|
DEPENDENCIES
|
87
|
+
deep_merge
|
85
88
|
jeweler
|
86
89
|
oauth2
|
87
90
|
rspec
|
88
91
|
simplecov
|
89
92
|
timecop
|
90
93
|
webmock
|
94
|
+
|
95
|
+
BUNDLED WITH
|
96
|
+
1.15.1
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
eventbrite-api
|
2
2
|
===============
|
3
3
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/
|
4
|
+
[![Build Status](https://secure.travis-ci.org/maestrano/eventbrite-api.png?branch=master)](http://travis-ci.org/maestrano/eventbrite-api)
|
5
5
|
|
6
6
|
## Eventbrite API client
|
7
7
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/eventbrite-api.gemspec
CHANGED
@@ -2,18 +2,18 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: eventbrite-api 0.0.
|
5
|
+
# stub: eventbrite-api 0.0.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
|
-
s.name = "eventbrite-api"
|
9
|
-
s.version = "0.0.
|
8
|
+
s.name = "eventbrite-api".freeze
|
9
|
+
s.version = "0.0.4"
|
10
10
|
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.require_paths = ["lib"]
|
13
|
-
s.authors = ["BrunoChauvet"]
|
14
|
-
s.date = "
|
15
|
-
s.description = "Integrate with Eventbrite API"
|
16
|
-
s.email = "it@maestrano.com"
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib".freeze]
|
13
|
+
s.authors = ["BrunoChauvet".freeze]
|
14
|
+
s.date = "2017-08-08"
|
15
|
+
s.description = "Integrate with Eventbrite API".freeze
|
16
|
+
s.email = "it@maestrano.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
18
18
|
"LICENSE",
|
19
19
|
"README.md"
|
@@ -44,6 +44,8 @@ Gem::Specification.new do |s|
|
|
44
44
|
"lib/eventbrite/api/model/owned_event_attendee.rb",
|
45
45
|
"lib/eventbrite/api/model/owned_event_order.rb",
|
46
46
|
"lib/eventbrite/api/model/user.rb",
|
47
|
+
"lib/eventbrite/api/model/user_contact.rb",
|
48
|
+
"lib/eventbrite/api/model/user_contact_list.rb",
|
47
49
|
"lib/eventbrite/api/model/user_order.rb",
|
48
50
|
"lib/eventbrite/api/model/user_organizer.rb",
|
49
51
|
"lib/eventbrite/api/model/user_venue.rb",
|
@@ -68,24 +70,27 @@ Gem::Specification.new do |s|
|
|
68
70
|
"spec/fixtures/users/me.json",
|
69
71
|
"spec/spec_helper.rb"
|
70
72
|
]
|
71
|
-
s.homepage = "http://github.com/BrunoChauvet/eventbrite-api"
|
72
|
-
s.licenses = ["MIT"]
|
73
|
-
s.rubygems_version = "2.
|
74
|
-
s.summary = "Integrate with Eventbrite API"
|
73
|
+
s.homepage = "http://github.com/BrunoChauvet/eventbrite-api".freeze
|
74
|
+
s.licenses = ["MIT".freeze]
|
75
|
+
s.rubygems_version = "2.6.12".freeze
|
76
|
+
s.summary = "Integrate with Eventbrite API".freeze
|
75
77
|
|
76
78
|
if s.respond_to? :specification_version then
|
77
79
|
s.specification_version = 4
|
78
80
|
|
79
81
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
80
|
-
s.add_runtime_dependency(%q<oauth2
|
81
|
-
s.
|
82
|
+
s.add_runtime_dependency(%q<oauth2>.freeze, [">= 0"])
|
83
|
+
s.add_runtime_dependency(%q<deep_merge>.freeze, [">= 0"])
|
84
|
+
s.add_development_dependency(%q<jeweler>.freeze, [">= 0"])
|
82
85
|
else
|
83
|
-
s.add_dependency(%q<oauth2
|
84
|
-
s.add_dependency(%q<
|
86
|
+
s.add_dependency(%q<oauth2>.freeze, [">= 0"])
|
87
|
+
s.add_dependency(%q<deep_merge>.freeze, [">= 0"])
|
88
|
+
s.add_dependency(%q<jeweler>.freeze, [">= 0"])
|
85
89
|
end
|
86
90
|
else
|
87
|
-
s.add_dependency(%q<oauth2
|
88
|
-
s.add_dependency(%q<
|
91
|
+
s.add_dependency(%q<oauth2>.freeze, [">= 0"])
|
92
|
+
s.add_dependency(%q<deep_merge>.freeze, [">= 0"])
|
93
|
+
s.add_dependency(%q<jeweler>.freeze, [">= 0"])
|
89
94
|
end
|
90
95
|
end
|
91
96
|
|
data/lib/eventbrite-api.rb
CHANGED
@@ -9,9 +9,12 @@ require 'eventbrite/api/model/category.rb'
|
|
9
9
|
require 'eventbrite/api/model/format.rb'
|
10
10
|
require 'eventbrite/api/model/event_ticket_class.rb'
|
11
11
|
require 'eventbrite/api/model/order.rb'
|
12
|
+
require 'eventbrite/api/model/user_contact.rb'
|
13
|
+
require 'eventbrite/api/model/user_contact_list.rb'
|
12
14
|
require 'eventbrite/api/model/user_order.rb'
|
13
15
|
require 'eventbrite/api/model/user_venue.rb'
|
14
16
|
require 'eventbrite/api/model/user_organizer.rb'
|
15
17
|
require 'eventbrite/api/model/owned_event.rb'
|
16
18
|
require 'eventbrite/api/model/owned_event_attendee.rb'
|
17
|
-
require 'eventbrite/api/model/owned_event_order.rb'
|
19
|
+
require 'eventbrite/api/model/owned_event_order.rb'
|
20
|
+
require 'deep_merge/rails_compat'
|
@@ -17,6 +17,8 @@ module Eventbrite
|
|
17
17
|
model :Category
|
18
18
|
model :Format
|
19
19
|
model :EventTicketClass
|
20
|
+
model :UserContact
|
21
|
+
model :UserContactList
|
20
22
|
model :UserOrder
|
21
23
|
model :UserVenue
|
22
24
|
model :UserOrganizer
|
@@ -27,7 +29,7 @@ module Eventbrite
|
|
27
29
|
@redirect_uri = options[:redirect_uri]
|
28
30
|
@consumer = options[:consumer]
|
29
31
|
@access_token = options[:access_token]
|
30
|
-
|
32
|
+
|
31
33
|
@client = OAuth2::Client.new(@consumer[:key], @consumer[:secret], {
|
32
34
|
:site => 'https://www.eventbrite.com',
|
33
35
|
:authorize_url => '/oauth/authorize',
|
@@ -8,13 +8,6 @@ class String
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
class ::Hash
|
12
|
-
def deep_merge(second)
|
13
|
-
merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : Array === v1 && Array === v2 ? v1 | v2 : [:undefined, nil, :nil].include?(v2) ? v1 : v2 }
|
14
|
-
self.merge(second.to_h, &merger)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
11
|
module Eventbrite
|
19
12
|
module Api
|
20
13
|
module Helpers
|
@@ -6,7 +6,7 @@ module Eventbrite
|
|
6
6
|
def initialize(client, model_name=nil)
|
7
7
|
@client = client
|
8
8
|
@model_name = model_name || 'Base'
|
9
|
-
|
9
|
+
|
10
10
|
@pagination = nil
|
11
11
|
@endpoint = nil
|
12
12
|
end
|
@@ -35,7 +35,7 @@ module Eventbrite
|
|
35
35
|
def all(opts)
|
36
36
|
all_pages = get(opts)
|
37
37
|
while @pagination && @pagination['page_number'] < @pagination['page_count']
|
38
|
-
all_pages = all_pages.
|
38
|
+
all_pages = all_pages.deeper_merge(next_page(opts))
|
39
39
|
end
|
40
40
|
all_pages
|
41
41
|
end
|
@@ -65,13 +65,13 @@ protected
|
|
65
65
|
end
|
66
66
|
target
|
67
67
|
end
|
68
|
-
|
68
|
+
|
69
69
|
def resource_url(opts={})
|
70
70
|
target = "https://www.eventbriteapi.com/v3/#{model_route}"
|
71
71
|
opts.each { |k,v| target.gsub!(":#{k}", v) if v.is_a?(String) } unless opts.empty?
|
72
72
|
target
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
def perform_request(target)
|
76
76
|
response = @client.connection.get(target, {:headers => @client.headers})
|
77
77
|
hash = JSON.parse(response.body)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventbrite-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BrunoChauvet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: deep_merge
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: jeweler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,6 +85,8 @@ files:
|
|
71
85
|
- lib/eventbrite/api/model/owned_event_attendee.rb
|
72
86
|
- lib/eventbrite/api/model/owned_event_order.rb
|
73
87
|
- lib/eventbrite/api/model/user.rb
|
88
|
+
- lib/eventbrite/api/model/user_contact.rb
|
89
|
+
- lib/eventbrite/api/model/user_contact_list.rb
|
74
90
|
- lib/eventbrite/api/model/user_order.rb
|
75
91
|
- lib/eventbrite/api/model/user_organizer.rb
|
76
92
|
- lib/eventbrite/api/model/user_venue.rb
|
@@ -114,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
130
|
version: '0'
|
115
131
|
requirements: []
|
116
132
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.6.12
|
118
134
|
signing_key:
|
119
135
|
specification_version: 4
|
120
136
|
summary: Integrate with Eventbrite API
|