tmsapi 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +86 -0
  3. data/.project +17 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +11 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +94 -0
  8. data/Rakefile +14 -0
  9. data/Readme.md +62 -0
  10. data/lib/tmsapi/api.rb +61 -0
  11. data/lib/tmsapi/middleware/custom_logger.rb +70 -0
  12. data/lib/tmsapi/model/airing.rb +24 -0
  13. data/lib/tmsapi/model/award.rb +14 -0
  14. data/lib/tmsapi/model/base.rb +9 -0
  15. data/lib/tmsapi/model/caption.rb +8 -0
  16. data/lib/tmsapi/model/episode.rb +11 -0
  17. data/lib/tmsapi/model/event.rb +10 -0
  18. data/lib/tmsapi/model/image.rb +16 -0
  19. data/lib/tmsapi/model/lineup.rb +12 -0
  20. data/lib/tmsapi/model/movie.rb +16 -0
  21. data/lib/tmsapi/model/person.rb +12 -0
  22. data/lib/tmsapi/model/program.rb +36 -0
  23. data/lib/tmsapi/model/quality_rating.rb +8 -0
  24. data/lib/tmsapi/model/rating.rb +8 -0
  25. data/lib/tmsapi/model/recommendation.rb +9 -0
  26. data/lib/tmsapi/model/showtime.rb +13 -0
  27. data/lib/tmsapi/model/sport_event.rb +11 -0
  28. data/lib/tmsapi/model/station.rb +19 -0
  29. data/lib/tmsapi/model/station_airings.rb +14 -0
  30. data/lib/tmsapi/model/team.rb +9 -0
  31. data/lib/tmsapi/model/theatre.rb +8 -0
  32. data/lib/tmsapi/model.rb +26 -0
  33. data/lib/tmsapi/resource/base.rb +20 -0
  34. data/lib/tmsapi/resource/lineups.rb +58 -0
  35. data/lib/tmsapi/resource/movies.rb +21 -0
  36. data/lib/tmsapi/resource/movies_theatres.rb +37 -0
  37. data/lib/tmsapi/resource/movies_tv.rb +41 -0
  38. data/lib/tmsapi/resource/programs.rb +103 -0
  39. data/lib/tmsapi/resource/series.rb +45 -0
  40. data/lib/tmsapi/resource/sports.rb +35 -0
  41. data/lib/tmsapi/resource/stations.rb +47 -0
  42. data/lib/tmsapi/resource.rb +13 -0
  43. data/lib/tmsapi/version.rb +3 -0
  44. data/lib/tmsapi.rb +10 -0
  45. data/spec/api_spec.rb +354 -0
  46. data/spec/factories.rb +56 -0
  47. data/spec/model/program_spec.rb +33 -0
  48. data/spec/spec_helper.rb +45 -0
  49. data/spec/support/vcr.rb +20 -0
  50. data/spec/tms_api_spec.rb +7 -0
  51. data/spec/vcr/cassettes/TMSAPI_API/_lineups/_airings/should_tell_me_whats_airing.yml +37649 -0
  52. data/spec/vcr/cassettes/TMSAPI_API/_lineups/_channels/should_list_some_channels.yml +2623 -0
  53. data/spec/vcr/cassettes/TMSAPI_API/_lineups/_details/should_tell_me_about_the_lineup.yml +67 -0
  54. data/spec/vcr/cassettes/TMSAPI_API/_lineups/_find/should_find_local_lineups.yml +103 -0
  55. data/spec/vcr/cassettes/TMSAPI_API/_lineups/_stations/should_list_some_channels.yml +2623 -0
  56. data/spec/vcr/cassettes/TMSAPI_API/_movies/_theatres/_showings/should_get_movie_showings.yml +460 -0
  57. data/spec/vcr/cassettes/TMSAPI_API/_movies/_tv/_airings/should_tell_me_what_movies_are_on_tv.yml +6722 -0
  58. data/spec/vcr/cassettes/TMSAPI_API/_movies/_tv/_versions/should_tell_me_about_that_movie.yml +1366 -0
  59. data/spec/vcr/cassettes/TMSAPI_API/_programs/_advance_planner/should_list_holiday_events.yml +1951 -0
  60. data/spec/vcr/cassettes/TMSAPI_API/_programs/_airings/should_find_airings.yml +85 -0
  61. data/spec/vcr/cassettes/TMSAPI_API/_programs/_details/should_be_filled_with_program_information.yml +117 -0
  62. data/spec/vcr/cassettes/TMSAPI_API/_programs/_genres/should_return_all_genres.yml +131 -0
  63. data/spec/vcr/cassettes/TMSAPI_API/_programs/_images/should_return_images.yml +225 -0
  64. data/spec/vcr/cassettes/TMSAPI_API/_programs/_new_past_week/should_have_programs.yml +2238 -0
  65. data/spec/vcr/cassettes/TMSAPI_API/_programs/_new_shows/should_find_new_shows.yml +1105 -0
  66. data/spec/vcr/cassettes/TMSAPI_API/_programs/_search/should_find_4_programs.yml +152 -0
  67. data/spec/vcr/cassettes/TMSAPI_API/_series/_airings/should_list_airings.yml +341 -0
  68. data/spec/vcr/cassettes/TMSAPI_API/_series/_details/should_find_the_series.yml +272 -0
  69. data/spec/vcr/cassettes/TMSAPI_API/_series/_episodes/should_return_episodes.yml +3492 -0
  70. data/spec/vcr/cassettes/TMSAPI_API/_stations/_airings/should_list_airings.yml +123 -0
  71. data/spec/vcr/cassettes/TMSAPI_API/_stations/_details/should_get_station_details.yml +67 -0
  72. data/tmsapi.gemspec +42 -0
  73. metadata +296 -0
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://data.tmsapi.com/v1/lineups/USA-NY31586-X?api_key=api_key_YYYYYYYYYYYYYYYYYYYYY
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - tmsapi rubygem v0.0.1
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ !binary "eC1tYXNoZXJ5LXJlc3BvbmRlcg==":
18
+ - !binary |-
19
+ cHJvZC1qLXdvcmtlci1sYXgtMDEubWFzaGVyeS5jb20=
20
+ !binary "YWNjZXB0LXJhbmdlcw==":
21
+ - !binary |-
22
+ Ynl0ZXM=
23
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctaGVhZGVycw==":
24
+ - !binary |-
25
+ b3JpZ2luLCBjb250ZW50LXR5cGUsIGFjY2VwdA==
26
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctbWV0aG9kcw==":
27
+ - !binary |-
28
+ R0VULCBQT1NULCBPUFRJT05T
29
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctb3JpZ2lu":
30
+ - !binary |-
31
+ Kg==
32
+ !binary "YWNjZXNzLWNvbnRyb2wtY29udGVudC10eXBl":
33
+ - !binary |-
34
+ Ki8q
35
+ !binary "YWNjZXNzLWNvbnRyb2wtbWF4LWFnZQ==":
36
+ - !binary |-
37
+ ODY0MDA=
38
+ !binary "YWdl":
39
+ - !binary |-
40
+ MA==
41
+ !binary "Y29udGVudC10eXBl":
42
+ - !binary |-
43
+ YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PSJVVEYtOCI=
44
+ !binary "ZGF0ZQ==":
45
+ - !binary |-
46
+ U3VuLCAyMiBEZWMgMjAxMyAwMzo1Njo0NyBHTVQ=
47
+ !binary "c2VydmVy":
48
+ - !binary |-
49
+ SmV0dHkoNi4xLjI0KQ==
50
+ !binary "dmlh":
51
+ - !binary |-
52
+ MS4xIHZhcm5pc2g=
53
+ !binary "eC12YXJuaXNo":
54
+ - !binary |-
55
+ MTEzMzA1MTU1Nw==
56
+ !binary "Y29ubmVjdGlvbg==":
57
+ - !binary |-
58
+ Y2xvc2U=
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: !binary |-
62
+ eyJ0eXBlIjoiQ0FCTEUiLCJsaW5ldXBJZCI6IlVTQS1OWTMxNTg2LVgiLCJu
63
+ YW1lIjoiVGltZSBXYXJuZXIgQ2FibGUgLSBEaWdpdGFsIChRdWVlbnNidXJ5
64
+ KSIsImRldmljZSI6IlgiLCJsb2NhdGlvbiI6IlF1ZWVuc2J1cnkifQ==
65
+ http_version:
66
+ recorded_at: Sun, 22 Dec 2013 03:56:47 GMT
67
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,103 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://data.tmsapi.com/v1/lineups?api_key=api_key_YYYYYYYYYYYYYYYYYYYYY&postalCode=12804
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - tmsapi rubygem v0.0.1
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ !binary "eC1tYXNoZXJ5LXJlc3BvbmRlcg==":
18
+ - !binary |-
19
+ cHJvZC1qLXdvcmtlci1sYXgtMDIubWFzaGVyeS5jb20=
20
+ !binary "YWNjZXB0LXJhbmdlcw==":
21
+ - !binary |-
22
+ Ynl0ZXM=
23
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctaGVhZGVycw==":
24
+ - !binary |-
25
+ b3JpZ2luLCBjb250ZW50LXR5cGUsIGFjY2VwdA==
26
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctbWV0aG9kcw==":
27
+ - !binary |-
28
+ R0VULCBQT1NULCBPUFRJT05T
29
+ !binary "YWNjZXNzLWNvbnRyb2wtYWxsb3ctb3JpZ2lu":
30
+ - !binary |-
31
+ Kg==
32
+ !binary "YWNjZXNzLWNvbnRyb2wtY29udGVudC10eXBl":
33
+ - !binary |-
34
+ Ki8q
35
+ !binary "YWNjZXNzLWNvbnRyb2wtbWF4LWFnZQ==":
36
+ - !binary |-
37
+ ODY0MDA=
38
+ !binary "YWdl":
39
+ - !binary |-
40
+ MA==
41
+ !binary "Y29udGVudC10eXBl":
42
+ - !binary |-
43
+ YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PSJVVEYtOCI=
44
+ !binary "ZGF0ZQ==":
45
+ - !binary |-
46
+ U2F0LCAyMSBEZWMgMjAxMyAyMDowNToyMiBHTVQ=
47
+ !binary "c2VydmVy":
48
+ - !binary |-
49
+ SmV0dHkoNi4xLjI0KQ==
50
+ !binary "dmlh":
51
+ - !binary |-
52
+ MS4xIHZhcm5pc2g=
53
+ !binary "eC12YXJuaXNo":
54
+ - !binary |-
55
+ OTU2ODA4MTAz
56
+ !binary "Y29ubmVjdGlvbg==":
57
+ - !binary |-
58
+ Y2xvc2U=
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: !binary |-
62
+ W3sidHlwZSI6Ik9UQSIsImxpbmV1cElkIjoiVVNBLU9UQTEyODA0IiwibmFt
63
+ ZSI6IkxvY2FsIn0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