thrillcall-api 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,32 @@ require 'json'
3
3
  require "#{File.expand_path("../thrillcall-api/exceptions", __FILE__)}"
4
4
  require "#{File.expand_path("../thrillcall-api/result", __FILE__)}"
5
5
  require "#{File.expand_path("../thrillcall-api/version", __FILE__)}"
6
+ require 'net/http'
7
+ require 'retriable'
6
8
 
7
9
  module ThrillcallAPI
10
+
11
+ RETRY_ERRNO = [Errno::ECONNREFUSED,
12
+ Errno::ECONNRESET,
13
+ Errno::EHOSTUNREACH,
14
+ Errno::EHOSTDOWN,
15
+ Errno::EINVAL]
16
+ RETRY_NET = [Net::HTTPBadResponse,
17
+ Net::HTTPRequestTimeOut,
18
+ Net::HTTPServerError, # 5xx
19
+ Net::HTTPInternalServerError, # 500
20
+ Net::HTTPNotImplemented, # 501
21
+ Net::HTTPBadGateway, # 502
22
+ Net::HTTPServiceUnavailable, # 503
23
+ Net::HTTPGatewayTimeOut, # 504
24
+ Net::HTTPVersionNotSupported] # 505
25
+ RETRY_FARADAY = [Faraday::Error,
26
+ Faraday::Error::ClientError]
27
+ RETRY_DEFAULT = [Timeout::Error,
28
+ EOFError,
29
+ SocketError]
30
+ RETRY_ALL = RETRY_DEFAULT + RETRY_ERRNO + RETRY_NET + RETRY_FARADAY
31
+
8
32
  class << self
9
33
  attr_accessor :cur_api_key, :base, :result, :conn
10
34
 
@@ -19,6 +43,10 @@ module ThrillcallAPI
19
43
 
20
44
  opts = default_options.merge(options)
21
45
 
46
+ @retry_exceptions = opts[:retry_exceptions] || RETRY_ALL
47
+ @retry_tries = opts[:retry_tries] || 5
48
+ @retry_timeout = opts[:timeout] || 10
49
+
22
50
  @cur_api_key = cur_api_key
23
51
  base_url = opts[:base_url]
24
52
  version = opts[:version]
@@ -59,20 +87,38 @@ module ThrillcallAPI
59
87
  return self
60
88
  end
61
89
 
90
+ def on_retry_exception
91
+ Proc.new do |exception, tries|
92
+ msg = "ThrillcallAPI : #{exception.class}: '#{exception.message}' - #{tries} attempts."
93
+ @conn.send(:warn, msg)
94
+ end
95
+ end
96
+
62
97
  def get(endpoint, params)
63
- r = @conn.get do |req|
64
- req.url endpoint, params.merge(:api_key => @cur_api_key)
98
+ r = nil
99
+ retriable :on => @retry_exceptions, :tries => @retry_tries, :timeout => @retry_timeout, :on_retry => on_retry_exception do
100
+ r = @conn.get do |req|
101
+ req.url endpoint, params.merge(:api_key => @cur_api_key)
102
+ end
65
103
  end
66
104
  JSON.parse(r.body)
67
105
  end
68
106
 
69
- def post(endpoint, params)
70
- r = @conn.post do |req|
107
+ def post(endpoint, params, method = :post)
108
+ r = nil
109
+ block = lambda do |req|
71
110
  req.url endpoint, params.merge(:api_key => @cur_api_key)
72
111
  end
112
+ retriable :on => @retry_exceptions, :tries => @retry_tries, :timeout => @retry_timeout, :on_retry => on_retry_exception do
113
+ r = @conn.send(method, &block)
114
+ end
73
115
  JSON.parse(r.body)
74
116
  end
75
117
 
118
+ def put(endpoint, params)
119
+ post(endpoint, params, :put)
120
+ end
121
+
76
122
  def method_missing(method, *args, &block)
77
123
  r = Result.new
78
124
  r.send(method, args, block)
@@ -107,17 +107,21 @@ module ThrillcallAPI
107
107
  @ran = true
108
108
  end
109
109
 
110
- def post(args = {})
110
+ def post(args = {}, method = :post)
111
111
  if @ran
112
112
  raise ArgumentError, "This request has already been made!"
113
113
  else
114
- @http_method = :post
114
+ @http_method = method
115
115
  @options.merge!(args)
116
116
  fetch_data
117
117
  end
118
118
  @data
119
119
  end
120
120
 
121
+ def put(args = {})
122
+ post(args, :put)
123
+ end
124
+
121
125
  def method_missing(method, *args, &block)
122
126
 
123
127
  if @ran
@@ -1,3 +1,3 @@
1
1
  module ThrillcallAPI
2
- VERSION = "0.0.6"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrillcall-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-04-16 00:00:00.000000000 Z
14
+ date: 2013-06-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -228,7 +228,7 @@ dependencies:
228
228
  requirements:
229
229
  - - ~>
230
230
  - !ruby/object:Gem::Version
231
- version: 0.7.0
231
+ version: 0.8.7
232
232
  type: :runtime
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
@@ -236,7 +236,23 @@ dependencies:
236
236
  requirements:
237
237
  - - ~>
238
238
  - !ruby/object:Gem::Version
239
- version: 0.7.0
239
+ version: 0.8.7
240
+ - !ruby/object:Gem::Dependency
241
+ name: retriable
242
+ requirement: !ruby/object:Gem::Requirement
243
+ none: false
244
+ requirements:
245
+ - - ~>
246
+ - !ruby/object:Gem::Version
247
+ version: 1.3.3
248
+ type: :runtime
249
+ prerelease: false
250
+ version_requirements: !ruby/object:Gem::Requirement
251
+ none: false
252
+ requirements:
253
+ - - ~>
254
+ - !ruby/object:Gem::Version
255
+ version: 1.3.3
240
256
  description: Simple wrapper around http://thrillcall.com's API
241
257
  email:
242
258
  - github@thrillcall.com
@@ -244,28 +260,10 @@ executables: []
244
260
  extensions: []
245
261
  extra_rdoc_files: []
246
262
  files:
247
- - .autotest
248
- - .gitignore
249
- - .rspec
250
- - .rvmrc
251
- - Gemfile
252
- - Gemfile.lock
253
- - README.md
254
- - Rakefile
255
- - autotest/discover.rb
256
- - docs/API.html
257
- - docs/API.md
258
- - docs/README.html
259
- - docs/WRAPPER.html
260
- - docs/WRAPPER.md
261
- - lib/thrillcall-api.rb
262
263
  - lib/thrillcall-api/exceptions.rb
263
264
  - lib/thrillcall-api/result.rb
264
265
  - lib/thrillcall-api/version.rb
265
- - script/convert_readme.rb
266
- - spec/spec_helper.rb
267
- - spec/thrillcall-api/thrillcall-api_spec.rb
268
- - thrillcall-api.gemspec
266
+ - lib/thrillcall-api.rb
269
267
  homepage: https://github.com/thrillcall/thrillcall-api
270
268
  licenses: []
271
269
  post_install_message:
@@ -278,6 +276,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
278
276
  - - ! '>='
279
277
  - !ruby/object:Gem::Version
280
278
  version: '0'
279
+ segments:
280
+ - 0
281
+ hash: -14664519067324063
281
282
  required_rubygems_version: !ruby/object:Gem::Requirement
282
283
  none: false
283
284
  requirements:
@@ -286,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
287
  version: 1.3.6
287
288
  requirements: []
288
289
  rubyforge_project: thrillcall-api
289
- rubygems_version: 1.8.21
290
+ rubygems_version: 1.8.25
290
291
  signing_key:
291
292
  specification_version: 3
292
293
  summary: Simple wrapper around http://thrillcall.com's API
data/.autotest DELETED
@@ -1,10 +0,0 @@
1
- # Include plugins
2
- require 'autotest/fsevent'
3
- require 'autotest/growl'
4
-
5
- # Skip some paths
6
- Autotest.add_hook :initialize do |autotest|
7
- %w{.git .DS_Store ._* vendor tmp}.each { |exception| autotest.add_exception(exception) }
8
- false
9
- end
10
-
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- pkg/*
2
- *.gem
3
- .bundle
4
- log/
5
- tmp/
6
-
7
- # osx noise
8
- .DS_Store
9
- profile
10
-
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --color
2
- --format d
3
- --backtrace
4
-
data/.rvmrc DELETED
@@ -1,2 +0,0 @@
1
- rvm ruby-1.9.2-p290@thrillcall-api
2
-
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in thrillcall_api.gemspec
4
- gemspec
@@ -1,64 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- thrillcall-api (0.0.5)
5
- faraday (~> 0.7.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- ZenTest (4.6.2)
11
- addressable (2.2.7)
12
- albino (1.3.3)
13
- posix-spawn (>= 0.3.6)
14
- autotest (4.4.6)
15
- ZenTest (>= 4.4.1)
16
- autotest-fsevent (0.2.8)
17
- sys-uname
18
- autotest-growl (0.2.16)
19
- awesome_print (1.0.2)
20
- diff-lcs (1.1.3)
21
- faker (0.9.5)
22
- i18n (~> 0.4)
23
- faraday (0.7.6)
24
- addressable (~> 2.2)
25
- multipart-post (~> 1.1)
26
- rack (~> 1.1)
27
- ffi (1.0.11)
28
- i18n (0.6.0)
29
- multipart-post (1.1.5)
30
- nokogiri (1.4.7)
31
- posix-spawn (0.3.6)
32
- rack (1.4.1)
33
- rake (0.9.2.2)
34
- redcarpet (1.17.2)
35
- rspec (2.7.0)
36
- rspec-core (~> 2.7.0)
37
- rspec-expectations (~> 2.7.0)
38
- rspec-mocks (~> 2.7.0)
39
- rspec-core (2.7.1)
40
- rspec-expectations (2.7.0)
41
- diff-lcs (~> 1.1.2)
42
- rspec-mocks (2.7.0)
43
- sys-uname (0.9.0)
44
- ffi (>= 1.0.0)
45
- tzinfo (0.3.31)
46
-
47
- PLATFORMS
48
- ruby
49
-
50
- DEPENDENCIES
51
- ZenTest (~> 4.6.2)
52
- albino (~> 1.3.3)
53
- autotest (~> 4.4.6)
54
- autotest-fsevent (~> 0.2.8)
55
- autotest-growl (~> 0.2.16)
56
- awesome_print (~> 1.0.1)
57
- bundler (>= 1.0.0)
58
- faker (~> 0.9.5)
59
- nokogiri (~> 1.4.6)
60
- rake (~> 0.9.2.2)
61
- redcarpet (~> 1.17.2)
62
- rspec (~> 2.7.0)
63
- thrillcall-api!
64
- tzinfo (~> 0.3.31)
data/README.md DELETED
@@ -1,1389 +0,0 @@
1
- # Thrillcall API
2
- This document describes the Thrillcall API v3, and usage for the provided Ruby API wrapper gem.
3
-
4
- # Ruby API Wrapper
5
- ### Usage:
6
-
7
- ``` ruby
8
- #---------------------------------------------------------------#
9
- # First, require the gem:
10
- #---------------------------------------------------------------#
11
- require 'rubygems'
12
- require 'thrillcall-api'
13
-
14
- #---------------------------------------------------------------#
15
- # Instantiate with your Thrillcall API key:
16
- #---------------------------------------------------------------#
17
- MY_API_KEY = "1234567890abcdef"
18
- tc = ThrillcallAPI.new(MY_API_KEY)
19
-
20
- #---------------------------------------------------------------#
21
- # Access any endpoint directly from the instance
22
- #---------------------------------------------------------------#
23
- # This is like calling GET "/events"
24
- tc.events
25
- # => [ {"id" => ... }, {...}, ...]
26
-
27
- #---------------------------------------------------------------#
28
- # Provide IDs as arguments
29
- #---------------------------------------------------------------#
30
- # GET "/event/1"
31
- tc.event(1)
32
- # => {"id" => 1, ...}
33
-
34
- #---------------------------------------------------------------#
35
- # Provide parameters as arguments
36
- #---------------------------------------------------------------#
37
- # GET "/events?limit=5"
38
- events = tc.events(:limit => 5)
39
- # => [ {"id" => ... }, {...}, ...]
40
- events.length
41
- # => 5
42
-
43
- #---------------------------------------------------------------#
44
- # Chain methods together for nested routes
45
- #---------------------------------------------------------------#
46
- # GET "/search/venues/warfield?postalcode=94101&radius=20"
47
- venues = tc.search.venues("warfield", :postalcode => "94101", :radius => 20)
48
- # => [{"name" => "The Warfield", ...}]
49
- ```
50
-
51
- ### Advanced Usage:
52
-
53
- Provide additional instantiation options:
54
-
55
- ``` ruby
56
-
57
- #---------------------------------------------------------------#
58
- # The default SSL endpoint is "https://api.thrillcall.com/api/".
59
- # The default API version is 3.
60
- # By default, Faraday access logging is turned off.
61
- # Override if necessary:
62
- #---------------------------------------------------------------#
63
- tc = ThrillcallAPI.new(
64
- MY_API_KEY,
65
- :base_url => "https://api.thrillcall.com/custom/",
66
- :version => 3,
67
- :logger => true
68
- )
69
-
70
- ```
71
-
72
- Internally, the wrapper returns a ThrillcallAPI::Result class for any call. Data for the request is fetched only when used. This allows you to build requests piecemeal before executing them.
73
-
74
- ``` ruby
75
-
76
- #---------------------------------------------------------------#
77
- # Build a partial request, add on to it later
78
- #---------------------------------------------------------------#
79
- request = tc.artist(22210) # Lady Gaga
80
-
81
- # GET "/artist/22210/events?limit=2"
82
- artist_events = request.events(:limit => 2)
83
-
84
- artist_events.length
85
- # => 2
86
-
87
- ```
88
-
89
- This gem is a convenience wrapper around the excellent Faraday project. If more complicated use cases are necessary, consider using Faraday directly.
90
-
91
- ``` ruby
92
-
93
- require 'faraday'
94
- require 'json'
95
-
96
- MY_API_KEY = "1234567890abcdef"
97
- BASE_URL = "https://api.thrillcall.com/api/v3/"
98
- HEADERS = { :accept => 'application/json' }
99
-
100
- connection = Faraday.new( :url => BASE_URL, :headers => HEADERS ) do |builder|
101
- builder.adapter Faraday.default_adapter
102
- builder.response :logger
103
- builder.response :raise_error
104
- end
105
-
106
- request = connection.get do |req|
107
- req.url "artist/22210", { :api_key => MY_API_KEY }
108
- end
109
-
110
- artist = JSON.parse(request.body)
111
-
112
- artist["name"]
113
- # => "Lady Gaga"
114
-
115
- ```
116
-
117
-
118
- # HTTPS Endpoints
119
-
120
- ### SSL/TLS Endpoints Required:
121
- All API access must use the secure HTTPS endpoint : https://api.thrillcall.com:443
122
- Access over an insecure HTTP (port 80) endpoint is now deprecated and will be disabled.
123
-
124
- ### Parameters
125
- These are valid parameters for any endpoint, however, they will only be used by the server where applicable.
126
-
127
- **api\_key** MUST BE SUPPLIED for every endpoint.
128
-
129
- - <a name="api_key" />**api\_key** _string: (format: length == 16)_
130
-
131
- Your API key. Required for access to any endpoint.
132
-
133
- - <a name="limit" />**limit** _integer_
134
-
135
- _Default: 100_
136
-
137
- Sets the maximum number of results to return. Cannot be above 200.
138
-
139
- - <a name="page" />**page** _integer_
140
-
141
- _Default: 0_
142
-
143
- Used in conjunction with **[limit](#limit)**.
144
-
145
- Specifies the page number. If limit is 10, then page = 2 will return results #20 through #29
146
-
147
- - <a name="time_zone" />**time\_zone** _string (format: TZ Database string, eg "America/Los\_Angeles")_
148
-
149
- _Default: UTC_
150
- _For Metro Area endpoints, the default is instead the Metro Area's time zone and cannot be overridden._
151
-
152
- **[min\_date](#min_date)** and **[max\_date](#max_date)** will be calculated based on this time zone.
153
-
154
- - <a name="min_date" />**min\_date** _string (format: "YYYY-MM-DD")_
155
-
156
- _Default: Today_
157
-
158
- Results before this date will not be returned.
159
-
160
- - <a name="max_date" />**max\_date** _string (format: "YYYY-MM-DD")_
161
-
162
- _Default: 1 year from Today_
163
-
164
- Results after this date will not be returned.
165
-
166
- - <a name="min_updated_at" />**min\_updated\_at** _string (format: "YYYY-MM-DD")_
167
-
168
- _Default: none_
169
-
170
- Results with updated_at columns before this date will not be returned.
171
-
172
- - <a name="max_date" />**max\_updated\_at** _string (format: "YYYY-MM-DD")_
173
-
174
- _Default: none_
175
-
176
- Results with updated_at columns after this date will not be returned.
177
-
178
- - <a name="lat" />**lat** _float_
179
-
180
- _Default: none_
181
-
182
- If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, results will be within **[radius](#radius)** of this location.
183
-
184
- For Person queries, this specifies the latitude of the person's location.
185
-
186
- - <a name="long" />**long** _float_
187
-
188
- _Default: none_
189
-
190
- If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, results will be within **[radius](#radius)** of this location.
191
-
192
- For Person queries, this specifies the longitude of the person's location.
193
-
194
- - <a name="postalcode" />**postalcode** _string (format: length >= 5)_
195
-
196
- _Default: none_
197
-
198
- Results will be within the **[radius](#radius)** of this postal code.
199
- If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, this will be ignored.
200
-
201
- - <a name="radius" />**radius** _float_
202
-
203
- _Default: 100.0_
204
-
205
- Used in conjunction with **[postalcode](#postalcode)**
206
-
207
- - <a name="use_partner_id" />**use\_partner\_id** _boolean_
208
-
209
- _Default: false_
210
-
211
- If set to _true_ or _1_, instead of using Thrillcall internal IDs, treat any IDs in a request as belonging to your partner definition.
212
-
213
- Contact us to set up a list of definitions.
214
-
215
- - <a name="ticket_type" />**ticket\_type** _string (format: "primary" or "resale")_
216
-
217
- _Default: both_
218
-
219
- If specified, will only return tickets from Primary or Resale merchants.
220
-
221
- - <a name="must_have_tickets" />**must\_have\_tickets** _boolean_
222
-
223
- _Default: false_
224
-
225
- If set to _true_ or _1_, will only return results that have tickets associated with them.
226
-
227
- - <a name="show_disabled_events" />**show\_disabled\_events** _boolean_
228
-
229
- _Default: false_
230
-
231
- If set to _true_ or _1_, will not filter out events which have been disabled internally.
232
-
233
- - <a name="show_unconfirmed_events" />**show\_unconfirmed\_events** _boolean_
234
-
235
- _Default: false_
236
-
237
- If set to _true_ or _1_, will not filter out events with unconfirmed locations.
238
-
239
- - <a name="show_rumor_events" />**show\_rumor\_events** _boolean_
240
-
241
- _Default: false_
242
-
243
- If set to _true_ or _1_, will not filter out events marked as rumored.
244
-
245
- - <a name="primary_genre_id" />**primary\_genre\_id** _integer_
246
-
247
- _Default: none_
248
-
249
- If set, will filter Artist results to only those with the specified **[primary\_genre\_id](#primary_genre_id)**
250
-
251
- - <a name="email" />**email** _string_
252
-
253
- The email address associated with a user, required for registration.
254
-
255
- - <a name="password" />**password** _string (format: 40 >= length >= 5)_
256
-
257
- The user's password. Must be supplied along with **[email](#email)** unless using **[provider](#provider)** / **[uid](#uid)** / **[token](#token)** auth.
258
-
259
- - <a name="provider" />**provider** _string_
260
-
261
- The name of the authentication provider (e.g. "facebook"). Must be supplied along with **[uid](#uid)** and **[token](#token)** unless using **[email](#email)**/**[password](#password)** auth.
262
-
263
- - <a name="uid" />**uid** _string_
264
-
265
- The user's ID with **[provider](#provider)**. Must be supplied along with **[provider](#provider)** and **[token](#token)** unless using **[email](#email)**/**[password](#password)** auth.
266
-
267
- - <a name="token" />**token** _string_
268
-
269
- The user's authentication token with **[provider](#provider)**. Must be supplied along with **[provider](#provider)** and **[uid](#uid)** unless using **[email](#email)**/**[password](#password)** auth.
270
-
271
- - <a name="first_name" />**first\_name** _string (format: 50 >= length >= 2)_
272
-
273
- Required to register a user.
274
-
275
- - <a name="last_name" />**last\_name** _string (format: 50 >= length >= 2)_
276
-
277
- Optional for registering a user.
278
-
279
- - <a name="gender" />**gender** _string (format: length == 1)_
280
-
281
- Optional for registering a user.
282
-
283
- - <a name="location_name" />**location\_name** _string (format: "City, ST or City, State", length > 0))_
284
-
285
- The name of the user's location when auto-registering. Either this or **[lat](#lat)** / **[long](#long)** must be provided.
286
-
287
- - <a name="referral_code" />**referral\_code** _string_
288
-
289
- The referral code to be used during registration. Both the owner of the code as well as the new user will receive a referral credit point.
290
-
291
-
292
- ## Artists
293
- Fields:
294
-
295
- - **created\_at** _string_ ISO 8601 representation the time this object was created
296
- - **genre\_tags** _string_ Semicolon separated list of Genre names
297
- - **id** _integer_ Thrillcall ID
298
- - **name** _string_ Artist / Band Name
299
- - **primary\_genre\_id** _integer_ The Thrillcall ID for this artist's primary Genre
300
- - **upcoming\_events\_count** _integer_ Number of upcoming events associated with this object
301
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
302
- - **photos** _hash_ A hash of image urls of the primary photo available for this object in different styles
303
- - **url** _string_ URL for this object on Thrillcall
304
-
305
-
306
- ### GET /artists
307
- Params:
308
-
309
- - **[limit](#limit)**
310
- - **[page](#page)**
311
- - **[primary\_genre\_id](#primary_genre_id)**
312
-
313
- Returns: _Array_ of Artists _Hash_
314
-
315
- ``` js
316
- // Example: GET /api/v3/artists?limit=14&api_key=1234567890abcdef
317
-
318
- [
319
- {
320
- "created_at": "2008-04-29T10:19:45Z",
321
- "genre_tags": "O",
322
- "id": 1,
323
- "name": "Hyler Jones Proteges",
324
- "primary_genre_id": 61,
325
- "upcoming_events_count": 0,
326
- "updated_at": "2010-03-26T16:49:20Z",
327
- "photos": {
328
- "thumbnail": "http://i.development.tc-core.com/artist/_default/default-thumbnail.jpg",
329
- "medium": "http://i.development.tc-core.com/artist/_default/default-medium.jpg",
330
- "large": "http://i.development.tc-core.com/artist/_default/default-large.jpg",
331
- "mobile": "http://i.development.tc-core.com/artist/_default/default-mobile.jpg"
332
- },
333
- "url": "http://thrillcall.com/artist/Hyler_Jones_Proteges"
334
- },
335
- {
336
- ...
337
- },
338
- ...
339
- ]
340
- ```
341
-
342
- ### GET /artist/:id
343
- **:id** _integer_ Thrillcall or Partner ID
344
-
345
- Params:
346
-
347
- - **[use\_partner\_id](#use_partner_id)**
348
-
349
- Returns: Artist _Hash_
350
-
351
- ``` js
352
- // Example: GET /api/v3/artist/378465?api_key=1234567890abcdef
353
-
354
- {
355
- "created_at": "2011-05-19T20:27:47Z",
356
- "genre_tags": "Operatic pop",
357
- "id": 378465,
358
- "name": "Il Volo",
359
- "primary_genre_id": 61,
360
- "upcoming_events_count": 30,
361
- "updated_at": "2012-03-27T15:59:04Z",
362
- "photos": {
363
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
364
- "medium": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-medium.jpg?1324561426",
365
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
366
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
367
- },
368
- "url": "http://thrillcall.com/artist/Il_Volo"
369
- }
370
- ```
371
-
372
- ### GET /artist/:id/events
373
- **:id** _integer_ Thrillcall or Partner ID
374
-
375
- Params:
376
-
377
- - **[limit](#limit)**
378
- - **[page](#page)**
379
- - **[time\_zone](#time_zone)**
380
- - **[min\_date](#min_date)**
381
- - **[max\_date](#max_date)**
382
- - **[min\_updated\_at](#min_updated_at)**
383
- - **[max\_updated\_at](#max_updated_at)**
384
- - **[lat](#lat)**
385
- - **[long](#long)**
386
- - **[postalcode](#postalcode)**
387
- - **[radius](#radius)**
388
- - **[use\_partner\_id](#use_partner_id)**
389
- - **[ticket\_type](#ticket_type)**
390
- - **[must\_have\_tickets](#must_have_tickets)**
391
- - **[show\_disabled\_events](#show_disabled_events)**
392
- - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
393
- - **[show\_rumor\_events](#show_rumor_events)**
394
-
395
- Returns: _Array_ of Events _Hash_
396
-
397
- ``` js
398
- // Example: GET /api/v3/artist/378465/events?api_key=1234567890abcdef
399
-
400
- [
401
- {
402
- "created_at": "2012-03-02T08:01:03Z",
403
- "festival": false,
404
- "id": 1046915,
405
- "latitude": 47.6136,
406
- "longitude": -122.332,
407
- "name": "Il Volo @ Paramount Theatre - Seattle",
408
- "on_sale_date": null,
409
- "rumor": false,
410
- "start_date": "2012-10-02T19:30:00Z",
411
- "starts_at": "2012-10-03T02:30:00Z",
412
- "starts_at_time_trusted": true,
413
- "unconfirmed_location": 0,
414
- "updated_at": "2012-03-29T01:35:53Z",
415
- "venue_id": 61705,
416
- "photos": {
417
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
418
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
419
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
420
- },
421
- "url": "http://thrillcall.com/event/1046915",
422
- "starts_at_local": "2012-10-02T19:30:00-07:00",
423
- "time_zone": "America/Los_Angeles",
424
- "status": "confirmed"
425
- },
426
- {
427
- ...
428
- },
429
- ...
430
- ]
431
- ```
432
-
433
- ### GET /search/artists/:term
434
- **:term** _string_ Arbitrary search string on the **name** field. (alphanumerics only, underscore matches underscore, use '+' for space)
435
-
436
- Params:
437
-
438
- - **[limit](#limit)**
439
- - **[page](#page)**
440
-
441
- Returns: _Array_ of Artists _Hash_
442
-
443
- ``` js
444
- // Example: GET /api/v3/search/artists/Il%20Volo?api_key=1234567890abcdef
445
-
446
- [
447
- {
448
- "created_at": "2011-05-19T20:27:47Z",
449
- "genre_tags": "Operatic pop",
450
- "id": 378465,
451
- "name": "Il Volo",
452
- "primary_genre_id": 61,
453
- "upcoming_events_count": 30,
454
- "updated_at": "2012-03-27T15:59:04Z",
455
- "photos": {
456
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
457
- "medium": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-medium.jpg?1324561426",
458
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
459
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
460
- },
461
- "url": "http://thrillcall.com/artist/Il_Volo"
462
- },
463
- {
464
- ...
465
- },
466
- ...
467
- ]
468
- ```
469
-
470
- ## Events
471
- Fields:
472
-
473
- - **created\_at** _string_ ISO 8601 representation the time this object was created
474
- - **festival** _boolean_ Is this event a festival?
475
- - **id** _integer_ Thrillcall ID
476
- - **latitude** _float_ Approximate latitude for the Event
477
- - **longitude** _float_ Approximate longitude for the Event
478
- - **name** _string_ Name of the Event
479
- - **on\_sale\_date** _string_ ISO 8601 representation of the date when tickets go on sale
480
- - **rumor** _boolean_ Are the details for this event based on a rumor?
481
- - **status** _string_ Status of the event (confirmed, unconfirmed, cancelled, or disabled)
482
- - **starts\_at** _string_ ISO 8601 representation of the start of the Event in UTC time
483
- - **starts\_at\_local** _string_ ISO 8601 representation of the start of the Event in the local timezone
484
- - **starts\_at\_time\_trusted** _boolean_ Do we trust that the time of day component of **starts\_at** is valid?
485
- - **time\_zone** _string_ TZ Database string representing the time zone at the location of the event
486
- - **unconfirmed\_location** _integer_ If 1, the location of this event is unconfirmed
487
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
488
- - **venue\_id** _integer_ Thrillcall Venue ID
489
- - **photos** _hash_ A hash of image urls of the primary photo available for this object in different styles
490
- - **url** _string_ URL for this object on Thrillcall
491
-
492
-
493
- ### GET /events
494
- Params:
495
-
496
- - **[limit](#limit)**
497
- - **[page](#page)**
498
- - **[time\_zone](#time_zone)**
499
- - **[min\_date](#min_date)**
500
- - **[max\_date](#max_date)**
501
- - **[min\_updated\_at](#min_updated_at)**
502
- - **[max\_updated\_at](#max_updated_at)**
503
- - **[lat](#lat)**
504
- - **[long](#long)**
505
- - **[postalcode](#postalcode)**
506
- - **[radius](#radius)**
507
- - **[ticket\_type](#ticket_type)**
508
- - **[must\_have\_tickets](#must_have_tickets)**
509
- - **[show\_disabled\_events](#show_disabled_events)**
510
- - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
511
- - **[show\_rumor\_events](#show_rumor_events)**
512
-
513
- Returns: _Array_ of Events _Hash_
514
-
515
- ``` js
516
- // Example: GET /api/v3/events?must_have_tickets=true&postalcode=94108&radius=10&limit=3&api_key=1234567890abcdef
517
-
518
- [
519
- {
520
- "created_at": "2012-03-02T18:06:14Z",
521
- "festival": false,
522
- "id": 1047075,
523
- "latitude": 37.7915,
524
- "longitude": -122.413,
525
- "name": "Il Volo @ Masonic Center",
526
- "on_sale_date": null,
527
- "rumor": false,
528
- "start_date": "2012-09-29T19:30:04Z",
529
- "starts_at": "2012-09-30T02:30:04Z",
530
- "starts_at_time_trusted": true,
531
- "unconfirmed_location": 0,
532
- "updated_at": "2012-03-29T01:35:57Z",
533
- "venue_id": 63279,
534
- "photos": {
535
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
536
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
537
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
538
- },
539
- "url": "http://thrillcall.com/event/1047075",
540
- "starts_at_local": "2012-09-29T19:30:04-07:00",
541
- "time_zone": "America/Los_Angeles"
542
- "status": "confirmed"
543
- },
544
- {
545
- ...
546
- },
547
- ...
548
- ]
549
- ```
550
-
551
- ### GET /event/:id
552
- **:id** _integer_ Thrillcall ID
553
-
554
- Params:
555
-
556
- - None
557
-
558
- Returns: Event _Hash_
559
-
560
- ``` js
561
- // Example: GET /api/v3/event/1045602/venue?api_key=1234567890abcdef
562
-
563
- {
564
- "address1": "1111 California Street",
565
- "address2": null,
566
- "city": "San Francisco",
567
- "country": "US",
568
- "created_at": "2009-08-25T19:25:27Z",
569
- "id": 63279,
570
- "latitude": 37.79153,
571
- "long_description": null,
572
- "longitude": -122.412757,
573
- "name": "Masonic Center",
574
- "phone_number": null,
575
- "state": "CA",
576
- "time_zone": "America/Los_Angeles",
577
- "upcoming_events_count": 4,
578
- "updated_at": "2012-04-04T02:08:50Z",
579
- "postalcode": "94108",
580
- "photos": {
581
- "thumbnail": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-thumbnail.jpg?1326419135",
582
- "medium": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-medium.jpg?1326419135",
583
- "large": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-large.jpg?1326419135",
584
- "mobile": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-mobile.jpg?1326419135"
585
- },
586
- "metro_area_id": 105,
587
- "url": "http://thrillcall.com/venue/Masonic_Center_in_San_Francisco_CA"
588
- }
589
- ```
590
-
591
- ### GET /event/:id/artists
592
- **:id** _integer_ Thrillcall ID
593
-
594
- Params:
595
-
596
- - **[limit](#limit)**
597
- - **[page](#page)**
598
-
599
- Returns: _Array_ of Artists _Hash_
600
-
601
- ``` js
602
- // Example: GET /api/v3/event/1047075/artists?api_key=1234567890abcdef
603
-
604
- [
605
- {
606
- "created_at": "2011-05-19T20:27:47Z",
607
- "genre_tags": "Operatic pop",
608
- "id": 378465,
609
- "name": "Il Volo",
610
- "primary_genre_id": 61,
611
- "upcoming_events_count": 30,
612
- "updated_at": "2012-03-27T15:59:04Z",
613
- "photos": {
614
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
615
- "medium": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-medium.jpg?1324561426",
616
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
617
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
618
- },
619
- "url": "http://thrillcall.com/artist/Il_Volo"
620
- },
621
- {
622
- ...
623
- },
624
- ...
625
- ]
626
- ```
627
-
628
- ### GET /event/:id/venue
629
- **:id** _integer_ Thrillcall ID
630
-
631
- Params:
632
-
633
- - None
634
-
635
- Returns: Venue _Hash_
636
-
637
- ``` js
638
- // Example: GET /api/v3/event/1045602/venue?api_key=1234567890abcdef
639
-
640
- {
641
- "address1": "1111 California Street",
642
- "address2": null,
643
- "city": "San Francisco",
644
- "country": "US",
645
- "created_at": "2009-08-25T19:25:27Z",
646
- "id": 63279,
647
- "latitude": 37.79153,
648
- "long_description": null,
649
- "longitude": -122.412757,
650
- "name": "Masonic Center",
651
- "phone_number": null,
652
- "state": "CA",
653
- "time_zone": "America/Los_Angeles",
654
- "upcoming_events_count": 4,
655
- "updated_at": "2012-04-04T02:08:50Z",
656
- "postalcode": "94108",
657
- "photos": {
658
- "thumbnail": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-thumbnail.jpg?1326419135",
659
- "medium": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-medium.jpg?1326419135",
660
- "large": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-large.jpg?1326419135",
661
- "mobile": "http://i.development.tc-core.com/dan/venue/63279/87/1326419135/masonic-center-in-san-francisco-ca-mobile.jpg?1326419135"
662
- },
663
- "metro_area_id": 105,
664
- "url": "http://thrillcall.com/venue/Masonic_Center_in_San_Francisco_CA"
665
- }
666
- ```
667
-
668
- ### GET /event/:id/tickets
669
- **:id** _integer_ Thrillcall ID
670
-
671
- Params:
672
-
673
- - **[limit](#limit)**
674
- - **[page](#page)**
675
- - **[ticket\_type](#ticket_type)**
676
-
677
- Returns: _Array_ of Tickets _Hash_
678
-
679
- ``` js
680
- // Example: GET /api/v3/event/1047075/tickets?api_key=1234567890abcdef
681
-
682
- [
683
- {
684
- "created_at": "2012-03-02T18:06:14Z",
685
- "description": null,
686
- "event_id": 1047075,
687
- "id": 819883,
688
- "marketing_text": null,
689
- "max_ticket_price": 85,
690
- "min_ticket_price": 29,
691
- "name": "Onsale to General Public",
692
- "on_sale_end_date": null,
693
- "on_sale_start_date": null,
694
- "seat_info": null,
695
- "updated_at": "2012-03-02T18:06:14Z",
696
- "url": "http://ticketsus.at/thrillcall?CTY=39&DURL=http://www.ticketmaster.com/event/1C00486178A1251A?camefrom=CFC_BUYAT&brand=[=BRAND=]"
697
- },
698
- {
699
- ...
700
- },
701
- ...
702
- ]
703
- ```
704
-
705
- ## Genre
706
- Fields:
707
-
708
- - **created\_at** _string_ ISO 8601 representation the time this object was created
709
- - **description** _string_ Description of the Genre
710
- - **id** _integer_ Thrillcall ID
711
- - **name** _string_ Name of the Genre
712
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
713
-
714
- ### GET /genres
715
- Params:
716
-
717
- - **[limit](#limit)**
718
- - **[page](#page)**
719
-
720
- Returns: _Array_ of Genres _Hash_
721
-
722
- ``` js
723
- // Example: GET /api/v3/genres?limit=14&api_key=1234567890abcdef
724
-
725
- [
726
- {
727
- "created_at": "2008-07-09T19:17:45Z",
728
- "description": "Shawn Colvin, Loudon Wainwright III etc...",
729
- "id": 6,
730
- "name": "Folk",
731
- "updated_at": "2010-03-25T23:51:55Z"
732
- },
733
- {
734
- ...
735
- },
736
- ...
737
- ]
738
- ```
739
-
740
- ### GET /genre/:id
741
- **:id** _integer_ Thrillcall ID
742
-
743
- Params:
744
-
745
- - None
746
-
747
- Returns: Genre _Hash_
748
-
749
- ``` js
750
- // Example: GET /api/v3/genre/27?api_key=1234567890abcdef
751
-
752
- {
753
- "created_at": "2008-07-09T19:17:45Z",
754
- "description": "U2, 30 Seconds To Mars etc...",
755
- "id": 27,
756
- "name": "Rock",
757
- "updated_at": "2010-03-25T23:52:21Z"
758
- }
759
- ```
760
-
761
- ### GET /genre/:id/artists
762
- **:id** _integer_ Thrillcall ID
763
-
764
- Params:
765
-
766
- - **[limit](#limit)**
767
- - **[page](#page)**
768
-
769
- Returns: _Array_ of Artists _Hash_
770
-
771
- ``` js
772
- // Example: GET /api/v3/genre/61/artists?api_key=1234567890abcdef
773
-
774
- [
775
- {
776
- "created_at": "2008-04-29T10:19:45Z",
777
- "genre_tags": "O",
778
- "id": 1,
779
- "name": "Hyler Jones Proteges",
780
- "primary_genre_id": 61,
781
- "upcoming_events_count": 0,
782
- "updated_at": "2010-03-26T16:49:20Z",
783
- "photos": {
784
- "thumbnail": "http://i.development.tc-core.com/artist/_default/default-thumbnail.jpg",
785
- "medium": "http://i.development.tc-core.com/artist/_default/default-medium.jpg",
786
- "large": "http://i.development.tc-core.com/artist/_default/default-large.jpg",
787
- "mobile": "http://i.development.tc-core.com/artist/_default/default-mobile.jpg"
788
- },
789
- "url": "http://thrillcall.com/artist/Hyler_Jones_Proteges"
790
- },
791
- {
792
- ...
793
- },
794
- ...
795
- ]
796
- ```
797
-
798
- ## Metro Area
799
- Fields:
800
-
801
- - **city** _string_ City of the Metro Area
802
- - **country** _string_ Country of the Metro Area
803
- - **created\_at** _string_ ISO 8601 representation the time this object was created
804
- - **id** _integer_ Thrillcall ID
805
- - **latitude** _float_ Latitude of the Metro Area
806
- - **longitude** _float_ Longitude of the Metro Area
807
- - **radius** _integer_ Radius of the Metro Area from the Lat/Long center
808
- - **state** _string_ State of the Metro Area
809
- - **time\_zone** _string_ Time zone of the Metro Area
810
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
811
- - **url** _string_ URL for this object on Thrillcall
812
- - **offers\_availability\_status\_code** _integer_ Offers status for the Metro Area ( no\_offers = 0, available = 1, coming\_soon = 2)
813
-
814
- ### GET /metro_areas
815
- Params:
816
-
817
- - **[limit](#limit)**
818
- - **[page](#page)**
819
-
820
- Returns: _Array_ of Metro Areas _Hash_
821
-
822
- ``` js
823
- // Example: GET /api/v3/metro_areas?limit=14&api_key=1234567890abcdef
824
-
825
- [
826
- {
827
- "city": "Chicago",
828
- "country": "US",
829
- "created_at": "2011-06-24T03:23:57Z",
830
- "id": 104,
831
- "latitude": 41.8842,
832
- "longitude": -87.6324,
833
- "offers_availability_status_code": 1,
834
- "radius": 50,
835
- "state": "IL",
836
- "time_zone": "America/Chicago",
837
- "updated_at": "2011-12-27T00:44:37Z",
838
- "url": "http://thrillcall.com/live-music/chicago"
839
- },
840
- {
841
- ...
842
- },
843
- ...
844
- ]
845
- ```
846
-
847
- ### GET /metro_area/:id
848
- **:id** _integer_ Thrillcall ID
849
-
850
- Params:
851
-
852
- - None
853
-
854
- Returns: Metro Area _Hash_
855
-
856
- ``` js
857
- // Example: GET /api/v3/metro_area/105?api_key=1234567890abcdef
858
-
859
- {
860
- "city": "San Francisco",
861
- "country": "US",
862
- "created_at": "2011-06-24T03:23:57Z",
863
- "id": 105,
864
- "latitude": 37.7771,
865
- "longitude": -122.42,
866
- "offers_availability_status_code": 1,
867
- "radius": 50,
868
- "state": "CA",
869
- "time_zone": "America/Los_Angeles",
870
- "updated_at": "2011-12-27T00:44:37Z",
871
- "url": "http://thrillcall.com/live-music/san-francisco"
872
- }
873
- ```
874
-
875
- ### GET /metro_area/:id/events
876
- **:id** _integer_ Thrillcall ID
877
-
878
- Params:
879
-
880
- - **[limit](#limit)**
881
- - **[page](#page)**
882
- - **[min\_date](#min_date)**
883
- - **[max\_date](#max_date)**
884
- - **[min\_updated\_at](#min_updated_at)**
885
- - **[max\_updated\_at](#max_updated_at)**
886
- - **[radius](#radius)**
887
- - **[ticket\_type](#ticket_type)**
888
- - **[must\_have\_tickets](#must_have_tickets)**
889
- - **[show\_disabled\_events](#show_disabled_events)**
890
- - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
891
- - **[show\_rumor\_events](#show_rumor_events)**
892
-
893
- Note: Time Zone is set as the time zone of the Metro Area and cannot be overridden.
894
-
895
- Returns: _Array_ of Metro Areas _Hash_
896
-
897
- ``` js
898
- // Example: GET /api/v3/metro_area/105/events?min_date=2011-04-05&max_date=2012-04-04&limit=3&api_key=1234567890abcdef
899
-
900
- [
901
- {
902
- "created_at": "2012-01-02T08:53:00Z",
903
- "festival": false,
904
- "id": 1011386,
905
- "latitude": 37.7771,
906
- "longitude": -122.42,
907
- "name": "Kontrol @ The End Up",
908
- "on_sale_date": null,
909
- "rumor": false,
910
- "start_date": "2012-01-07T00:00:04Z",
911
- "starts_at": "2012-01-07T08:00:04Z",
912
- "starts_at_time_trusted": false,
913
- "unconfirmed_location": 0,
914
- "updated_at": "2012-03-29T01:19:31Z",
915
- "venue_id": 47273,
916
- "photos": {
917
- "thumbnail": "http://i.development.tc-core.com/event/_default/default-thumbnail.jpg",
918
- "large": "http://i.development.tc-core.com/event/_default/default-large.jpg",
919
- "mobile": "http://i.development.tc-core.com/dan/venue/47273/107/1326489566/the-end-up-in-san-francisco-ca-mobile.jpg?1326489566"
920
- },
921
- "url": "http://thrillcall.com/event/1011386",
922
- "starts_at_local": "2012-01-07T00:00:04-08:00",
923
- "time_zone": "America/Los_Angeles"
924
- "status": "confirmed"
925
- },
926
- {
927
- ...
928
- },
929
- ...
930
- ]
931
- ```
932
-
933
- ## Person
934
- **Note:** Your API key requires the api\_auth permission to access the endpoints associated with this object.
935
-
936
- Fields:
937
-
938
- - **created\_at** _string_ ISO 8601 representation the time this object was created
939
- - **first\_name** _string_ First name of the Person
940
- - **gender** _string_ Gender of the Person
941
- - **id** _integer_ Thrillcall ID
942
- - **last\_name** _string_ Last name of the Person
943
- - **login** _string_ Login (Email Address) of the Person
944
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
945
- - **referral\_code** _string_ Referral code of the Person
946
- - **referral\_credits** _integer_ Number of Referral credits the Person has (including bonus points)
947
- - **postalcode** _string_ Postalcode of the Person
948
- - **photos** _hash_ A hash of image urls of the primary photo available for this object in different styles
949
-
950
- ### GET /person/:id
951
- Params:
952
-
953
- - None.
954
-
955
- Returns: Person _Hash_
956
-
957
- ``` js
958
- // Example: GET /api/v3/person/49?api_key=1234567890abcdef
959
-
960
- {
961
- "address1": null,
962
- "address2": null,
963
- "city": "Santa Rosa",
964
- "country_code": "US",
965
- "created_at": "2011-10-17T18:54:31Z",
966
- "first_name": "John",
967
- "gender": "m",
968
- "id": 49,
969
- "last_name": "Doe",
970
- "login": "bogus@bogus.com",
971
- "state": "CA",
972
- "time_zone": "America/Los_Angeles",
973
- "timezone": "-7",
974
- "updated_at": "2012-03-28T16:07:16Z",
975
- "referral_code": null,
976
- "referral_credits": 0,
977
- "postalcode": "95407",
978
- "photos": {
979
- "small_thumb": "http://i.development.tc-core.com/dan/person/164761/1324568419/19154-small_thumb.jpg?1324568419",
980
- "thumbnail": "http://i.development.tc-core.com/dan/person/164761/1324568419/19154-thumbnail.jpg?1324568419",
981
- "medium": "http://i.development.tc-core.com/dan/person/164761/1324568419/19154-medium.jpg?1324568419"
982
- }
983
- }
984
- ```
985
-
986
- ### POST /person/signin
987
- Params:
988
-
989
- - **[email](#email)**
990
- - **[password](#password)**
991
- - **[provider](#provider)**
992
- - **[uid](#uid)**
993
- - **[token](#token)**
994
- - **[first\_name](#first_name)**
995
- - **[last\_name](#last_name)**
996
- - **[location\_name](#location_name)**
997
- - **[lat](#lat)**
998
- - **[long](#long)**
999
- - **[referral\_code](#referral_code)**
1000
-
1001
- Use either **[email](#email)** / **[password](#password)** or **[provider](#provider)** / **[uid](#uid)** / **[token](#token)**.
1002
-
1003
- May perform registration ("signup") automatically if using **[provider](#provider)** / **[uid](#uid)** / **[token](#token)** when no match is found and name, location, and **[referral_code](#referral_code)** are also provided.
1004
-
1005
- Returns: Person _Hash_
1006
-
1007
- ``` js
1008
- // Example: POST /api/v3/person/signin?provider=facebook&uid=123123bogus&token=123123bogus&email=123123bogus%40bogus.com&first_name=Mister&last_name=Bogus&lat=38.5&long=-123.0&api_key=1234567890abcdef
1009
-
1010
- {
1011
- "address1": null,
1012
- "address2": null,
1013
- "city": null,
1014
- "country_code": null,
1015
- "created_at": null,
1016
- "first_name": "Mister",
1017
- "gender": null,
1018
- "last_name": "Bogus",
1019
- "login": null,
1020
- "state": null,
1021
- "time_zone": null,
1022
- "timezone": null,
1023
- "updated_at": null,
1024
- "referral_code": null,
1025
- "referral_credits": 0,
1026
- "postalcode": null,
1027
- "photos": {
1028
- "small_thumb": "http://i.development.tc-core.com/person/_default/default-small_thumb.jpg",
1029
- "thumbnail": "http://i.development.tc-core.com/person/_default/default-thumbnail.jpg",
1030
- "medium": "http://i.development.tc-core.com/person/_default/default-medium.jpg"
1031
- }
1032
- }
1033
- ```
1034
-
1035
- ### POST /person/signup
1036
- Params:
1037
-
1038
- - **[first\_name](#first_name)**
1039
- - **[last\_name](#last_name)**
1040
- - **[gender](#gender)**
1041
- - **[email](#email)**
1042
- - **[password](#password)**
1043
- - **[postalcode](#postalcode)**
1044
- - **[referral\_code](#referral_code)**
1045
-
1046
- Returns: Person _Hash_
1047
-
1048
- ``` js
1049
- // Example: POST /api/v3/person/signup?first_name=Mister&email=bogus%40bogus.com&password=bogus&postalcode=94108&api_key=1234567890abcdef
1050
-
1051
- {
1052
- "address1": null,
1053
- "address2": null,
1054
- "city": null,
1055
- "country_code": null,
1056
- "created_at": null,
1057
- "first_name": "Mister",
1058
- "gender": null,
1059
- "last_name": null,
1060
- "login": null,
1061
- "state": null,
1062
- "time_zone": null,
1063
- "timezone": null,
1064
- "updated_at": null,
1065
- "referral_code": null,
1066
- "referral_credits": 0,
1067
- "postalcode": null,
1068
- "photos": {
1069
- "small_thumb": "http://i.development.tc-core.com/person/_default/default-small_thumb.jpg",
1070
- "thumbnail": "http://i.development.tc-core.com/person/_default/default-thumbnail.jpg",
1071
- "medium": "http://i.development.tc-core.com/person/_default/default-medium.jpg"
1072
- }
1073
- }
1074
- ```
1075
-
1076
-
1077
- ## Venues
1078
- Fields:
1079
-
1080
- - **address1** _string_ First address field for the Venue
1081
- - **address2** _string_ Second address field for the Venue
1082
- - **city** _string_ City the Venue is in
1083
- - **country** _string_ Country the Venue is in
1084
- - **created\_at** _string_ ISO 8601 representation the time this object was created
1085
- - **id** _integer_ Thrillcall ID
1086
- - **latitude** _float_ Approximate Latitude for the Venue
1087
- - **long\_description** _text_ Description of the Venue
1088
- - **longitude** _float_ Approximate Longitude for the Venue
1089
- - **name** _string_ Name of the Venue
1090
- - **metro\_area\_id** _integer_ Thrillcall ID of the Metro Area this Venue is in, if any
1091
- - **state** _string_ State the Venue is in
1092
- - **upcoming\_events\_count** _integer_ Number of upcoming events associated with this object
1093
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
1094
- - **postalcode** _string_ Postal code for the Venue
1095
- - **phone\_number** _string_ Phone number for the Venue (including country code)
1096
- - **photos** _hash_ A hash of image urls of the primary photo available for this object in different styles
1097
- - **url** _string_ URL for this object on Thrillcall
1098
-
1099
-
1100
- ### GET /venues
1101
- Params:
1102
-
1103
- - **[limit](#limit)**
1104
- - **[page](#page)**
1105
- - **[lat](#lat)**
1106
- - **[long](#long)**
1107
- - **[postalcode](#postalcode)**
1108
- - **[radius](#radius)**
1109
-
1110
- Returns: _Array_ of Venues _Hash_
1111
-
1112
- ``` js
1113
- // Example: GET /api/v3/venues?limit=14&api_key=1234567890abcdef
1114
-
1115
- [
1116
- {
1117
- "address1": null,
1118
- "address2": null,
1119
- "city": "Guadalajara",
1120
- "country": "MX",
1121
- "created_at": "2008-05-09T09:29:23Z",
1122
- "id": 1,
1123
- "latitude": 20.666222,
1124
- "long_description": null,
1125
- "longitude": -103.352089,
1126
- "name": "Fbolko",
1127
- "phone_number": null,
1128
- "state": "MX",
1129
- "time_zone": "America/Mexico_City",
1130
- "upcoming_events_count": 0,
1131
- "updated_at": "2012-03-29T00:04:23Z",
1132
- "postalcode": null,
1133
- "photos": {
1134
- "thumbnail": "http://i.development.tc-core.com/venue/_default/default-thumbnail.jpg",
1135
- "medium": "http://i.development.tc-core.com/venue/_default/default-medium.jpg",
1136
- "large": "http://i.development.tc-core.com/venue/_default/default-large.jpg",
1137
- "mobile": "http://i.development.tc-core.com/venue/_default/default-mobile.jpg"
1138
- },
1139
- "metro_area_id": null,
1140
- "url": "http://thrillcall.com/venue/Fbolko_in_Guadalajara_MX"
1141
- },
1142
- {
1143
- ...
1144
- },
1145
- ...
1146
- ]
1147
- ```
1148
-
1149
-
1150
- ### GET /venue/:id
1151
- **:id** _integer_ Thrillcall or Partner ID
1152
-
1153
- Params:
1154
-
1155
- - **[use\_partner\_id](#use_partner_id)**
1156
-
1157
- Returns: Venue _Hash_
1158
-
1159
- ``` js
1160
- // Example: GET /api/v3/venue/51886?api_key=1234567890abcdef
1161
-
1162
- {
1163
- "address1": "201 Van Ness Avenue",
1164
- "address2": null,
1165
- "city": "San Francisco",
1166
- "country": "US",
1167
- "created_at": "2008-04-28T17:59:32Z",
1168
- "id": 51886,
1169
- "latitude": 37.777402,
1170
- "long_description": null,
1171
- "longitude": -122.419815,
1172
- "name": "Davies Symphony Hall",
1173
- "phone_number": "(415) 864-6000",
1174
- "state": "CA",
1175
- "time_zone": "America/Los_Angeles",
1176
- "upcoming_events_count": 48,
1177
- "updated_at": "2012-03-28T03:13:27Z",
1178
- "postalcode": "94102",
1179
- "photos": {
1180
- "thumbnail": "http://i.development.tc-core.com/dan/venue/51886/74/1326417154/davies-symphony-hall-in-san-francisco-ca-thumbnail.jpg?1326417154",
1181
- "medium": "http://i.development.tc-core.com/dan/venue/51886/74/1326417154/davies-symphony-hall-in-san-francisco-ca-medium.jpg?1326417154",
1182
- "large": "http://i.development.tc-core.com/dan/venue/51886/74/1326417154/davies-symphony-hall-in-san-francisco-ca-large.jpg?1326417154",
1183
- "mobile": "http://i.development.tc-core.com/dan/venue/51886/74/1326417154/davies-symphony-hall-in-san-francisco-ca-mobile.jpg?1326417154"
1184
- },
1185
- "metro_area_id": 105,
1186
- "url": "http://thrillcall.com/venue/Davies_Symphony_Hall_in_San_Francisco_CA"
1187
- }
1188
- ```
1189
-
1190
- ### GET /venue/:id/events
1191
- **:id** _integer_ Thrillcall or Partner ID
1192
-
1193
- Params:
1194
-
1195
- - **[limit](#limit)**
1196
- - **[page](#page)**
1197
- - **[time\_zone](#time_zone)**
1198
- - **[min\_date](#min_date)**
1199
- - **[max\_date](#max_date)**
1200
- - **[min\_updated\_at](#min_updated_at)**
1201
- - **[max\_updated\_at](#max_updated_at)**
1202
- - **[use\_partner\_id](#use_partner_id)**
1203
- - **[ticket\_type](#ticket_type)**
1204
- - **[must\_have\_tickets](#must_have_tickets)**
1205
- - **[show\_disabled\_events](#show_disabled_events)**
1206
- - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
1207
- - **[show\_rumor\_events](#show_rumor_events)**
1208
-
1209
- Returns: _Array_ of Events _Hash_
1210
-
1211
- ``` js
1212
- // Example: GET /api/v3/venue/63279/events?api_key=1234567890abcdef
1213
-
1214
- [
1215
- {
1216
- "created_at": "2012-03-02T18:06:14Z",
1217
- "festival": false,
1218
- "id": 1047075,
1219
- "latitude": 37.7915,
1220
- "longitude": -122.413,
1221
- "name": "Il Volo @ Masonic Center",
1222
- "on_sale_date": null,
1223
- "rumor": false,
1224
- "start_date": "2012-09-29T19:30:04Z",
1225
- "starts_at": "2012-09-30T02:30:04Z",
1226
- "starts_at_time_trusted": true,
1227
- "unconfirmed_location": 0,
1228
- "updated_at": "2012-03-29T01:35:57Z",
1229
- "venue_id": 63279,
1230
- "photos": {
1231
- "thumbnail": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-thumbnail.jpg?1324561426",
1232
- "large": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-large.jpg?1324561426",
1233
- "mobile": "http://i.development.tc-core.com/dan/artist/378465/10658/1324561426/il-volo-mobile.jpg?1324561426"
1234
- },
1235
- "url": "http://thrillcall.com/event/1047075",
1236
- "starts_at_local": "2012-09-29T19:30:04-07:00",
1237
- "time_zone": "America/Los_Angeles"
1238
- "status": "confirmed"
1239
- },
1240
- {
1241
- ...
1242
- },
1243
- ...
1244
- ]
1245
- ```
1246
-
1247
- ### GET /search/venues/:term
1248
- **:term** _string_ Arbitrary search string on the **name** field. (alphanumerics only, underscore matches underscore, use '+' for space)
1249
-
1250
- Params:
1251
-
1252
- - **[limit](#limit)**
1253
- - **[page](#page)**
1254
- - **[lat](#lat)**
1255
- - **[long](#long)**
1256
- - **[postalcode](#postalcode)**
1257
- - **[radius](#radius)**
1258
-
1259
- Returns: _Array_ of Venues _Hash_
1260
-
1261
- ``` js
1262
- // Example: GET /api/v3/search/venues/Masonic%20Center?api_key=1234567890abcdef
1263
-
1264
- [
1265
- {
1266
- "address1": "525 W Riverview Ave",
1267
- "address2": null,
1268
- "city": "Dayton",
1269
- "country": "US",
1270
- "created_at": "2008-06-12T14:12:53Z",
1271
- "id": 33642,
1272
- "latitude": 39.765526,
1273
- "long_description": null,
1274
- "longitude": -84.203133,
1275
- "name": "Dayton Masonic Center",
1276
- "phone_number": null,
1277
- "state": "OH",
1278
- "time_zone": "America/New_York",
1279
- "upcoming_events_count": 0,
1280
- "updated_at": "2012-03-28T03:11:49Z",
1281
- "postalcode": "45405",
1282
- "photos": {
1283
- "thumbnail": "http://i.development.tc-core.com/venue/_default/default-thumbnail.jpg",
1284
- "medium": "http://i.development.tc-core.com/venue/_default/default-medium.jpg",
1285
- "large": "http://i.development.tc-core.com/venue/_default/default-large.jpg",
1286
- "mobile": "http://i.development.tc-core.com/venue/_default/default-mobile.jpg"
1287
- },
1288
- "metro_area_id": 134,
1289
- "url": "http://thrillcall.com/venue/Dayton_Masonic_Center_in_Dayton_OH"
1290
- },
1291
- {
1292
- ...
1293
- },
1294
- ...
1295
- ]
1296
- ```
1297
-
1298
- ## Tickets
1299
- Fields:
1300
-
1301
- - **created\_at** _string_ ISO 8601 representation the time this object was created
1302
- - **description** _string_ Long form description of the ticket
1303
- - **event\_id** _integer_ Thrillcall Event ID
1304
- - **id** _integer_ Thrillcall ID
1305
- - **marketing\_text** _string_ Long form description of the ticket
1306
- - **max\_ticket\_price** _float_ Maximum price for this ticket
1307
- - **min\_ticket\_price** _float_ Minimum price for this ticket
1308
- - **name** _string_ Name of this ticket
1309
- - **on\_sale\_end\_date** _string_ YYYY-MM-DD date when the ticket goes off sale
1310
- - **on\_sale\_start\_date** _string_ YYYY-MM-DD date when the ticket goes on sale
1311
- - **seat\_info** _string_ Additional info about the seat
1312
- - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
1313
- - **url** _string_ URL for this object on Thrillcall
1314
-
1315
- ### GET /tickets
1316
- Params:
1317
-
1318
- - **[limit](#limit)**
1319
- - **[page](#page)**
1320
- - **[time\_zone](#time_zone)**
1321
- - **[min\_date](#min_date)**
1322
- - **[max\_date](#max_date)**
1323
- - **[min\_updated\_at](#min_updated_at)**
1324
- - **[max\_updated\_at](#max_updated_at)**
1325
- - **[lat](#lat)**
1326
- - **[long](#long)**
1327
- - **[postalcode](#postalcode)**
1328
- - **[radius](#radius)**
1329
- - **[ticket\_type](#ticket_type)**
1330
- - **[show\_disabled\_events](#show_disabled_events)**
1331
- - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
1332
- - **[show\_rumor\_events](#show_rumor_events)**
1333
-
1334
- Returns: _Array_ of Tickets _Hash_
1335
-
1336
- ``` js
1337
- // Example: GET /api/v3/tickets?limit=14&api_key=1234567890abcdef
1338
-
1339
- [
1340
- {
1341
- "created_at": "2008-12-06T00:19:59Z",
1342
- "description": null,
1343
- "event_id": 455646,
1344
- "id": 1,
1345
- "marketing_text": null,
1346
- "max_ticket_price": null,
1347
- "min_ticket_price": null,
1348
- "name": "General Onsale",
1349
- "on_sale_end_date": null,
1350
- "on_sale_start_date": null,
1351
- "seat_info": null,
1352
- "updated_at": "2009-09-22T22:58:37Z",
1353
- "url": "http://www.livenation.com/edp/eventId/335800/?c=api-000157"
1354
- },
1355
- {
1356
- ...
1357
- },
1358
- ...
1359
- ]
1360
- ```
1361
-
1362
- ### GET /ticket/:id
1363
- **:id** _integer_ Thrillcall ID
1364
-
1365
- Params:
1366
-
1367
- - None
1368
-
1369
- Returns: Ticket _Hash_
1370
-
1371
- ``` js
1372
- // Example: GET /api/v3/ticket/819883?api_key=1234567890abcdef
1373
-
1374
- {
1375
- "created_at": "2012-03-02T18:06:14Z",
1376
- "description": null,
1377
- "event_id": 1047075,
1378
- "id": 819883,
1379
- "marketing_text": null,
1380
- "max_ticket_price": 85,
1381
- "min_ticket_price": 29,
1382
- "name": "Onsale to General Public",
1383
- "on_sale_end_date": null,
1384
- "on_sale_start_date": null,
1385
- "seat_info": null,
1386
- "updated_at": "2012-03-02T18:06:14Z",
1387
- "url": "http://ticketsus.at/thrillcall?CTY=39&DURL=http://www.ticketmaster.com/event/1C00486178A1251A?camefrom=CFC_BUYAT&brand=[=BRAND=]"
1388
- }
1389
- ```