ticketutils 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/LICENSE +20 -0
- data/README.md +33 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/lib/ticketutils.rb +27 -0
- data/lib/ticketutils/base.rb +9 -0
- data/lib/ticketutils/error.rb +16 -0
- data/lib/ticketutils/seating_chart.rb +69 -0
- data/lib/ticketutils/venue.rb +57 -0
- data/spec/fixtures/seating_charts/find.yml +32 -0
- data/spec/fixtures/seating_charts/find_recent.yml +32 -0
- data/spec/fixtures/seating_charts/for_venue.yml +32 -0
- data/spec/fixtures/venues/find.yml +32 -0
- data/spec/fixtures/venues/find_page_2.yml +32 -0
- data/spec/fixtures/venues/find_per_page_50.yml +32 -0
- data/spec/fixtures/venues/find_recent.yml +32 -0
- data/spec/shared/seating_chart_examples.rb +53 -0
- data/spec/shared/setup_token.rb +1 -0
- data/spec/shared/vcr.rb +7 -0
- data/spec/shared/venue_examples.rb +15 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/ticketutils/seating_chart_spec.rb +55 -0
- data/spec/ticketutils/venue_spec.rb +119 -0
- data/ticketutils.gemspec +75 -0
- metadata +162 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://charts.services.ticketutils.com:80/<%= auth_token %>/Venues?itemsPerPage=50&page=1
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
x-powered-by:
|
16
|
+
- ASP.NET
|
17
|
+
x-aspnet-version:
|
18
|
+
- 4.0.30319
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
server:
|
22
|
+
- Microsoft-IIS/7.5
|
23
|
+
date:
|
24
|
+
- Thu, 26 May 2011 17:11:24 GMT
|
25
|
+
content-length:
|
26
|
+
- "8907"
|
27
|
+
x-aspnetmvc-version:
|
28
|
+
- "3.0"
|
29
|
+
cache-control:
|
30
|
+
- private
|
31
|
+
body: "{\"Venues\":[{\"VenueId\":\"61b62126-add8-47e2-ad73-fca15abb3aff\",\"Name\":\"105 Valley St\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Pasadena\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"80586da8-e40d-416c-b6e8-d6a4ec581429\",\"Name\":\"13th Street and Ocean Drive\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Miami Beach\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7cbe3058-04b5-4708-9769-c3b337493a7e\",\"Name\":\"1-800-ASK-GARY Amphitheatre\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Tampa\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4707dbc8-efb2-444e-9f2d-89b6e2b3faed\",\"Name\":\"1st Mariner Arena\",\"Country\":\"United States\",\"State\":\"Maryland\",\"City\":\"Baltimore\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f2675a2f-2cbb-4396-8966-5958c1a29a8c\",\"Name\":\"1stBank Center\",\"Country\":\"United States\",\"State\":\"Colorado\",\"City\":\"Broomfield\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"59c92ea9-9326-49b7-8f9b-c6eede6c1caa\",\"Name\":\"3rd & Lindsley\",\"Country\":\"United States\",\"State\":\"Tennessee\",\"City\":\"Nashville\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0a19a2e9-8448-44cf-badc-5692b647717b\",\"Name\":\"4th & Waller\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Austin\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"5bc0b6b4-5f48-4e93-aaf9-86916eb69a22\",\"Name\":\"4th and B CA\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"San Diego\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"640de7b1-1252-4eff-813f-dd894b9bcfcf\",\"Name\":\"5th Avenue Theatre\",\"Country\":\"United States\",\"State\":\"Washington\",\"City\":\"Seattle\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8f077a6c-acd6-4b90-85c1-e289c0e196cd\",\"Name\":\"5th St between Ash and Farmer Ave\",\"Country\":\"United States\",\"State\":\"Arizona\",\"City\":\"Tempe\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4abca236-9e17-4d4b-aca7-c8cab6485c20\",\"Name\":\"7th Street Entry\",\"Country\":\"United States\",\"State\":\"Minnesota\",\"City\":\"Minneapolis\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"651599a1-0ed0-4b24-b69b-a1d6b9fc986b\",\"Name\":\"814 N. Collins\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Arlington\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"681d2a8e-815f-4370-88cf-73fd0372317e\",\"Name\":\"9:30 Club\",\"Country\":\"United States\",\"State\":\"District of Columbia\",\"City\":\"Washington\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6c0186f1-06ec-4607-be6a-0531630249ef\",\"Name\":\"Aarons Amphitheatre at Lakewood\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Atlanta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0b28ce6d-c4de-4892-a603-f6412c0400e1\",\"Name\":\"Aberdeen Exhibition Centre\",\"Country\":\"United Kingdom\",\"State\":\"Aberdeen City\",\"City\":\"Aberdeen\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4aa4857c-cba8-4351-962d-a531a02da2dd\",\"Name\":\"Abilene Civic Center\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Abilene\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"54eaadfc-1c0a-488f-ad5f-03d05d5eae0a\",\"Name\":\"Abraham Chavez Theatre\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"El Paso\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8468b9fd-3f6f-4bfb-beeb-0441a06d9f85\",\"Name\":\"Abravanel Hall\",\"Country\":\"United States\",\"State\":\"Utah\",\"City\":\"Salt Lake City\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7023863f-c9fb-42ec-893b-b8ce34965513\",\"Name\":\"Academy of Music\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Philadelphia\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b8735dde-f00f-412c-8604-f8a11255c4a3\",\"Name\":\"Acer Arena\",\"Country\":\"Australia\",\"State\":\"New South Wales\",\"City\":\"Sydney\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"76982b55-19c1-4ab6-bfd5-fa50a338d98c\",\"Name\":\"Act Theatre - The Falls\",\"Country\":\"United States\",\"State\":\"Washington\",\"City\":\"Seattle\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0f150a56-a5cb-489d-9989-cb57554bc935\",\"Name\":\"Acura at SIR Stage37\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"a3269bc7-4176-4273-a5f1-39b62155a671\",\"Name\":\"Adams Event Center\",\"Country\":\"United States\",\"State\":\"Montana\",\"City\":\"Missoula\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f433b3ce-c36a-473b-93a8-42c0db9183f5\",\"Name\":\"Adelphi Theatre London\",\"Country\":\"United Kingdom\",\"State\":\"London, City of\",\"City\":\"London\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"34e637bb-5b97-4d3f-9743-d179423311ed\",\"Name\":\"Adler Theatre\",\"Country\":\"United States\",\"State\":\"Iowa\",\"City\":\"Davenport\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"2c603bed-fc93-40b0-9d6f-292f19d66d93\",\"Name\":\"Adventure Photo Tours - Red Rock Howard Hughes Ran\",\"Country\":\"United States\",\"State\":\"Nevada\",\"City\":\"Las Vegas\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"95260d4f-37f3-4b83-8345-d6667df618d4\",\"Name\":\"Agganis Arena\",\"Country\":\"United States\",\"State\":\"Massachusetts\",\"City\":\"Boston\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"058c2fef-483e-424c-b7ce-a8ee69031c90\",\"Name\":\"Aggie Memorial Stadium\",\"Country\":\"United States\",\"State\":\"New Mexico\",\"City\":\"Las Cruces\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f041f72d-069f-401e-b7ac-c9c381cbc62c\",\"Name\":\"Agora - Quebec\",\"Country\":\"Canada\",\"State\":\"Quebec\",\"City\":\"Quebec\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4ac1bfe6-6069-47b8-81fc-3b506251e5bd\",\"Name\":\"Agua Caliente Casino\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Rancho Mirage\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0b789639-7979-430b-8e82-e141643bb8c5\",\"Name\":\"Ahmanson Theatre\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Los Angeles\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"db415e11-3632-4278-ad93-8e487cc25e81\",\"Name\":\"Air Canada Centre\",\"Country\":\"Canada\",\"State\":\"Ontario\",\"City\":\"Toronto\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"94b76653-c6e9-499a-9eea-722283a1e513\",\"Name\":\"AJ Palumbo Center\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Pittsburgh\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"2680c516-555b-490b-b704-7c54d4daac8b\",\"Name\":\"Akron Civic Theatre\",\"Country\":\"United States\",\"State\":\"Ohio\",\"City\":\"Akron\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b2eb3188-0672-41e9-b3e2-4d6b424bc692\",\"Name\":\"Al Hirschfeld Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"1dd983d8-72bb-4912-82e9-f4f2369b41d0\",\"Name\":\"Alabama Theatre - SC\",\"Country\":\"United States\",\"State\":\"South Carolina\",\"City\":\"Myrtle Beach\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0f0fefcb-d34f-431d-9a78-ad218bd15f4f\",\"Name\":\"Aladdin Theater Portland\",\"Country\":\"United States\",\"State\":\"Oregon\",\"City\":\"Portland\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0366886a-d207-41ef-911f-d440a07e05f4\",\"Name\":\"Alamodome\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"San Antonio\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"d0e6ccc0-3f28-44f7-9d23-bd56149cce23\",\"Name\":\"Alberta Bair Theater\",\"Country\":\"United States\",\"State\":\"Montana\",\"City\":\"Billings\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4b017599-37d5-465f-b7f5-edf0f995e424\",\"Name\":\"Aldwych Theatre\",\"Country\":\"United Kingdom\",\"State\":\"London, City of\",\"City\":\"London\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"a27ebc78-388d-4388-9539-37910a6a2788\",\"Name\":\"Alerus Center\",\"Country\":\"United States\",\"State\":\"North Dakota\",\"City\":\"Grand Forks\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"1e946130-a3a5-40a5-8fb8-4ea9eafa80b5\",\"Name\":\"Allegan County Fair\",\"Country\":\"United States\",\"State\":\"Michigan\",\"City\":\"Allegan\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0ab17965-65f9-41d9-b4ac-ceb496968852\",\"Name\":\"Allen County Memorial Coliseum\",\"Country\":\"United States\",\"State\":\"Indiana\",\"City\":\"Fort Wayne\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0967e537-00e4-4b21-9423-563c95efaf35\",\"Name\":\"Allen Events Center\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Allen\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"93fe5067-f9a5-49c9-a6e6-74c79fa47f1b\",\"Name\":\"Allen Room\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"5f73c7ec-5372-4053-98f4-f104789ea80d\",\"Name\":\"Allen Theatre at Playhouse Square Center\",\"Country\":\"United States\",\"State\":\"Ohio\",\"City\":\"Cleveland\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"011322ec-30f9-480d-937a-5e8c295140cd\",\"Name\":\"Allentown Fairgrounds\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Allentown\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"66c4a197-0b48-4d1d-8622-e0a80e7242ee\",\"Name\":\"Allstate Arena\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Rosemont\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8cce7bcc-cdbf-4d1d-badc-85f945339ad2\",\"Name\":\"Aloha Stadium\",\"Country\":\"United States\",\"State\":\"Hawaii\",\"City\":\"Honolulu\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"041649ae-6299-43fc-82e4-47c1580a2358\",\"Name\":\"Alpine Valley Music Theatre\",\"Country\":\"United States\",\"State\":\"Wisconsin\",\"City\":\"East Troy\",\"Status\":1,\"SeatingCharts\":null}],\"Pagination\":{\"TotalResults\":1993,\"TotalPages\":39,\"CurrentPage\":1},\"Status\":0,\"Errors\":null}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
- !ruby/struct:VCR::HTTPInteraction
|
3
|
+
request: !ruby/struct:VCR::Request
|
4
|
+
method: :get
|
5
|
+
uri: http://charts.services.ticketutils.com:80/<%= auth_token %>/Venues/UpdatedSince/201105180000/1
|
6
|
+
body:
|
7
|
+
headers:
|
8
|
+
content-type:
|
9
|
+
- application/json
|
10
|
+
response: !ruby/struct:VCR::Response
|
11
|
+
status: !ruby/struct:VCR::ResponseStatus
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
x-powered-by:
|
16
|
+
- ASP.NET
|
17
|
+
x-aspnet-version:
|
18
|
+
- 4.0.30319
|
19
|
+
content-type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
server:
|
22
|
+
- Microsoft-IIS/7.5
|
23
|
+
date:
|
24
|
+
- Thu, 26 May 2011 17:11:23 GMT
|
25
|
+
content-length:
|
26
|
+
- "17782"
|
27
|
+
x-aspnetmvc-version:
|
28
|
+
- "3.0"
|
29
|
+
cache-control:
|
30
|
+
- private
|
31
|
+
body: "{\"Venues\":[{\"VenueId\":\"61b62126-add8-47e2-ad73-fca15abb3aff\",\"Name\":\"105 Valley St\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Pasadena\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7cbe3058-04b5-4708-9769-c3b337493a7e\",\"Name\":\"1-800-ASK-GARY Amphitheatre\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Tampa\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4707dbc8-efb2-444e-9f2d-89b6e2b3faed\",\"Name\":\"1st Mariner Arena\",\"Country\":\"United States\",\"State\":\"Maryland\",\"City\":\"Baltimore\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f2675a2f-2cbb-4396-8966-5958c1a29a8c\",\"Name\":\"1stBank Center\",\"Country\":\"United States\",\"State\":\"Colorado\",\"City\":\"Broomfield\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"640de7b1-1252-4eff-813f-dd894b9bcfcf\",\"Name\":\"5th Avenue Theatre\",\"Country\":\"United States\",\"State\":\"Washington\",\"City\":\"Seattle\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"681d2a8e-815f-4370-88cf-73fd0372317e\",\"Name\":\"9:30 Club\",\"Country\":\"United States\",\"State\":\"District of Columbia\",\"City\":\"Washington\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6c0186f1-06ec-4607-be6a-0531630249ef\",\"Name\":\"Aarons Amphitheatre at Lakewood\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Atlanta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"54eaadfc-1c0a-488f-ad5f-03d05d5eae0a\",\"Name\":\"Abraham Chavez Theatre\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"El Paso\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7023863f-c9fb-42ec-893b-b8ce34965513\",\"Name\":\"Academy of Music\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Philadelphia\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"a3269bc7-4176-4273-a5f1-39b62155a671\",\"Name\":\"Adams Event Center\",\"Country\":\"United States\",\"State\":\"Montana\",\"City\":\"Missoula\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f433b3ce-c36a-473b-93a8-42c0db9183f5\",\"Name\":\"Adelphi Theatre London\",\"Country\":\"United Kingdom\",\"State\":\"London, City of\",\"City\":\"London\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"34e637bb-5b97-4d3f-9743-d179423311ed\",\"Name\":\"Adler Theatre\",\"Country\":\"United States\",\"State\":\"Iowa\",\"City\":\"Davenport\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"95260d4f-37f3-4b83-8345-d6667df618d4\",\"Name\":\"Agganis Arena\",\"Country\":\"United States\",\"State\":\"Massachusetts\",\"City\":\"Boston\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"058c2fef-483e-424c-b7ce-a8ee69031c90\",\"Name\":\"Aggie Memorial Stadium\",\"Country\":\"United States\",\"State\":\"New Mexico\",\"City\":\"Las Cruces\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0b789639-7979-430b-8e82-e141643bb8c5\",\"Name\":\"Ahmanson Theatre\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Los Angeles\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"db415e11-3632-4278-ad93-8e487cc25e81\",\"Name\":\"Air Canada Centre\",\"Country\":\"Canada\",\"State\":\"Ontario\",\"City\":\"Toronto\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"2680c516-555b-490b-b704-7c54d4daac8b\",\"Name\":\"Akron Civic Theatre\",\"Country\":\"United States\",\"State\":\"Ohio\",\"City\":\"Akron\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b2eb3188-0672-41e9-b3e2-4d6b424bc692\",\"Name\":\"Al Hirschfeld Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0f0fefcb-d34f-431d-9a78-ad218bd15f4f\",\"Name\":\"Aladdin Theater Portland\",\"Country\":\"United States\",\"State\":\"Oregon\",\"City\":\"Portland\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0366886a-d207-41ef-911f-d440a07e05f4\",\"Name\":\"Alamodome\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"San Antonio\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"1e946130-a3a5-40a5-8fb8-4ea9eafa80b5\",\"Name\":\"Allegan County Fair\",\"Country\":\"United States\",\"State\":\"Michigan\",\"City\":\"Allegan\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0ab17965-65f9-41d9-b4ac-ceb496968852\",\"Name\":\"Allen County Memorial Coliseum\",\"Country\":\"United States\",\"State\":\"Indiana\",\"City\":\"Fort Wayne\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"011322ec-30f9-480d-937a-5e8c295140cd\",\"Name\":\"Allentown Fairgrounds\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Allentown\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"66c4a197-0b48-4d1d-8622-e0a80e7242ee\",\"Name\":\"Allstate Arena\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Rosemont\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8cce7bcc-cdbf-4d1d-badc-85f945339ad2\",\"Name\":\"Aloha Stadium\",\"Country\":\"United States\",\"State\":\"Hawaii\",\"City\":\"Honolulu\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"041649ae-6299-43fc-82e4-47c1580a2358\",\"Name\":\"Alpine Valley Music Theatre\",\"Country\":\"United States\",\"State\":\"Wisconsin\",\"City\":\"East Troy\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"c7247964-1e8c-42c7-b80c-e05b40861598\",\"Name\":\"Alumni Stadium\",\"Country\":\"United States\",\"State\":\"Massachusetts\",\"City\":\"Chestnut Hill\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"d779498a-28b6-4480-a4e6-8eef7baf11d7\",\"Name\":\"Ambassador Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8733e440-09a0-4b4e-a4b7-cbb656d69eb6\",\"Name\":\"American Airlines Arena\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Miami\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"9728d2fd-7c27-4591-96d6-df67d5eebba0\",\"Name\":\"American Airlines Center\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Dallas\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"96cc663b-3eea-499c-9bf1-d3b5cef155c7\",\"Name\":\"American Airlines Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b9cdf5ce-a1ce-41b2-a8b2-cf54836c6e6a\",\"Name\":\"American Bank Center\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Corpus Christi\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6c312e26-8feb-48f3-903a-28b7776cf6b0\",\"Name\":\"American Music Theatre\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Lancaster\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7c9fa204-e5ba-4af1-b788-cbe9e6403d87\",\"Name\":\"Amon G Carter Stadium\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Fort Worth\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"e12f3a72-3355-4c02-8df1-23787e26e7f6\",\"Name\":\"Amway Arena\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Orlando\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"62971a02-5c2a-4b9b-9fac-ef8307d93469\",\"Name\":\"Amway Center\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Orlando\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"ef0b8c07-1f6c-49c8-936b-55af6a21a27e\",\"Name\":\"Angel Stadium\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Anaheim\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"cd008e2c-0cfb-4de0-ba4d-409ba8826a8a\",\"Name\":\"Anselmo Valencia Amphitheater\",\"Country\":\"United States\",\"State\":\"Arizona\",\"City\":\"Tucson\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"dfe7353c-ecc0-4c66-9e23-f05f0155ec9f\",\"Name\":\"Antelope Valley Fair\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Lancaster\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6083182f-4cdf-439e-b985-859127ba7ea6\",\"Name\":\"Apollo Theater Chicago\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Chicago\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6c307dea-2057-488b-9200-97c2c756c576\",\"Name\":\"Apollo Theatre NY\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"d018253c-ae87-4c0f-bf87-0c2284fc6cfa\",\"Name\":\"Aragon Ballroom\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Chicago\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"2426a578-0071-479f-843d-b0fc2dbbc6f7\",\"Name\":\"Arena at Gwinnett Center\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Duluth\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"dde5dd05-6777-415f-beba-1ab2fb9f738f\",\"Name\":\"Arena Theatre Houston\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Houston\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"fbaaea2f-1726-43d2-857e-4b0c2c834604\",\"Name\":\"Aria Hotel and Casino - Viva Elvis Theatre\",\"Country\":\"United States\",\"State\":\"Nevada\",\"City\":\"Las Vegas\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"dafe2ed4-2b89-4393-810c-9db13d4d7b55\",\"Name\":\"Arizona Stadium\",\"Country\":\"United States\",\"State\":\"Arizona\",\"City\":\"Tucson\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"932f2458-4f98-4527-9c29-5fbae6aa5102\",\"Name\":\"Arlene Schnitzer Concert Hall\",\"Country\":\"United States\",\"State\":\"Oregon\",\"City\":\"Portland\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0d3deabc-4df0-4153-9eea-a7e93d14f429\",\"Name\":\"Aronimink Golf Club\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Newtown Square\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"478593aa-cbf2-4f79-b5a2-2b73b1322a55\",\"Name\":\"Arrowhead Stadium\",\"Country\":\"United States\",\"State\":\"Missouri\",\"City\":\"Kansas City\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"76e99a32-c56a-49c6-bc49-668cd18108ab\",\"Name\":\"Arthur Ashe Stadium\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"Flushing\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"bfc8220a-fc5c-4352-a349-e2736d6de226\",\"Name\":\"Asheville Civic Center\",\"Country\":\"United States\",\"State\":\"North Carolina\",\"City\":\"Asheville\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b7108cf8-4fdb-4980-b5e8-afee93f88616\",\"Name\":\"Ashley Furniture Homestore Pavilion\",\"Country\":\"United States\",\"State\":\"Arizona\",\"City\":\"Phoenix\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6c598003-4a24-4865-9ea0-46b98ebde203\",\"Name\":\"Astor Place Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f8faa2f8-68f0-44f5-9781-0bfb77d39b85\",\"Name\":\"AT&T Center\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"San Antonio\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"73a4b6ba-9807-431d-b021-726dba9a6ee7\",\"Name\":\"AT&T Park\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"San Francisco\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"1ba23725-2513-4ed8-a0a0-ceb5d3f0e6dd\",\"Name\":\"Atlanta Athletic Club\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Atlanta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"d7224d4c-bdd2-4916-b6ff-cdd9fce54dd8\",\"Name\":\"Atlanta Civic Center\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Atlanta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"960227a8-d666-4412-a86e-7565ed0327b9\",\"Name\":\"Atlanta Motor Speedway\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Hampton\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"bb869b5e-a6af-4c5c-b78f-67af98273f5a\",\"Name\":\"Atlanta Symphony Hall\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Atlanta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4c56128e-0025-4aad-a949-cb0aa8fc48d2\",\"Name\":\"Atlantic City Hilton\",\"Country\":\"United States\",\"State\":\"New Jersey\",\"City\":\"Atlantic City\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"745e6032-5032-425c-83e1-a9995696437d\",\"Name\":\"Auditorium Theatre Chicago\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Chicago\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b882562d-8991-42c7-8c02-dd0318f5f5da\",\"Name\":\"August Wilson Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b202112c-f732-4c87-816b-727364b28437\",\"Name\":\"Augusta Civic Center\",\"Country\":\"United States\",\"State\":\"Maine\",\"City\":\"Augusta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"54054aba-450d-4f85-ad28-8ebbd0027175\",\"Name\":\"Augusta National Golf Club\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Augusta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b09c50eb-00e6-4907-ad0b-4bde335a71ff\",\"Name\":\"Austin Music Hall\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Austin\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4f8933ac-3e68-4b00-aebe-6bf2431eb455\",\"Name\":\"Autzen Stadium\",\"Country\":\"United States\",\"State\":\"Oregon\",\"City\":\"Eugene\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4a59c7b7-cb27-4027-ac48-2cd64e6889f6\",\"Name\":\"Avalon Hollywood\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Hollywood\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"c9934aa3-18e3-4955-929f-5a8ac475ca46\",\"Name\":\"Avery Fisher Hall\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"277080b7-5528-4f64-9fd4-491bcf2242cf\",\"Name\":\"Balboa Theatre\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"San Diego\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0f36dd63-150c-494a-b536-41c0893d603b\",\"Name\":\"Ballys Las Vegas Hotel Casino - Jubilee Theater\",\"Country\":\"United States\",\"State\":\"Nevada\",\"City\":\"Las Vegas\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"cbefdeb1-ed42-401f-a1b4-f8db88d8aea2\",\"Name\":\"BancorpSouth Arena\",\"Country\":\"United States\",\"State\":\"Mississippi\",\"City\":\"Tupelo\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8aad5d89-068f-452f-80a9-363c6a42440f\",\"Name\":\"Bank Atlantic Center\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Sunrise\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f3a36813-8968-4df2-b363-51ef71ca843e\",\"Name\":\"Bank of America Pavilion\",\"Country\":\"United States\",\"State\":\"Massachusetts\",\"City\":\"Boston\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7af9eb1d-aa1c-4b50-b5af-1c57716c8210\",\"Name\":\"Bank of America Stadium\",\"Country\":\"United States\",\"State\":\"North Carolina\",\"City\":\"Charlotte\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"495d0b2f-0a56-448c-8bcc-589646e40651\",\"Name\":\"Bank of America Theatre\",\"Country\":\"United States\",\"State\":\"Illinois\",\"City\":\"Chicago\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"e7a87c29-d8a5-4c04-9e48-d600a837a97a\",\"Name\":\"Bank of Kentucky Center\",\"Country\":\"United States\",\"State\":\"Kentucky\",\"City\":\"Highland Heights\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"d7729804-9325-4bbb-ba6e-bcbde5725120\",\"Name\":\"BankUnited Center\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Coral Gables\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"89bd653c-74d6-40f3-92e5-7e854bbef28b\",\"Name\":\"Barbara B Mann Performing Arts Hall\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Fort Myers\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"8efff8da-f680-4af5-9968-0f6eb82b37af\",\"Name\":\"Bardavon Opera House\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"Poughkeepsie\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"3e511208-18fb-4010-a6c8-548225c84c82\",\"Name\":\"Barrymore Theatre NY\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"c18e79bd-2095-4a1a-ad1d-ae33a44390e1\",\"Name\":\"Bass Performance Hall\",\"Country\":\"United States\",\"State\":\"Texas\",\"City\":\"Fort Worth\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"c7aab769-e8ae-4138-910a-008bd0aa0c8d\",\"Name\":\"Baton Rouge River Center Arena\",\"Country\":\"United States\",\"State\":\"Louisiana\",\"City\":\"Baton Rouge\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"b1f075f6-e7f2-40a2-aa44-ccd823892d78\",\"Name\":\"Bayfront Park Amphitheater\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Miami\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"f410d61c-01b4-4d7d-8f9a-c4792f7e1b47\",\"Name\":\"BB King Blues Club and Grill NY\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"08d08130-22d9-4404-b176-c4475b064f4b\",\"Name\":\"BB&T Field\",\"Country\":\"United States\",\"State\":\"North Carolina\",\"City\":\"Winston-Salem\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"17b17e53-d829-482b-9614-f2fe9834317a\",\"Name\":\"BC Place Stadium\",\"Country\":\"Canada\",\"State\":\"British Columbia\",\"City\":\"Vancouver\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"30c00a1c-2d28-428b-9f5c-28c5cbab2add\",\"Name\":\"Beacon Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"46431afd-5db3-457e-9d85-917bffa5294b\",\"Name\":\"Beaumont Club\",\"Country\":\"United States\",\"State\":\"Missouri\",\"City\":\"Kansas City\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"a793e031-b654-4c56-a0f3-44c7f4efc32a\",\"Name\":\"Beaver Stadium\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"University Park\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"a96df92f-ea42-49c0-9f38-ef5db7a358e6\",\"Name\":\"Belasco Theatre\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"New York\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"0410259b-a448-47b5-9cfe-6acaa2ab8b7b\",\"Name\":\"Belk Theatre - Blumenthal PAC\",\"Country\":\"United States\",\"State\":\"North Carolina\",\"City\":\"Charlotte\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"9ae9a342-8fa5-4bf2-94e8-faabac176db2\",\"Name\":\"Bell Auditorium\",\"Country\":\"United States\",\"State\":\"Georgia\",\"City\":\"Augusta\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"64bf5e6d-fc0b-4b5a-aba4-dc54a570d93f\",\"Name\":\"Bell Centre\",\"Country\":\"Canada\",\"State\":\"Quebec\",\"City\":\"Montreal\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"fea70585-c05b-4276-adfc-81ae14bb22fd\",\"Name\":\"Bellagio\",\"Country\":\"United States\",\"State\":\"Nevada\",\"City\":\"Las Vegas\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"22bb3ac2-ba98-4846-af1d-4b1f9ef2fb0b\",\"Name\":\"Belly Up Tavern\",\"Country\":\"United States\",\"State\":\"California\",\"City\":\"Solana Beach\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"c58f8c1f-af3b-4535-8337-7ba2ee65ab06\",\"Name\":\"Belmont Park\",\"Country\":\"United States\",\"State\":\"New York\",\"City\":\"Elmont\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"6261cab0-0418-469d-a2a3-c482c878e5dc\",\"Name\":\"Ben Hill Griffin Stadium\",\"Country\":\"United States\",\"State\":\"Florida\",\"City\":\"Gainesville\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"7c01dec1-6dc5-475c-8c4f-7e74cf3124d5\",\"Name\":\"Benaroya Hall Taper Auditorium\",\"Country\":\"United States\",\"State\":\"Washington\",\"City\":\"Seattle\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"1aa5aa28-0de4-44c8-bbda-54035b0ac59e\",\"Name\":\"Benedum Center\",\"Country\":\"United States\",\"State\":\"Pennsylvania\",\"City\":\"Pittsburgh\",\"Status\":1,\"SeatingCharts\":null},{\"VenueId\":\"4600dc81-f1ab-454b-97c3-076d2eb32aaa\",\"Name\":\"Bergen Performing Arts Center\",\"Country\":\"United States\",\"State\":\"New Jersey\",\"City\":\"Englewood\",\"Status\":1,\"SeatingCharts\":null}],\"Pagination\":{\"TotalResults\":1105,\"TotalPages\":11,\"CurrentPage\":1},\"Status\":0,\"Errors\":null}"
|
32
|
+
http_version: "1.1"
|
@@ -0,0 +1,53 @@
|
|
1
|
+
shared_examples_for "seating charts" do
|
2
|
+
it "returns 1 result" do
|
3
|
+
seating_charts.length.should == 1
|
4
|
+
end
|
5
|
+
|
6
|
+
it "contains exactly 1 total results" do
|
7
|
+
seating_charts.total_entries == 1
|
8
|
+
end
|
9
|
+
|
10
|
+
it "contains exactly 1 page of results" do
|
11
|
+
seating_charts.total_pages == 1
|
12
|
+
end
|
13
|
+
|
14
|
+
it "is on the first page of results" do
|
15
|
+
seating_charts.current_page.should == 1
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns all seating charts" do
|
19
|
+
seating_charts.each do |seating_chart|
|
20
|
+
seating_chart.is_a?(Ticketutils::SeatingChart).should == true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it "parses the seating charts" do
|
25
|
+
seating_chart.id.should == "87fae816-53c6-4fca-8549-044568191197"
|
26
|
+
seating_chart.name.should == "Main Map"
|
27
|
+
seating_chart.url.should == "http://images2.ticketutils.com/1000X/87fae816-53c6-4fca-8549-044568191197.jpg"
|
28
|
+
seating_chart.url_medium.should == "http://images2.ticketutils.com/500X/87fae816-53c6-4fca-8549-044568191197.jpg"
|
29
|
+
seating_chart.url_large.should == nil
|
30
|
+
seating_chart.venue_id.should == venue_id
|
31
|
+
seating_chart.status.should == 1
|
32
|
+
seating_chart.version.should == 1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
shared_examples_for "seatingchart.find with results" do
|
37
|
+
it "contains only seating charts" do
|
38
|
+
seating_charts.each do |seating_chart|
|
39
|
+
seating_chart.is_a?(Ticketutils::SeatingChart).should == true
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it "parses the results into seating charts" do
|
44
|
+
seating_chart.id.should == "3cd7427c-dabc-4a5e-b26c-016863684549"
|
45
|
+
seating_chart.name.should == "General Admission"
|
46
|
+
seating_chart.url.should == "http://images2.ticketutils.com/1000X/3cd7427c-dabc-4a5e-b26c-016863684549.jpg"
|
47
|
+
seating_chart.venue_id.should == "7b1d2d7d-c270-47c7-bf5f-262057c77fc1"
|
48
|
+
seating_chart.status.should == 1
|
49
|
+
seating_chart.version.should == 1
|
50
|
+
seating_chart.url_medium.should == "http://images2.ticketutils.com/500X/3cd7427c-dabc-4a5e-b26c-016863684549.jpg"
|
51
|
+
seating_chart.url_large.should == "http://images2.ticketutils.com/2000X/3cd7427c-dabc-4a5e-b26c-016863684549.jpg"
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Ticketutils.auth_token = "123456789012345678"
|
data/spec/shared/vcr.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
shared_examples_for "venues.find with results" do
|
2
|
+
it "contains only venues" do
|
3
|
+
venues.each do |venue|
|
4
|
+
venue.is_a?(Ticketutils::Venue).should == true
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
it "parses the results into venues" do
|
9
|
+
venue.id.should == "61b62126-add8-47e2-ad73-fca15abb3aff"
|
10
|
+
venue.name.should == "105 Valley St"
|
11
|
+
venue.country.should == "United States"
|
12
|
+
venue.state.should == "California"
|
13
|
+
venue.city.should == "Pasadena"
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'rubygems'
|
3
|
+
require 'rspec'
|
4
|
+
require 'vcr'
|
5
|
+
require 'ticketutils'
|
6
|
+
|
7
|
+
SPEC_ROOT = Pathname(__FILE__).dirname.expand_path
|
8
|
+
LIB_ROOT = SPEC_ROOT.parent + 'lib'
|
9
|
+
FIXTURE_ROOT = SPEC_ROOT.join('fixtures')
|
10
|
+
|
11
|
+
# Requires supporting files with custom matchers and macros, etc.,
|
12
|
+
# in ./support/ and its subdirectories.
|
13
|
+
Dir[File.expand_path('../shared/**/*.rb', __FILE__)].each do |file|
|
14
|
+
require(file)
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.mock_with :rspec
|
19
|
+
config.extend VCR::RSpec::Macros
|
20
|
+
|
21
|
+
config.filter_run :focus => true
|
22
|
+
config.run_all_when_everything_filtered = true
|
23
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Ticketutils::SeatingChart do
|
4
|
+
context ".find" do
|
5
|
+
context "with no options" do
|
6
|
+
let(:seating_charts) { Ticketutils.seating_charts }
|
7
|
+
|
8
|
+
use_vcr_cassette "seating_charts/find", :erb => { :auth_token => Ticketutils.auth_token }
|
9
|
+
|
10
|
+
it "returns an exception" do
|
11
|
+
begin
|
12
|
+
seating_charts
|
13
|
+
rescue Exception => e
|
14
|
+
e.message.should == "No Filters Specified in the Request"
|
15
|
+
e.class.should == Ticketutils::Error
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "updated in the last day" do
|
21
|
+
let(:date) { Date.parse("May 18, 2011") }
|
22
|
+
let(:seating_charts) { Ticketutils.seating_charts(:updated => date) }
|
23
|
+
let(:seating_chart) { seating_charts.first }
|
24
|
+
|
25
|
+
use_vcr_cassette "seating_charts/find_recent", :erb => { :auth_token => Ticketutils.auth_token }
|
26
|
+
|
27
|
+
it_should_behave_like "seatingchart.find with results"
|
28
|
+
|
29
|
+
it "returns an array of 100 items" do
|
30
|
+
seating_charts.length.should == 100
|
31
|
+
end
|
32
|
+
|
33
|
+
it "contains 160 total results" do
|
34
|
+
seating_charts.total_entries.should == 218
|
35
|
+
end
|
36
|
+
|
37
|
+
it "is on the first page of results" do
|
38
|
+
seating_charts.current_page.should == 1
|
39
|
+
end
|
40
|
+
|
41
|
+
it "contains 20 page of results" do
|
42
|
+
seating_charts.total_pages.should == 3
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "for a specific venue" do
|
47
|
+
let(:venue_id) { "6c307dea-2057-488b-9200-97c2c756c576" }
|
48
|
+
let(:seating_charts) { Ticketutils.seating_charts(:venue_id => venue_id) }
|
49
|
+
let(:seating_chart) { seating_charts.first }
|
50
|
+
|
51
|
+
use_vcr_cassette "seating_charts/for_venue", :erb => { :auth_token => Ticketutils.auth_token }
|
52
|
+
it_should_behave_like "seating charts"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Ticketutils::Venue do
|
4
|
+
context ".find" do
|
5
|
+
context "with no options" do
|
6
|
+
let(:venues) { Ticketutils.venues }
|
7
|
+
let(:venue) { venues.first }
|
8
|
+
|
9
|
+
use_vcr_cassette "venues/find", :erb => { :auth_token => Ticketutils.auth_token }
|
10
|
+
|
11
|
+
it_should_behave_like "venues.find with results"
|
12
|
+
|
13
|
+
it "returns an array of 100 items" do
|
14
|
+
venues.length.should == 100
|
15
|
+
end
|
16
|
+
|
17
|
+
it "contains 1990 total results" do
|
18
|
+
venues.total_entries.should == 1990
|
19
|
+
end
|
20
|
+
|
21
|
+
it "is on the first page of results" do
|
22
|
+
venues.current_page.should == 1
|
23
|
+
end
|
24
|
+
|
25
|
+
it "contains 20 page of results" do
|
26
|
+
venues.total_pages.should == 20
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "updated in the last day" do
|
31
|
+
let(:date) { Date.parse("May 18, 2011") }
|
32
|
+
let(:venues) { Ticketutils.venues(:updated => date) }
|
33
|
+
let(:venue) { venues.first }
|
34
|
+
|
35
|
+
use_vcr_cassette "venues/find_recent", :erb => { :auth_token => Ticketutils.auth_token }
|
36
|
+
|
37
|
+
it_should_behave_like "venues.find with results"
|
38
|
+
|
39
|
+
it "returns an array of 100 items" do
|
40
|
+
venues.length.should == 100
|
41
|
+
end
|
42
|
+
|
43
|
+
it "contains 1105 total results" do
|
44
|
+
venues.total_entries.should == 1105
|
45
|
+
end
|
46
|
+
|
47
|
+
it "is on the first page of results" do
|
48
|
+
venues.current_page.should == 1
|
49
|
+
end
|
50
|
+
|
51
|
+
it "contains exactly 12 page of results" do
|
52
|
+
venues.total_pages.should == 12
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "on page 2" do
|
57
|
+
let(:venues) { Ticketutils.venues(:page => 2) }
|
58
|
+
let(:venue) { venues.first }
|
59
|
+
|
60
|
+
use_vcr_cassette "venues/find_page_2", :erb => { :auth_token => Ticketutils.auth_token }
|
61
|
+
|
62
|
+
it_should_behave_like "venues.find with results"
|
63
|
+
|
64
|
+
it "returns an array of 100 items" do
|
65
|
+
venues.length.should == 100
|
66
|
+
end
|
67
|
+
|
68
|
+
it "contains 1993 total results" do
|
69
|
+
venues.total_entries.should == 1993
|
70
|
+
end
|
71
|
+
|
72
|
+
it "is on the second page of results" do
|
73
|
+
venues.current_page.should == 2
|
74
|
+
end
|
75
|
+
|
76
|
+
it "contains exactly 20 page of results" do
|
77
|
+
venues.total_pages.should == 20
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context "limiting to 50 results" do
|
82
|
+
let(:venues) { Ticketutils.venues(:per_page => 50) }
|
83
|
+
let(:venue) { venues.first }
|
84
|
+
|
85
|
+
use_vcr_cassette "venues/find_per_page_50", :erb => { :auth_token => Ticketutils.auth_token }
|
86
|
+
|
87
|
+
it_should_behave_like "venues.find with results"
|
88
|
+
|
89
|
+
it "returns an array of 50 items" do
|
90
|
+
venues.length.should == 50
|
91
|
+
end
|
92
|
+
|
93
|
+
it "contains 1993 total results" do
|
94
|
+
venues.total_entries.should == 1993
|
95
|
+
end
|
96
|
+
|
97
|
+
it "is on the first page of results" do
|
98
|
+
venues.current_page.should == 1
|
99
|
+
end
|
100
|
+
|
101
|
+
it "contains 20 pages of results" do
|
102
|
+
venues.total_pages.should == 20
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
context "a venue object" do
|
108
|
+
let(:venue_id) { "6c307dea-2057-488b-9200-97c2c756c576" }
|
109
|
+
let(:venue) { Ticketutils::Venue.new(:id => venue_id, :name => "Venue") }
|
110
|
+
let(:seating_charts) { venue.seating_charts }
|
111
|
+
let(:seating_chart) { seating_charts.first }
|
112
|
+
|
113
|
+
|
114
|
+
context "#seating_charts" do
|
115
|
+
use_vcr_cassette "seating_charts/for_venue", :erb => { :auth_token => Ticketutils.auth_token }
|
116
|
+
it_should_behave_like "seating charts"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
data/ticketutils.gemspec
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ticketutils}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Adam Fortuna"]
|
12
|
+
s.date = %q{2011-06-03}
|
13
|
+
s.description = %q{TicketUtils.com client for using thier API}
|
14
|
+
s.email = %q{adam@envylabs.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/ticketutils.rb",
|
26
|
+
"lib/ticketutils/base.rb",
|
27
|
+
"lib/ticketutils/error.rb",
|
28
|
+
"lib/ticketutils/seating_chart.rb",
|
29
|
+
"lib/ticketutils/venue.rb",
|
30
|
+
"spec/fixtures/seating_charts/find.yml",
|
31
|
+
"spec/fixtures/seating_charts/find_recent.yml",
|
32
|
+
"spec/fixtures/seating_charts/for_venue.yml",
|
33
|
+
"spec/fixtures/venues/find.yml",
|
34
|
+
"spec/fixtures/venues/find_page_2.yml",
|
35
|
+
"spec/fixtures/venues/find_per_page_50.yml",
|
36
|
+
"spec/fixtures/venues/find_recent.yml",
|
37
|
+
"spec/shared/seating_chart_examples.rb",
|
38
|
+
"spec/shared/setup_token.rb",
|
39
|
+
"spec/shared/vcr.rb",
|
40
|
+
"spec/shared/venue_examples.rb",
|
41
|
+
"spec/spec_helper.rb",
|
42
|
+
"spec/ticketutils/seating_chart_spec.rb",
|
43
|
+
"spec/ticketutils/venue_spec.rb",
|
44
|
+
"ticketutils.gemspec"
|
45
|
+
]
|
46
|
+
s.homepage = %q{http://github.com/adamfortuna/ticketutils}
|
47
|
+
s.require_paths = ["lib"]
|
48
|
+
s.rubygems_version = %q{1.6.2}
|
49
|
+
s.summary = %q{TicketUtils.com client using their API}
|
50
|
+
|
51
|
+
if s.respond_to? :specification_version then
|
52
|
+
s.specification_version = 3
|
53
|
+
|
54
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
55
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<vcr>, ["~> 1.10"])
|
57
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
|
+
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
59
|
+
s.add_runtime_dependency(%q<will_paginate>, [">= 0"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
62
|
+
s.add_dependency(%q<vcr>, ["~> 1.10"])
|
63
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
64
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
65
|
+
s.add_dependency(%q<will_paginate>, [">= 0"])
|
66
|
+
end
|
67
|
+
else
|
68
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
69
|
+
s.add_dependency(%q<vcr>, ["~> 1.10"])
|
70
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
71
|
+
s.add_dependency(%q<httparty>, [">= 0"])
|
72
|
+
s.add_dependency(%q<will_paginate>, [">= 0"])
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ticketutils
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 25
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Adam Fortuna
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-06-03 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: rspec
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: vcr
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 27
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 10
|
47
|
+
version: "1.10"
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rcov
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
type: :development
|
63
|
+
version_requirements: *id003
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: httparty
|
66
|
+
prerelease: false
|
67
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
hash: 3
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
|
+
type: :runtime
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: will_paginate
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 0
|
89
|
+
version: "0"
|
90
|
+
type: :runtime
|
91
|
+
version_requirements: *id005
|
92
|
+
description: TicketUtils.com client for using thier API
|
93
|
+
email: adam@envylabs.com
|
94
|
+
executables: []
|
95
|
+
|
96
|
+
extensions: []
|
97
|
+
|
98
|
+
extra_rdoc_files:
|
99
|
+
- LICENSE
|
100
|
+
- README.md
|
101
|
+
files:
|
102
|
+
- .document
|
103
|
+
- LICENSE
|
104
|
+
- README.md
|
105
|
+
- Rakefile
|
106
|
+
- VERSION
|
107
|
+
- lib/ticketutils.rb
|
108
|
+
- lib/ticketutils/base.rb
|
109
|
+
- lib/ticketutils/error.rb
|
110
|
+
- lib/ticketutils/seating_chart.rb
|
111
|
+
- lib/ticketutils/venue.rb
|
112
|
+
- spec/fixtures/seating_charts/find.yml
|
113
|
+
- spec/fixtures/seating_charts/find_recent.yml
|
114
|
+
- spec/fixtures/seating_charts/for_venue.yml
|
115
|
+
- spec/fixtures/venues/find.yml
|
116
|
+
- spec/fixtures/venues/find_page_2.yml
|
117
|
+
- spec/fixtures/venues/find_per_page_50.yml
|
118
|
+
- spec/fixtures/venues/find_recent.yml
|
119
|
+
- spec/shared/seating_chart_examples.rb
|
120
|
+
- spec/shared/setup_token.rb
|
121
|
+
- spec/shared/vcr.rb
|
122
|
+
- spec/shared/venue_examples.rb
|
123
|
+
- spec/spec_helper.rb
|
124
|
+
- spec/ticketutils/seating_chart_spec.rb
|
125
|
+
- spec/ticketutils/venue_spec.rb
|
126
|
+
- ticketutils.gemspec
|
127
|
+
has_rdoc: true
|
128
|
+
homepage: http://github.com/adamfortuna/ticketutils
|
129
|
+
licenses: []
|
130
|
+
|
131
|
+
post_install_message:
|
132
|
+
rdoc_options: []
|
133
|
+
|
134
|
+
require_paths:
|
135
|
+
- lib
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
hash: 3
|
142
|
+
segments:
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
hash: 3
|
151
|
+
segments:
|
152
|
+
- 0
|
153
|
+
version: "0"
|
154
|
+
requirements: []
|
155
|
+
|
156
|
+
rubyforge_project:
|
157
|
+
rubygems_version: 1.6.2
|
158
|
+
signing_key:
|
159
|
+
specification_version: 3
|
160
|
+
summary: TicketUtils.com client using their API
|
161
|
+
test_files: []
|
162
|
+
|