thrillcall-api 0.0.3

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.
data/.autotest ADDED
@@ -0,0 +1,10 @@
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 ADDED
@@ -0,0 +1,10 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
4
+ log/
5
+ tmp/
6
+
7
+ # osx noise
8
+ .DS_Store
9
+ profile
10
+
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --format d
3
+ --backtrace
4
+
data/.rvmrc ADDED
@@ -0,0 +1,2 @@
1
+ rvm ruby-1.9.2-p290@thrillcall-api
2
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in thrillcall_api.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,58 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ thrillcall-api (0.0.3)
5
+ faraday (~> 0.7.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ ZenTest (4.4.2)
11
+ addressable (2.2.6)
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.5)
17
+ sys-uname
18
+ autotest-growl (0.2.9)
19
+ awesome_print (0.3.2)
20
+ diff-lcs (1.1.2)
21
+ faker (0.9.5)
22
+ i18n (~> 0.4)
23
+ faraday (0.7.5)
24
+ addressable (~> 2.2.6)
25
+ multipart-post (~> 1.1.3)
26
+ rack (>= 1.1.0, < 2)
27
+ i18n (0.6.0)
28
+ multipart-post (1.1.4)
29
+ nokogiri (1.4.6)
30
+ posix-spawn (0.3.6)
31
+ rack (1.3.5)
32
+ redcarpet (1.17.2)
33
+ rspec (2.1.0)
34
+ rspec-core (~> 2.1.0)
35
+ rspec-expectations (~> 2.1.0)
36
+ rspec-mocks (~> 2.1.0)
37
+ rspec-core (2.1.0)
38
+ rspec-expectations (2.1.0)
39
+ diff-lcs (~> 1.1.2)
40
+ rspec-mocks (2.1.0)
41
+ sys-uname (0.8.5)
42
+
43
+ PLATFORMS
44
+ ruby
45
+
46
+ DEPENDENCIES
47
+ ZenTest (~> 4.4.0)
48
+ albino (~> 1.3.3)
49
+ autotest (~> 4.4.2)
50
+ autotest-fsevent (~> 0.2.3)
51
+ autotest-growl (~> 0.2.6)
52
+ awesome_print (~> 0.3.2)
53
+ bundler (>= 1.0.0)
54
+ faker (~> 0.9.5)
55
+ nokogiri (~> 1.4.6)
56
+ redcarpet (~> 1.17.2)
57
+ rspec (~> 2.1.0)
58
+ thrillcall-api!
data/README.md ADDED
@@ -0,0 +1,1141 @@
1
+ # Thrillcall API
2
+ This document describes the Thrillcall API v2, 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 2.
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/v2/"
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 100.
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="min_date" />**min\_date** _string (format: "YYYY-MM-DD")_
148
+
149
+ _Default: Today_
150
+
151
+ Results before this date will not be returned.
152
+
153
+ - <a name="max_date" />**max\_date** _string (format: "YYYY-MM-DD")_
154
+
155
+ _Default: 1 year from Today_
156
+
157
+ Results after this date will not be returned.
158
+
159
+ - <a name="lat" />**lat** _float_
160
+
161
+ _Default: none_
162
+
163
+ If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, results will be within **[radius](#radius)** of this location.
164
+
165
+ - <a name="long" />**long** _float_
166
+
167
+ _Default: none_
168
+
169
+ If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, results will be within **[radius](#radius)** of this location.
170
+
171
+ - <a name="postalcode" />**postalcode** _string (format: length >= 5)_
172
+
173
+ _Default: none_
174
+
175
+ Results will be within the **[radius](#radius)** of this postal code.
176
+ If latitude (**[lat](#lat)**) and longitude (**[long](#long)**) if both are specified, this will be ignored.
177
+
178
+ - <a name="radius" />**radius** _float_
179
+
180
+ _Default: 100.0_
181
+
182
+ Used in conjunction with **[postalcode](#postalcode)**
183
+
184
+ - <a name="use_partner_id" />**use\_partner\_id** _boolean_
185
+
186
+ _Default: false_
187
+
188
+ If set to _true_ or _1_, instead of using Thrillcall internal IDs, treat any IDs in a request as belonging to your partner definition.
189
+
190
+ Contact us to set up a list of definitions.
191
+
192
+ - <a name="ticket_type" />**ticket\_type** _string (format: "primary" or "resale")_
193
+
194
+ _Default: both_
195
+
196
+ If specified, will only return tickets from Primary or Resale merchants.
197
+
198
+ - <a name="must_have_tickets" />**must\_have\_tickets** _boolean_
199
+
200
+ _Default: false_
201
+
202
+ If set to _true_ or _1_, will only return results that have tickets associated with them.
203
+
204
+ - <a name="show_unconfirmed_events" />**show\_unconfirmed\_events** _boolean_
205
+
206
+ _Default: false_
207
+
208
+ If set to _true_ or _1_, will not filter out events with unconfirmed locations.
209
+
210
+ - <a name="show_rumor_events" />**show\_rumor\_events** _boolean_
211
+
212
+ _Default: false_
213
+
214
+ If set to _true_ or _1_, will not filter out events marked as rumored.
215
+
216
+ - <a name="primary_genre_id" />**primary\_genre\_id** _integer_
217
+
218
+ _Default: none_
219
+
220
+ If set, will filter Artist results to only those with the specified **[primary\_genre\_id](#primary_genre_id)**
221
+
222
+ - <a name="login" />**login** _string_
223
+
224
+ Required to authenticate/register a user.
225
+
226
+ - <a name="password" />**password** _string (format: 40 >= length >= 5)_
227
+
228
+ Required to authenticate/register a user.
229
+
230
+ - <a name="first_name" />**first\_name** _string (format: 50 >= length >= 2)_
231
+
232
+ Required to register a user.
233
+
234
+ - <a name="last_name" />**last\_name** _string (format: 50 >= length >= 2)_
235
+
236
+ Optional for registering a user.
237
+
238
+ - <a name="email" />**email** _string_
239
+
240
+ Required to register a user.
241
+
242
+ - <a name="gender" />**gender** _string (format: length == 1)_
243
+
244
+ Optional for registering a user.
245
+
246
+ ## Artists
247
+ Fields:
248
+
249
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
250
+ - **genre\_tags** _string_ Semicolon separated list of Genre names
251
+ - **id** _integer_ Thrillcall ID
252
+ - **name** _string_ Artist / Band Name
253
+ - **primary\_genre\_id** _integer_ The Thrillcall ID for this artist's primary Genre
254
+ - **upcoming\_events\_count** _integer_ Number of upcoming events associated with this object
255
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
256
+ - **url** _string_ URL for this object on Thrillcall
257
+
258
+
259
+ ### GET /artists
260
+ Params:
261
+
262
+ - **[limit](#limit)**
263
+ - **[page](#page)**
264
+ - **[primary\_genre\_id](#primary_genre_id)**
265
+
266
+ Returns: _Array_ of Artists _Hash_
267
+
268
+ ``` js
269
+ // Example: GET /api/v2/artists?limit=14&api_key=1234567890abcdef
270
+
271
+ [
272
+ {
273
+ "created_at": "2008-04-29T10:19:45Z",
274
+ "genre_tags": "O",
275
+ "id": 1,
276
+ "name": "Hyler Jones Proteges",
277
+ "primary_genre_id": 61,
278
+ "upcoming_events_count": 0,
279
+ "updated_at": "2010-03-26T16:49:20Z",
280
+ "url": "http://thrillcall.com/artist/Hyler_Jones_Proteges"
281
+ },
282
+ {
283
+ ...
284
+ },
285
+ ...
286
+ ]
287
+ ```
288
+
289
+ ### GET /artist/:id
290
+ **:id** _integer_ Thrillcall or Partner ID
291
+
292
+ Params:
293
+
294
+ - **[use\_partner\_id](#use_partner_id)**
295
+
296
+ Returns: Artist _Hash_
297
+
298
+ ``` js
299
+ // Example: GET /api/v2/artist/4802?api_key=1234567890abcdef
300
+
301
+ {
302
+ "created_at": "2008-04-28T18:56:09Z",
303
+ "genre_tags": "Rock",
304
+ "id": 4802,
305
+ "name": "The Sea and Cake",
306
+ "primary_genre_id": 27,
307
+ "upcoming_events_count": 8,
308
+ "updated_at": "2011-09-20T19:12:57Z",
309
+ "url": "http://thrillcall.com/artist/The_Sea_and_Cake"
310
+ }
311
+ ```
312
+
313
+ ### GET /artist/:id/events
314
+ **:id** _integer_ Thrillcall or Partner ID
315
+
316
+ Params:
317
+
318
+ - **[limit](#limit)**
319
+ - **[page](#page)**
320
+ - **[min\_date](#min_date)**
321
+ - **[max\_date](#max_date)**
322
+ - **[lat](#lat)**
323
+ - **[long](#long)**
324
+ - **[postalcode](#postalcode)**
325
+ - **[radius](#radius)**
326
+ - **[use\_partner\_id](#use_partner_id)**
327
+ - **[ticket\_type](#ticket_type)**
328
+ - **[must\_have\_tickets](#must_have_tickets)**
329
+ - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
330
+ - **[show\_rumor\_events](#show_rumor_events)**
331
+
332
+ Returns: _Array_ of Events _Hash_
333
+
334
+ ``` js
335
+ // Example: GET /api/v2/artist/4802/events?api_key=1234567890abcdef
336
+
337
+ [
338
+ {
339
+ "created_at": "2011-06-23T23:10:31Z",
340
+ "end_date": null,
341
+ "festival": false,
342
+ "id": 862618,
343
+ "latitude": 30.2729,
344
+ "longitude": -97.7405,
345
+ "name": "The Sea and Cake @ The Mohawk",
346
+ "num_cancelled_bookings": 0,
347
+ "num_confirmed_bookings": 1,
348
+ "num_disabled_bookings": 0,
349
+ "num_unconfirmed_bookings": 0,
350
+ "on_sale_date": null,
351
+ "rumor": false,
352
+ "start_date": "2011-12-09T05:59:00Z",
353
+ "unconfirmed_location": 0,
354
+ "updated_at": "2011-09-28T04:01:56Z",
355
+ "venue_id": 10116,
356
+ "url": "http://thrillcall.com/event/862618"
357
+ },
358
+ {
359
+ ...
360
+ },
361
+ ...
362
+ ]
363
+ ```
364
+
365
+ ### GET /search/artists/:term
366
+ **:term** _string_ Arbitrary search string on the **name** field. (alphanumerics only, underscore matches underscore, use '+' for space)
367
+
368
+ Params:
369
+
370
+ - **[limit](#limit)**
371
+ - **[page](#page)**
372
+
373
+ Returns: _Array_ of Artists _Hash_
374
+
375
+ ``` js
376
+ // Example: GET /api/v2/search/artists/The%20Sea%20and%20Cake?api_key=1234567890abcdef
377
+
378
+ [
379
+ {
380
+ "created_at": "2008-04-28T18:56:09Z",
381
+ "genre_tags": "Rock",
382
+ "id": 4802,
383
+ "name": "The Sea and Cake",
384
+ "primary_genre_id": 27,
385
+ "upcoming_events_count": 8,
386
+ "updated_at": "2011-09-20T19:12:57Z",
387
+ "url": "http://thrillcall.com/artist/The_Sea_and_Cake"
388
+ },
389
+ {
390
+ ...
391
+ },
392
+ ...
393
+ ]
394
+ ```
395
+
396
+ ## Events
397
+ Fields:
398
+
399
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
400
+ - **end\_date** _string_ ISO 8601 representation of the end of the Event
401
+ - **festival** _boolean_ Is this event a festival?
402
+ - **id** _integer_ Thrillcall ID
403
+ - **latitude** _float_ Approximate latitude for the Event
404
+ - **longitude** _float_ Approximate longitude for the Event
405
+ - **name** _string_ Name of the Event
406
+ - **num\_confirmed\_bookings** _integer_ The number of confirmed Artist bookings for this event. Only Artists with a confirmed booking are returned when requesting artists for an event.
407
+ - **num\_unconfirmed\_bookings** _integer_ The number of unconfirmed Artist bookings for this event
408
+ - **num\_disabled\_bookings** _integer_ The number of disabled Artist bookings for this event
409
+ - **num\_cancelled\_bookings** _integer_ The number of cancelled Artist bookings for this event
410
+ - **on\_sale\_date** _string_ ISO 8601 representation of the date when tickets go on sale
411
+ - **rumor** _boolean_ Are the details for this event based on a rumor?
412
+ - **start\_date** _string_ YYYY-MM-DD or, if time of day is known, ISO 8601 representation of the start of the Event
413
+ - **unconfirmed\_location** _integer_ If 1, the location if this event is unconfirmed
414
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
415
+ - **venue\_id** _integer_ Thrillcall Venue ID
416
+ - **url** _string_ URL for this object on Thrillcall
417
+
418
+
419
+ ### GET /events
420
+ Params:
421
+
422
+ - **[limit](#limit)**
423
+ - **[page](#page)**
424
+ - **[min\_date](#min_date)**
425
+ - **[max\_date](#max_date)**
426
+ - **[lat](#lat)**
427
+ - **[long](#long)**
428
+ - **[postalcode](#postalcode)**
429
+ - **[radius](#radius)**
430
+ - **[ticket\_type](#ticket_type)**
431
+ - **[must\_have\_tickets](#must_have_tickets)**
432
+ - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
433
+ - **[show\_rumor\_events](#show_rumor_events)**
434
+
435
+ Returns: _Array_ of Events _Hash_
436
+
437
+ ``` js
438
+ // Example: GET /api/v2/events?must_have_tickets=true&postalcode=94108&radius=10&limit=3&api_key=1234567890abcdef
439
+
440
+ [
441
+ {
442
+ "created_at": "2011-06-14T00:09:13Z",
443
+ "end_date": null,
444
+ "festival": false,
445
+ "id": 858707,
446
+ "latitude": 37.7951,
447
+ "longitude": -122.421,
448
+ "name": "The Sea and Cake @ Great American Music Hall",
449
+ "num_cancelled_bookings": 0,
450
+ "num_confirmed_bookings": 1,
451
+ "num_disabled_bookings": 0,
452
+ "num_unconfirmed_bookings": 0,
453
+ "on_sale_date": null,
454
+ "rumor": false,
455
+ "start_date": "2011-12-06T07:59:00Z",
456
+ "unconfirmed_location": 0,
457
+ "updated_at": "2011-09-28T04:00:41Z",
458
+ "venue_id": 27418,
459
+ "url": "http://thrillcall.com/event/858707"
460
+ },
461
+ {
462
+ ...
463
+ },
464
+ ...
465
+ ]
466
+ ```
467
+
468
+ ### GET /event/:id
469
+ **:id** _integer_ Thrillcall ID
470
+
471
+ Params:
472
+
473
+ - None
474
+
475
+ Returns: Event _Hash_
476
+
477
+ ``` js
478
+ // Example: GET /api/v2/event/858707?api_key=1234567890abcdef
479
+
480
+ {
481
+ "created_at": "2011-06-14T00:09:13Z",
482
+ "end_date": null,
483
+ "festival": false,
484
+ "id": 858707,
485
+ "latitude": 37.7951,
486
+ "longitude": -122.421,
487
+ "name": "The Sea and Cake @ Great American Music Hall",
488
+ "num_cancelled_bookings": 0,
489
+ "num_confirmed_bookings": 1,
490
+ "num_disabled_bookings": 0,
491
+ "num_unconfirmed_bookings": 0,
492
+ "on_sale_date": null,
493
+ "rumor": false,
494
+ "start_date": "2011-12-06T07:59:00Z",
495
+ "unconfirmed_location": 0,
496
+ "updated_at": "2011-09-28T04:00:41Z",
497
+ "venue_id": 27418,
498
+ "url": "http://thrillcall.com/event/858707"
499
+ }
500
+ ```
501
+
502
+ ### GET /event/:id/artists
503
+ **:id** _integer_ Thrillcall ID
504
+
505
+ Params:
506
+
507
+ - **[limit](#limit)**
508
+ - **[page](#page)**
509
+
510
+ Returns: _Array_ of Artists _Hash_
511
+
512
+ ``` js
513
+ // Example: GET /api/v2/event/858707/artists?api_key=1234567890abcdef
514
+
515
+ [
516
+ {
517
+ "created_at": "2008-04-28T18:56:09Z",
518
+ "genre_tags": "Rock",
519
+ "id": 4802,
520
+ "name": "The Sea and Cake",
521
+ "primary_genre_id": 27,
522
+ "upcoming_events_count": 8,
523
+ "updated_at": "2011-09-20T19:12:57Z",
524
+ "url": "http://thrillcall.com/artist/The_Sea_and_Cake"
525
+ },
526
+ {
527
+ ...
528
+ },
529
+ ...
530
+ ]
531
+ ```
532
+
533
+ ### GET /event/:id/venue
534
+ **:id** _integer_ Thrillcall ID
535
+
536
+ Params:
537
+
538
+ - None
539
+
540
+ Returns: Venue _Hash_
541
+
542
+ ``` js
543
+ // Example: GET /api/v2/event/858707/venue?api_key=1234567890abcdef
544
+
545
+ {
546
+ "address1": "859 O'Farrell St.",
547
+ "address2": null,
548
+ "city": "San Francisco",
549
+ "country": "US",
550
+ "created_at": "2008-04-21T16:52:31Z",
551
+ "id": 27418,
552
+ "latitude": 37.784796,
553
+ "longitude": -122.418819,
554
+ "name": "Great American Music Hall",
555
+ "state": "CA",
556
+ "upcoming_events_count": 34,
557
+ "updated_at": "2011-01-20T21:04:37Z",
558
+ "postalcode": "94109",
559
+ "metro_area_id": 105,
560
+ "url": "http://thrillcall.com/venue/Great_American_Music_Hall_in_San_Francisco_CA"
561
+ }
562
+ ```
563
+
564
+ ### GET /event/:id/tickets
565
+ **:id** _integer_ Thrillcall ID
566
+
567
+ Params:
568
+
569
+ - **[limit](#limit)**
570
+ - **[page](#page)**
571
+ - **[ticket\_type](#ticket_type)**
572
+
573
+ Returns: _Array_ of Tickets _Hash_
574
+
575
+ ``` js
576
+ // Example: GET /api/v2/event/858707/tickets?api_key=1234567890abcdef
577
+
578
+ [
579
+ {
580
+ "created_at": "2011-06-14T00:09:16Z",
581
+ "description": null,
582
+ "event_id": 858707,
583
+ "id": 599794,
584
+ "marketing_text": null,
585
+ "max_ticket_price": 21,
586
+ "min_ticket_price": null,
587
+ "name": "Gen. Admission Seating Limited",
588
+ "on_sale_end_date": null,
589
+ "on_sale_start_date": null,
590
+ "seat_info": null,
591
+ "updated_at": "2011-06-14T00:09:16Z",
592
+ "url": "http://tickets.gamh.com/evinfo.php?eventid=154723&amp;r=affi&amp;u=210785"
593
+ },
594
+ {
595
+ ...
596
+ },
597
+ ...
598
+ ]
599
+ ```
600
+
601
+ ## Genre
602
+ Fields:
603
+
604
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
605
+ - **description** _string_ Description of the Genre
606
+ - **id** _integer_ Thrillcall ID
607
+ - **name** _string_ Name of the Genre
608
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
609
+
610
+ ### GET /genres
611
+ Params:
612
+
613
+ - **[limit](#limit)**
614
+ - **[page](#page)**
615
+
616
+ Returns: _Array_ of Genres _Hash_
617
+
618
+ ``` js
619
+ // Example: GET /api/v2/genres?limit=14&api_key=1234567890abcdef
620
+
621
+ [
622
+ {
623
+ "created_at": "2008-07-09T19:17:45Z",
624
+ "description": "Shawn Colvin, Loudon Wainwright III etc...",
625
+ "id": 6,
626
+ "name": "Folk",
627
+ "updated_at": "2010-03-25T23:51:55Z"
628
+ },
629
+ {
630
+ ...
631
+ },
632
+ ...
633
+ ]
634
+ ```
635
+
636
+ ### GET /genre/:id
637
+ **:id** _integer_ Thrillcall ID
638
+
639
+ Params:
640
+
641
+ - None
642
+
643
+ Returns: Genre _Hash_
644
+
645
+ ``` js
646
+ // Example: GET /api/v2/genre/27?api_key=1234567890abcdef
647
+
648
+ {
649
+ "created_at": "2008-07-09T19:17:45Z",
650
+ "description": "U2, 30 Seconds To Mars etc...",
651
+ "id": 27,
652
+ "name": "Rock",
653
+ "updated_at": "2010-03-25T23:52:21Z"
654
+ }
655
+ ```
656
+
657
+ ### GET /genre/:id/artists
658
+ **:id** _integer_ Thrillcall ID
659
+
660
+ Params:
661
+
662
+ - **[limit](#limit)**
663
+ - **[page](#page)**
664
+
665
+ Returns: _Array_ of Artists _Hash_
666
+
667
+ ``` js
668
+ // Example: GET /api/v2/genre/27/artists?api_key=1234567890abcdef
669
+
670
+ [
671
+ {
672
+ "created_at": "2008-04-29T10:06:05Z",
673
+ "genre_tags": "Folk;Other;psychedelic",
674
+ "id": 2,
675
+ "name": "Espers",
676
+ "primary_genre_id": 27,
677
+ "upcoming_events_count": 1,
678
+ "updated_at": "2011-01-03T22:14:36Z",
679
+ "url": "http://thrillcall.com/artist/Espers"
680
+ },
681
+ {
682
+ ...
683
+ },
684
+ ...
685
+ ]
686
+ ```
687
+
688
+ ## Metro Area
689
+ Fields:
690
+
691
+ - **city** _string_ City of the Metro Area
692
+ - **country** _string_ Country of the Metro Area
693
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
694
+ - **id** _integer_ Thrillcall ID
695
+ - **latitude** _float_ Latitude of the Metro Area
696
+ - **longitude** _float_ Longitude of the Metro Area
697
+ - **radius** _integer_ Radius of the Metro Area from the Lat/Long center
698
+ - **state** _string_ State of the Metro Area
699
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
700
+ - **url** _string_ URL for this object on Thrillcall
701
+
702
+ ### GET /metro_areas
703
+ Params:
704
+
705
+ - **[limit](#limit)**
706
+ - **[page](#page)**
707
+
708
+ Returns: _Array_ of Metro Areas _Hash_
709
+
710
+ ``` js
711
+ // Example: GET /api/v2/metro_areas?limit=14&api_key=1234567890abcdef
712
+
713
+ [
714
+ {
715
+ "city": "Chicago",
716
+ "country": "US",
717
+ "created_at": "2011-06-24T03:23:57Z",
718
+ "id": 104,
719
+ "latitude": 41.8842,
720
+ "longitude": -87.6324,
721
+ "radius": 50,
722
+ "state": "IL",
723
+ "updated_at": "2011-07-05T23:11:24Z",
724
+ "url": "http://thrillcall.com/live-music/chicago"
725
+ },
726
+ {
727
+ ...
728
+ },
729
+ ...
730
+ ]
731
+ ```
732
+
733
+ ### GET /metro_area/:id
734
+ **:id** _integer_ Thrillcall ID
735
+
736
+ Params:
737
+
738
+ - None
739
+
740
+ Returns: Metro Area _Hash_
741
+
742
+ ``` js
743
+ // Example: GET /api/v2/metro_area/105?api_key=1234567890abcdef
744
+
745
+ {
746
+ "city": "San Francisco",
747
+ "country": "US",
748
+ "created_at": "2011-06-24T03:23:57Z",
749
+ "id": 105,
750
+ "latitude": 37.7771,
751
+ "longitude": -122.42,
752
+ "radius": 50,
753
+ "state": "CA",
754
+ "updated_at": "2011-07-05T23:11:24Z",
755
+ "url": "http://thrillcall.com/live-music/san-francisco"
756
+ }
757
+ ```
758
+
759
+ ### GET /metro_area/:id/events
760
+ **:id** _integer_ Thrillcall ID
761
+
762
+ Params:
763
+
764
+ - **[limit](#limit)**
765
+ - **[page](#page)**
766
+ - **[min\_date](#min_date)**
767
+ - **[max\_date](#max_date)**
768
+ - **[radius](#radius)**
769
+ - **[ticket\_type](#ticket_type)**
770
+ - **[must\_have\_tickets](#must_have_tickets)**
771
+ - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
772
+ - **[show\_rumor\_events](#show_rumor_events)**
773
+
774
+ Returns: _Array_ of Metro Areas _Hash_
775
+
776
+ ``` js
777
+ // Example: GET /api/v2/metro_area/105/events?api_key=1234567890abcdef
778
+
779
+ [
780
+ {
781
+ "created_at": "2011-04-24T02:12:09Z",
782
+ "end_date": null,
783
+ "festival": false,
784
+ "id": 831330,
785
+ "latitude": 37.7794,
786
+ "longitude": -122.418,
787
+ "name": "Philadelphia Orchestra @ Davies Symphony Hall",
788
+ "num_cancelled_bookings": 0,
789
+ "num_confirmed_bookings": 1,
790
+ "num_disabled_bookings": 0,
791
+ "num_unconfirmed_bookings": 0,
792
+ "on_sale_date": null,
793
+ "rumor": false,
794
+ "start_date": "2012-06-11T06:59:00Z",
795
+ "unconfirmed_location": 0,
796
+ "updated_at": "2011-09-28T03:51:22Z",
797
+ "venue_id": 51886,
798
+ "url": "http://thrillcall.com/event/831330"
799
+ },
800
+ {
801
+ ...
802
+ },
803
+ ...
804
+ ]
805
+ ```
806
+
807
+ ## Person
808
+ Fields:
809
+
810
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
811
+ - **first\_name** _string_ First name of the Person
812
+ - **gender** _string_ Gender of the Person
813
+ - **id** _integer_ Thrillcall ID
814
+ - **last\_name** _string_ Last name of the Person
815
+ - **login** _string_ Login of the Person
816
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
817
+ - **referral\_code** _string_ Referral code of the Person
818
+ - **referral\_code\_count** _integer_ Number of Referral code used for the Person
819
+ - **postalcode** _string_ Postalcode of the Person
820
+ - **postalcode** _string_ Postalcode of the Person
821
+
822
+ ### POST /person/signin
823
+ Params:
824
+
825
+ - **[login](#login)**
826
+ - **[password](#password)**
827
+
828
+ Returns: Person _Hash_
829
+
830
+ ``` js
831
+ // Example: POST /api/v2/person/signin
832
+
833
+ {
834
+ "created_at": "2000-11-09T19:09:23Z",
835
+ "first_name": "John",
836
+ "gender": null,
837
+ "id": 49,
838
+ "last_name": "Doe",
839
+ "login": "john@example.com",
840
+ "updated_at": "2011-11-09T19:09:23Z",
841
+ "referral_code": "fhskjfhk3j43h43hjkh",
842
+ "referral_code_count": 0,
843
+ "postalcode": "94104"
844
+ }
845
+ ```
846
+
847
+ ### POST /person/signup
848
+ Params:
849
+
850
+ - **[first\_name](#first_name)**
851
+ - **[last\_name](#last_name)**
852
+ - **[gender](#gender)**
853
+ - **[email](#email)**
854
+ - **[password](#password)**
855
+ - **[postalcode](#postalcode)**
856
+
857
+ Returns: Person _Hash_
858
+
859
+ ``` js
860
+ // Example: POST /api/v2/person/signup
861
+
862
+ {
863
+ "created_at": "2000-11-09T19:09:23Z",
864
+ "first_name": "John",
865
+ "gender": null,
866
+ "id": 49,
867
+ "last_name": "Doe",
868
+ "login": "john@example.com",
869
+ "updated_at": "2011-11-09T19:09:23Z",
870
+ "referral_code": "fhskjfhk3j43h43hjkh",
871
+ "referral_code_count": 0,
872
+ "postalcode": "94104"
873
+ }
874
+ ```
875
+
876
+
877
+ ## Venues
878
+ Fields:
879
+
880
+ - **address1** _string_ First address field for the Venue
881
+ - **address2** _string_ Second address field for the Venue
882
+ - **city** _string_ City the Venue is in
883
+ - **country** _string_ Country the Venue is in
884
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
885
+ - **id** _integer_ Thrillcall ID
886
+ - **latitude** _float_ Approximate Latitude for the Venue
887
+ - **longitude** _float_ Approximate Longitude for the Venue
888
+ - **name** _string_ Name of the Venue
889
+ - **metro\_area\_id** _integer_ Thrillcall ID of the Metro Area this Venue is in, if any
890
+ - **state** _string_ State the Venue is in
891
+ - **upcoming\_events\_count** _integer_ Number of upcoming events associated with this object
892
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
893
+ - **postalcode** _string_ Postal code for the Venue
894
+ - **url** _string_ URL for this object on Thrillcall
895
+
896
+
897
+ ### GET /venues
898
+ Params:
899
+
900
+ - **[limit](#limit)**
901
+ - **[page](#page)**
902
+ - **[lat](#lat)**
903
+ - **[long](#long)**
904
+ - **[postalcode](#postalcode)**
905
+ - **[radius](#radius)**
906
+
907
+ Returns: _Array_ of Venues _Hash_
908
+
909
+ ``` js
910
+ // Example: GET /api/v2/venues?limit=14&api_key=1234567890abcdef
911
+
912
+ [
913
+ {
914
+ "address1": null,
915
+ "address2": null,
916
+ "city": "Guadalajara",
917
+ "country": "MX",
918
+ "created_at": "2000-11-09T19:09:23Z",
919
+ "id": 1,
920
+ "latitude": null,
921
+ "longitude": null,
922
+ "name": "Fbolko",
923
+ "state": "MX",
924
+ "upcoming_events_count": 0,
925
+ "updated_at": "2010-03-28T17:24:20Z",
926
+ "postalcode": null,
927
+ "url": "http://thrillcall.com/venue/Fbolko_in_Guadalajara_MX"
928
+ },
929
+ {
930
+ ...
931
+ },
932
+ ...
933
+ ]
934
+ ```
935
+
936
+
937
+ ### GET /venue/:id
938
+ **:id** _integer_ Thrillcall or Partner ID
939
+
940
+ Params:
941
+
942
+ - **[use\_partner\_id](#use_partner_id)**
943
+
944
+ Returns: Venue _Hash_
945
+
946
+ ``` js
947
+ // Example: GET /api/v2/venue/27418?api_key=1234567890abcdef
948
+
949
+ {
950
+ "address1": "859 O'Farrell St.",
951
+ "address2": null,
952
+ "city": "San Francisco",
953
+ "country": "US",
954
+ "created_at": "2008-04-21T16:52:31Z",
955
+ "id": 27418,
956
+ "latitude": 37.784796,
957
+ "longitude": -122.418819,
958
+ "name": "Great American Music Hall",
959
+ "state": "CA",
960
+ "upcoming_events_count": 34,
961
+ "updated_at": "2011-01-20T21:04:37Z",
962
+ "postalcode": "94109",
963
+ "metro_area_id": 105,
964
+ "url": "http://thrillcall.com/venue/Great_American_Music_Hall_in_San_Francisco_CA"
965
+ }
966
+ ```
967
+
968
+ ### GET /venue/:id/events
969
+ **:id** _integer_ Thrillcall or Partner ID
970
+
971
+ Params:
972
+
973
+ - **[limit](#limit)**
974
+ - **[page](#page)**
975
+ - **[min\_date](#min_date)**
976
+ - **[max\_date](#max_date)**
977
+ - **[use\_partner\_id](#use_partner_id)**
978
+ - **[ticket\_type](#ticket_type)**
979
+ - **[must\_have\_tickets](#must_have_tickets)**
980
+ - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
981
+ - **[show\_rumor\_events](#show_rumor_events)**
982
+
983
+ Returns: _Array_ of Events _Hash_
984
+
985
+ ``` js
986
+ // Example: GET /api/v2/venue/32065/events?api_key=1234567890abcdef
987
+
988
+ [
989
+ {
990
+ "created_at": "2000-11-09T19:09:23Z",
991
+ "end_date": null,
992
+ "festival": false,
993
+ "id": 824614,
994
+ "latitude": 37.8016,
995
+ "longitude": -80.4462,
996
+ "name": "Colt Ford @ West Virginia State Fair",
997
+ "on_sale_date": null,
998
+ "rumor": false,
999
+ "start_date": "2011-08-21T03:59:00Z",
1000
+ "unconfirmed_location": 0,
1001
+ "updated_at": "2011-06-24T05:10:05Z",
1002
+ "venue_id": 32065,
1003
+ "url": "http://thrillcall.com/event/824614"
1004
+ },
1005
+ {
1006
+ ...
1007
+ },
1008
+ ...
1009
+ ]
1010
+ ```
1011
+
1012
+ ### GET /search/venues/:term
1013
+ **:term** _string_ Arbitrary search string on the **name** field. (alphanumerics only, underscore matches underscore, use '+' for space)
1014
+
1015
+ Params:
1016
+
1017
+ - **[limit](#limit)**
1018
+ - **[page](#page)**
1019
+ - **[lat](#lat)**
1020
+ - **[long](#long)**
1021
+ - **[postalcode](#postalcode)**
1022
+ - **[radius](#radius)**
1023
+
1024
+ Returns: _Array_ of Venues _Hash_
1025
+
1026
+ ``` js
1027
+ // Example: GET /api/v2/search/venues/Great%20American%20Music%20Hall?api_key=1234567890abcdef
1028
+
1029
+ [
1030
+ {
1031
+ "address1": "859 O'Farrell St.",
1032
+ "address2": null,
1033
+ "city": "San Francisco",
1034
+ "country": "US",
1035
+ "created_at": "2008-04-21T16:52:31Z",
1036
+ "id": 27418,
1037
+ "latitude": 37.784796,
1038
+ "longitude": -122.418819,
1039
+ "name": "Great American Music Hall",
1040
+ "state": "CA",
1041
+ "upcoming_events_count": 34,
1042
+ "updated_at": "2011-01-20T21:04:37Z",
1043
+ "postalcode": "94109",
1044
+ "metro_area_id": 105,
1045
+ "url": "http://thrillcall.com/venue/Great_American_Music_Hall_in_San_Francisco_CA"
1046
+ },
1047
+ {
1048
+ ...
1049
+ },
1050
+ ...
1051
+ ]
1052
+ ```
1053
+
1054
+ ## Tickets
1055
+ Fields:
1056
+
1057
+ - **created\_at** _string_ ISO 8601 representation the time this object was created
1058
+ - **description** _string_ Long form description of the ticket
1059
+ - **event\_id** _integer_ Thrillcall Event ID
1060
+ - **id** _integer_ Thrillcall ID
1061
+ - **marketing\_text** _string_ Long form description of the ticket
1062
+ - **max\_ticket\_price** _float_ Maximum price for this ticket
1063
+ - **min\_ticket\_price** _float_ Minimum price for this ticket
1064
+ - **name** _string_ Name of this ticket
1065
+ - **on\_sale\_end\_date** _string_ YYYY-MM-DD date when the ticket goes off sale
1066
+ - **on\_sale\_start\_date** _string_ YYYY-MM-DD date when the ticket goes on sale
1067
+ - **seat\_info** _string_ Additional info about the seat
1068
+ - **updated\_at** _string_ ISO 8601 representation of last time this object was updated
1069
+ - **url** _string_ URL for this object on Thrillcall
1070
+
1071
+ ### GET /tickets
1072
+ Params:
1073
+
1074
+ - **[limit](#limit)**
1075
+ - **[page](#page)**
1076
+ - **[min\_date](#min_date)**
1077
+ - **[max\_date](#max_date)**
1078
+ - **[lat](#lat)**
1079
+ - **[long](#long)**
1080
+ - **[postalcode](#postalcode)**
1081
+ - **[radius](#radius)**
1082
+ - **[ticket\_type](#ticket_type)**
1083
+ - **[show\_unconfirmed\_events](#show_unconfirmed_events)**
1084
+ - **[show\_rumor\_events](#show_rumor_events)**
1085
+
1086
+ Returns: _Array_ of Tickets _Hash_
1087
+
1088
+ ``` js
1089
+ // Example: GET /api/v2/tickets?limit=14&api_key=1234567890abcdef
1090
+
1091
+ [
1092
+ {
1093
+ "created_at": "2008-12-06T00:19:59Z",
1094
+ "description": null,
1095
+ "event_id": 455646,
1096
+ "id": 1,
1097
+ "marketing_text": null,
1098
+ "max_ticket_price": null,
1099
+ "min_ticket_price": null,
1100
+ "name": "General Onsale",
1101
+ "on_sale_end_date": null,
1102
+ "on_sale_start_date": null,
1103
+ "seat_info": null,
1104
+ "updated_at": "2009-09-22T22:58:37Z",
1105
+ "url": "http://www.livenation.com/edp/eventId/335800/?c=api-000157"
1106
+ },
1107
+ {
1108
+ ...
1109
+ },
1110
+ ...
1111
+ ]
1112
+ ```
1113
+
1114
+ ### GET /ticket/:id
1115
+ **:id** _integer_ Thrillcall ID
1116
+
1117
+ Params:
1118
+
1119
+ - None
1120
+
1121
+ Returns: Ticket _Hash_
1122
+
1123
+ ``` js
1124
+ // Example: GET /api/v2/ticket/599794?api_key=1234567890abcdef
1125
+
1126
+ {
1127
+ "created_at": "2011-06-14T00:09:16Z",
1128
+ "description": null,
1129
+ "event_id": 858707,
1130
+ "id": 599794,
1131
+ "marketing_text": null,
1132
+ "max_ticket_price": 21,
1133
+ "min_ticket_price": null,
1134
+ "name": "Gen. Admission Seating Limited",
1135
+ "on_sale_end_date": null,
1136
+ "on_sale_start_date": null,
1137
+ "seat_info": null,
1138
+ "updated_at": "2011-06-14T00:09:16Z",
1139
+ "url": "http://tickets.gamh.com/evinfo.php?eventid=154723&amp;r=affi&amp;u=210785"
1140
+ }
1141
+ ```