poms 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile.lock +11 -3
  4. data/README.md +12 -0
  5. data/lib/poms/api/auth.rb +40 -0
  6. data/lib/poms/api/request.rb +44 -0
  7. data/lib/poms/merged_series.rb +5 -4
  8. data/lib/poms/version.rb +1 -1
  9. data/poms.gemspec +4 -5
  10. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast_starts_at/returns_a_datetime.yml +17 -17
  11. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_position.yml +16 -16
  12. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_title.yml +16 -16
  13. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_a_video_url.yml +16 -16
  14. data/spec/fixtures/vcr_cassettes/poms/builderless/clip/has_an_image_id.yml +17 -17
  15. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_current_broadcast_fetches_the_current_broadcast.yml +17 -17
  16. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_fetches_the_current_broadcast.yml +68 -0
  17. data/spec/fixtures/vcr_cassettes/poms/fetch_broadcasts_fetch_next_broadcast_and_key_returns_the_key.yml +68 -0
  18. data/spec/fixtures/vcr_cassettes/poms/merged_series/turns_the_json_into_a_hash.yml +19 -19
  19. data/spec/fixtures/vcr_cassettes/poms_fetch/a_broadcast_has_scheduled_events_with_last_with_starts_at.yml +13 -13
  20. data/spec/fixtures/vcr_cassettes/poms_fetch/a_clip_has_a_title.yml +16 -16
  21. data/spec/fixtures/vcr_cassettes/poms_fetch/an_aankeiler_has_images.yml +13 -13
  22. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_mid.yml +16 -16
  23. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_a_title.yml +16 -16
  24. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast/has_scheduled_events_with_last_with_starts_at.yml +16 -16
  25. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_broadcast_with_a_mid.yml +16 -16
  26. data/spec/fixtures/vcr_cassettes/poms_fetch_current_broadcast_and_key/has_a_key.yml +16 -16
  27. data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_media_type.yml +409 -383
  28. data/spec/fixtures/vcr_cassettes/poms_fetch_group/has_a_child_with_a_title.yml +409 -383
  29. data/spec/fixtures/vcr_cassettes/poms_fetch_playlist_clips/creates_an_array_of_clips.yml +987 -906
  30. data/spec/lib/poms/api/auth_spec.rb +34 -0
  31. data/spec/lib/poms/api/request_spec.rb +30 -0
  32. data/spec/lib/poms/builderless/clip_spec.rb +2 -2
  33. data/spec/lib/poms/merged_series_spec.rb +8 -10
  34. data/spec/lib/poms/views_spec.rb +2 -2
  35. data/spec/lib/poms_spec.rb +14 -14
  36. data/spec/spec_helper.rb +4 -4
  37. metadata +14 -18
  38. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_position.yml +0 -43
  39. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_title.yml +0 -43
  40. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_a_video_url.yml +0 -43
  41. data/spec/fixtures/vcr_cassettes/poms/builderless/broadcast/has_an_image_id.yml +0 -43
  42. data/spec/fixtures/vcr_cassettes/poms/merged_series/is_enumerable.yml +0 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 703bf8edfde98b8273f149be198272b961de2401
4
- data.tar.gz: 2f609cc7938ad8213370262412116bc3db626db0
3
+ metadata.gz: ea2f8a418ece2d7e6a781048eface1f3e59718a8
4
+ data.tar.gz: 119fe18a3cbed68a20e9cedcd65eb4462633b213
5
5
  SHA512:
6
- metadata.gz: fdcdd246a1337a91c97d02ee8d83cd28602f7481ecd668561991771f8184364382b550a5dc4f702c648ed5140b4d23a1fb882873d41b41b50029b11b15004446
7
- data.tar.gz: fb732f79d70461ae2ccd395c054b2cda42f517e7cc3217cb10a123d7c2fd51a641c2847ea2d70e5359d7ac6a405b02231ec3651d69cd6d013039f37a03e80d5a
6
+ metadata.gz: f443e47960ae7bacf500761fac52a7474adbc4cf9f3152b26c28495887b2d079da37c07ae124aa2968f80c1a8d2afc87ff536f673770673ddac28b3a20825e1e
7
+ data.tar.gz: 1d3a79509b18fcd9f5e489bd5e870407293a560f3073d7714fc766d7a07d750dea74154fd3a6a3ba70066bfa0f20d24707b45a7eecff0102d035d466d74b48f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Poms Release notes
2
2
 
3
+ ## 1.1.0
4
+
5
+ * Updated README with usage instruction.
6
+ * [#21] Allow access to the Poms API. This functionality is only used for merging series at this point.
7
+
3
8
  ## 1.0.1
4
9
 
5
10
  * [#20](https://github.com/brightin/poms/pull/20) Return schedule event `starts_at` as DateTime.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- poms (1.0.0)
4
+ poms (1.1.0)
5
5
  activesupport
6
6
 
7
7
  GEM
@@ -13,15 +13,17 @@ GEM
13
13
  minitest (~> 5.1)
14
14
  thread_safe (~> 0.3, >= 0.3.4)
15
15
  tzinfo (~> 1.1)
16
+ addressable (2.4.0)
16
17
  ast (2.2.0)
17
18
  astrolabe (1.3.1)
18
19
  parser (~> 2.2)
19
20
  celluloid (0.16.0)
20
21
  timers (~> 4.0.0)
21
22
  coderay (1.1.0)
23
+ crack (0.4.3)
24
+ safe_yaml (~> 1.0.0)
22
25
  diff-lcs (1.2.5)
23
26
  fabrication (2.12.2)
24
- fakeweb (1.3.0)
25
27
  ffi (1.9.8)
26
28
  formatador (0.2.5)
27
29
  guard (2.12.5)
@@ -38,6 +40,7 @@ GEM
38
40
  guard (~> 2.1)
39
41
  guard-compat (~> 1.1)
40
42
  rspec (>= 2.99.0, < 4.0)
43
+ hashdiff (0.2.3)
41
44
  hitimes (1.2.2)
42
45
  i18n (0.7.0)
43
46
  json (1.8.2)
@@ -84,6 +87,7 @@ GEM
84
87
  rainbow (>= 1.99.1, < 3.0)
85
88
  ruby-progressbar (~> 1.4)
86
89
  ruby-progressbar (1.7.5)
90
+ safe_yaml (1.0.4)
87
91
  shellany (0.0.1)
88
92
  slop (3.6.0)
89
93
  thor (0.19.1)
@@ -94,6 +98,10 @@ GEM
94
98
  tzinfo (1.2.2)
95
99
  thread_safe (~> 0.1)
96
100
  vcr (2.9.3)
101
+ webmock (1.22.6)
102
+ addressable (>= 2.3.6)
103
+ crack (>= 0.3.2)
104
+ hashdiff
97
105
 
98
106
  PLATFORMS
99
107
  ruby
@@ -101,7 +109,6 @@ PLATFORMS
101
109
  DEPENDENCIES
102
110
  bundler (~> 1.3)
103
111
  fabrication
104
- fakeweb
105
112
  guard
106
113
  guard-rspec
107
114
  poms!
@@ -110,3 +117,4 @@ DEPENDENCIES
110
117
  rubocop (~> 0.34.1)
111
118
  timecop
112
119
  vcr
120
+ webmock
data/README.md CHANGED
@@ -17,6 +17,18 @@ Or install it yourself as:
17
17
 
18
18
  $ gem install poms
19
19
 
20
+ ## Usage
21
+
22
+ The `Poms` module contains various ways to query the Poms CouchDB service. The simplest way to get something is to use the `fetch` function, which takes a MID.
23
+
24
+ Poms.fetch('mid')
25
+
26
+ This returns an OpenStruct-like object that wraps the json of the Poms response.
27
+
28
+ For some more advanced querying, you can use functions like `fetch_clip` which also takes a MID, but returns a `Clip` object, that is a little easier to work with.
29
+
30
+ You can also query collections in a way to get back multiple episodes. This is tied to the views in the Poms CouchDB service and is documented on the wiki of the NPO.
31
+
20
32
  ## Contributing
21
33
 
22
34
  1. Fork it
@@ -0,0 +1,40 @@
1
+ module Poms
2
+ module Api
3
+ # This module can be used to create an authentication header for the Poms
4
+ # API.
5
+ #
6
+ # see: http://wiki.publiekeomroep.nl/display/npoapi/Algemeen
7
+ module Auth
8
+ # Create an auth header for the Poms API. This is a codified string
9
+ # consisting of a message that is hashed with a secret.
10
+ #
11
+ # @see message
12
+ # @param secret The Poms API secret key
13
+ # @param message The message that needs to be hashed.
14
+ def self.encode(secret, message)
15
+ sha256 = OpenSSL::Digest.new('sha256')
16
+ digest = OpenSSL::HMAC.digest(sha256, secret, message)
17
+ Base64.encode64(digest)
18
+ end
19
+
20
+ # Creates the header that is used for authenticating a request to the Poms
21
+ # API.
22
+ #
23
+ # @param uri The uri that is being requested
24
+ # @param origin The origin header
25
+ # @param date The date as an RFC822 string
26
+ # @param params The url params as a ruby hash
27
+ def self.message(uri, origin, date, params = {})
28
+ params_string = params.sort.map do |key, value|
29
+ "#{key}:#{value}"
30
+ end.join(',') if params.present?
31
+ [
32
+ "origin:#{origin}",
33
+ "x-npo-date:#{date}",
34
+ "uri:#{uri}",
35
+ params_string
36
+ ].compact.join(',')
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,44 @@
1
+ require 'poms/api/auth'
2
+
3
+ module Poms
4
+ module Api
5
+ # A request to the Poms API. Does the authentication and allows you to
6
+ # execute the request.
7
+ class Request
8
+ # Create a new request to the Poms API. The request is initialized with a
9
+ # URI to be called and the key, secret and origin that are needed for
10
+ # authentication.
11
+ #
12
+ # @param uri The full URI to call on the Poms API
13
+ # @param key The api key
14
+ # @param secret The secret that goes with the api key
15
+ # @param origin The whitelisted origin for this api key
16
+ def initialize(uri, key, secret, origin)
17
+ @uri = uri
18
+ @path = URI(@uri).path
19
+ @key = key
20
+ @secret = secret
21
+ @origin = origin
22
+ end
23
+
24
+ # Executes the request.
25
+ def call
26
+ open(@uri, headers)
27
+ end
28
+
29
+ private
30
+
31
+ def headers
32
+ date = Time.now.rfc822
33
+ origin = @origin
34
+ message = Auth.message(@path, @origin, date)
35
+ encoded_message = Auth.encode(@secret, message)
36
+ {
37
+ 'Origin' => origin,
38
+ 'X-NPO-Date' => date,
39
+ 'Authorization' => "NPO #{@key}:#{encoded_message}"
40
+ }
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,4 +1,4 @@
1
- require 'open-uri'
1
+ require 'poms/api/request'
2
2
  require 'timeout'
3
3
 
4
4
  module Poms
@@ -6,7 +6,8 @@ module Poms
6
6
  module MergedSeries
7
7
  extend self
8
8
 
9
- API_URL = 'https://rs-test.poms.omroep.nl/v1/api/media/redirects/'.freeze
9
+ TEST_URL = 'https://rs-test.poms.omroep.nl/v1/api/media/redirects/'.freeze
10
+ PRODUCTION_URL = 'https://rs.poms.omroep.nl/v1/api/media/redirects/'.freeze
10
11
 
11
12
  # Gets the merged serie mids as a hash. Expects a JSON response from
12
13
  # the server with a `map` key.
@@ -15,9 +16,9 @@ module Poms
15
16
  #
16
17
  # @param api_url the API url to query
17
18
  # @return [Hash] a hash with old_mid => new_mid pairs
18
- def serie_mids(api_url = API_URL)
19
+ def serie_mids(api_url = PRODUCTION_URL, key = '', secret = '', origin = '')
19
20
  Timeout.timeout(3) do
20
- data = open(api_url).read
21
+ data = Poms::Api::Request.new(api_url, key, secret, origin).call.read
21
22
  JSON.parse(data).fetch('map')
22
23
  end
23
24
  rescue OpenURI::HTTPError, JSON::ParserError, Timeout::Error => e
data/lib/poms/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # The version
2
2
  module Poms
3
- VERSION = '1.0.1'
3
+ VERSION = '1.1.0'
4
4
  end
data/poms.gemspec CHANGED
@@ -7,11 +7,10 @@ require 'rake'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'poms'
9
9
  spec.version = Poms::VERSION
10
- spec.authors = ['Tom Kruijsen', 'Stijn Meurkens', 'Tijn Schuurmans']
11
- spec.email = ['tom@brightin.nl', 'stijn@brightin.nl',
12
- 'tijn@brightin.nl']
10
+ spec.authors = ['Tom Kruijsen']
11
+ spec.email = ['tom@brightin.nl']
13
12
  spec.description = 'Interface to POMS CouchDB API'
14
- spec.summary = 'Interfcae to POMS CouchDB API'
13
+ spec.summary = 'Interface to POMS CouchDB API'
15
14
  spec.homepage = 'https://github.com/brightin/poms'
16
15
  spec.license = 'MIT'
17
16
 
@@ -24,7 +23,7 @@ Gem::Specification.new do |spec|
24
23
  spec.add_development_dependency 'rspec'
25
24
  spec.add_development_dependency 'guard'
26
25
  spec.add_development_dependency 'guard-rspec'
27
- spec.add_development_dependency 'fakeweb'
26
+ spec.add_development_dependency 'webmock'
28
27
  spec.add_development_dependency 'fabrication'
29
28
  spec.add_development_dependency 'rubocop', '~> 0.34.1'
30
29
  spec.add_development_dependency 'timecop'
@@ -2,41 +2,41 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?descending=true&endkey=%5B%22OPVO%22%2C+1444046400000%5D&include_docs=true&limit=1&reduce=false&startkey=%5B%22OPVO%22%2C+1444132800000%5D
5
+ uri: http://docs.poms.omroep.nl/media/_design/media/_view/broadcasts-by-channel-and-start?descending=true&endkey=%5B%22OPVO%22,%201444046400000%5D&include_docs=true&limit=1&reduce=false&startkey=%5B%22OPVO%22,%201444132800000%5D
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- accept-encoding:
10
+ Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- accept:
12
+ Accept:
13
13
  - "*/*"
14
- user-agent:
14
+ User-Agent:
15
15
  - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- date:
22
- - Tue, 19 Jan 2016 13:05:32 GMT
23
- server:
21
+ Date:
22
+ - Tue, 09 Feb 2016 11:02:28 GMT
23
+ Server:
24
24
  - CouchDB/1.6.1 (Erlang OTP/R15B01)
25
- etag:
26
- - '"Y2MYXBT5GJJ0TD6483E1R9EI"'
27
- content-type:
25
+ Etag:
26
+ - '"32Y7KHAFUNQKIXXS10QE1MBD0"'
27
+ Content-Type:
28
28
  - text/plain; charset=utf-8
29
- cache-control:
29
+ Cache-Control:
30
30
  - must-revalidate
31
- x-proxyinstancename:
31
+ X-Proxyinstancename:
32
32
  - poms1b
33
- set-cookie:
34
- - balancer://poms3cluster=balancer.poms1s2db; path=/;
35
- transfer-encoding:
33
+ Set-Cookie:
34
+ - balancer://poms3cluster=balancer.poms1madb; path=/;
35
+ Transfer-Encoding:
36
36
  - chunked
37
37
  body:
38
38
  encoding: UTF-8
39
- string: "{\"total_rows\":923957,\"offset\":237582,\"rows\":[\r\n{\"id\":\"T_POW_02983987\",\"key\":[\"OPVO\",1444128900000],\"value\":null,\"doc\":{\"_id\":\"T_POW_02983987\",\"_rev\":\"20-2580d71f807a2182a6e5298231166a69\",\"objectType\":\"program\",\"mid\":\"T_POW_02983987\",\"creationDate\":1442487246008,\"lastModified\":1452873713621,\"sortDate\":1444128900000,\"urn\":\"urn:vpro:media:program:62586944\",\"embeddable\":true,\"broadcasters\":[\"KRO-NCRV\"],\"titles\":[{\"value\":\"Peperbollen\",\"owner\":\"MIS\",\"type\":\"MAIN\"},{\"value\":\"Alle
39
+ string: "{\"total_rows\":937833,\"offset\":241709,\"rows\":[\r\n{\"id\":\"T_POW_02983987\",\"key\":[\"OPVO\",1444128900000],\"value\":null,\"doc\":{\"_id\":\"T_POW_02983987\",\"_rev\":\"20-2580d71f807a2182a6e5298231166a69\",\"objectType\":\"program\",\"mid\":\"T_POW_02983987\",\"creationDate\":1442487246008,\"lastModified\":1452873713621,\"sortDate\":1444128900000,\"urn\":\"urn:vpro:media:program:62586944\",\"embeddable\":true,\"broadcasters\":[\"KRO-NCRV\"],\"titles\":[{\"value\":\"Peperbollen\",\"owner\":\"MIS\",\"type\":\"MAIN\"},{\"value\":\"Alle
40
40
  begin is moeilijk\",\"owner\":\"MIS\",\"type\":\"SUB\"}],\"descriptions\":[{\"value\":\"Een
41
41
  groepje kinderen dat zich de Peperbollen noemt bestrijdt misdaad en onrecht.
42
42
  Ze hebben hun hoofdkwartier in een magazijnencomplex in het havendistrict
@@ -48,6 +48,6 @@ http_interactions:
48
48
  ondertitels\",\"guideDay\":1452812400000,\"start\":1452837300000,\"duration\":1658000,\"poProgID\":\"T_POW_02983987\",\"channel\":\"OPVO\",\"urnRef\":\"urn:vpro:media:program:62586944\",\"midRef\":\"T_POW_02983987\"},{\"textSubtitles\":\"Teletekst
49
49
  ondertitels\",\"guideDay\":1452812400000,\"start\":1452849900000,\"duration\":1658000,\"poProgID\":\"T_POW_02983987\",\"channel\":\"OPVO\",\"urnRef\":\"urn:vpro:media:program:62586944\",\"midRef\":\"T_POW_02983987\"},{\"textSubtitles\":\"Teletekst
50
50
  ondertitels\",\"guideDay\":1453071600000,\"start\":1453148100000,\"duration\":1658000,\"poProgID\":\"T_POW_02983987\",\"channel\":\"OPVO\",\"urnRef\":\"urn:vpro:media:program:62586944\",\"midRef\":\"T_POW_02983987\"}],\"publishDate\":1452873995581,\"workflow\":\"PUBLISHED\",\"type\":\"BROADCAST\",\"avType\":\"VIDEO\"}}\r\n]}\n"
51
- http_version: '1.1'
51
+ http_version:
52
52
  recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
53
53
  recorded_with: VCR 2.9.3
@@ -7,37 +7,37 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- accept-encoding:
10
+ Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- accept:
12
+ Accept:
13
13
  - "*/*"
14
- user-agent:
14
+ User-Agent:
15
15
  - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- date:
22
- - Fri, 23 Oct 2015 12:11:04 GMT
23
- server:
21
+ Date:
22
+ - Tue, 09 Feb 2016 11:02:28 GMT
23
+ Server:
24
24
  - CouchDB/1.6.1 (Erlang OTP/R15B01)
25
- etag:
26
- - '"4-594e55601c906f36434b21bc9db51c90"'
27
- content-type:
25
+ Etag:
26
+ - '"8-427f3fcb3d9b620ddcd3e9387a4e67c2"'
27
+ Content-Type:
28
28
  - text/plain; charset=utf-8
29
- content-length:
30
- - '1569'
31
- cache-control:
29
+ Content-Length:
30
+ - '1634'
31
+ Cache-Control:
32
32
  - must-revalidate
33
- x-proxyinstancename:
33
+ X-Proxyinstancename:
34
34
  - poms1b
35
- set-cookie:
35
+ Set-Cookie:
36
36
  - balancer://poms3cluster=balancer.poms1s1db; path=/;
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: |
40
- {"_id":"WO_NPO_1950962","_rev":"4-594e55601c906f36434b21bc9db51c90","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1442491591146,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":1,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1442491834775,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
- http_version: '1.1'
40
+ {"_id":"WO_NPO_1950962","_rev":"8-427f3fcb3d9b620ddcd3e9387a4e67c2","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1447947725305,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"De wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"},{"midRef":"POMS_S_NTR_3191139","urnRef":"urn:vpro:media:group:70383463","type":"SERIES"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":2,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1454339417687,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
+ http_version:
42
42
  recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
43
43
  recorded_with: VCR 2.9.3
@@ -7,37 +7,37 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- accept-encoding:
10
+ Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- accept:
12
+ Accept:
13
13
  - "*/*"
14
- user-agent:
14
+ User-Agent:
15
15
  - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- date:
22
- - Fri, 23 Oct 2015 12:11:04 GMT
23
- server:
21
+ Date:
22
+ - Tue, 09 Feb 2016 11:02:28 GMT
23
+ Server:
24
24
  - CouchDB/1.6.1 (Erlang OTP/R15B01)
25
- etag:
26
- - '"4-594e55601c906f36434b21bc9db51c90"'
27
- content-type:
25
+ Etag:
26
+ - '"8-427f3fcb3d9b620ddcd3e9387a4e67c2"'
27
+ Content-Type:
28
28
  - text/plain; charset=utf-8
29
- content-length:
30
- - '1569'
31
- cache-control:
29
+ Content-Length:
30
+ - '1634'
31
+ Cache-Control:
32
32
  - must-revalidate
33
- x-proxyinstancename:
33
+ X-Proxyinstancename:
34
34
  - poms1b
35
- set-cookie:
35
+ Set-Cookie:
36
36
  - balancer://poms3cluster=balancer.poms1s1db; path=/;
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: |
40
- {"_id":"WO_NPO_1950962","_rev":"4-594e55601c906f36434b21bc9db51c90","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1442491591146,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":1,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1442491834775,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
- http_version: '1.1'
40
+ {"_id":"WO_NPO_1950962","_rev":"8-427f3fcb3d9b620ddcd3e9387a4e67c2","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1447947725305,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"De wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"},{"midRef":"POMS_S_NTR_3191139","urnRef":"urn:vpro:media:group:70383463","type":"SERIES"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":2,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1454339417687,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
+ http_version:
42
42
  recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
43
43
  recorded_with: VCR 2.9.3
@@ -7,37 +7,37 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- accept-encoding:
10
+ Accept-Encoding:
11
11
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
- accept:
12
+ Accept:
13
13
  - "*/*"
14
- user-agent:
14
+ User-Agent:
15
15
  - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
- date:
22
- - Fri, 23 Oct 2015 12:11:04 GMT
23
- server:
21
+ Date:
22
+ - Tue, 09 Feb 2016 11:02:28 GMT
23
+ Server:
24
24
  - CouchDB/1.6.1 (Erlang OTP/R15B01)
25
- etag:
26
- - '"4-594e55601c906f36434b21bc9db51c90"'
27
- content-type:
25
+ Etag:
26
+ - '"8-427f3fcb3d9b620ddcd3e9387a4e67c2"'
27
+ Content-Type:
28
28
  - text/plain; charset=utf-8
29
- content-length:
30
- - '1569'
31
- cache-control:
29
+ Content-Length:
30
+ - '1634'
31
+ Cache-Control:
32
32
  - must-revalidate
33
- x-proxyinstancename:
33
+ X-Proxyinstancename:
34
34
  - poms1b
35
- set-cookie:
35
+ Set-Cookie:
36
36
  - balancer://poms3cluster=balancer.poms1madb; path=/;
37
37
  body:
38
38
  encoding: UTF-8
39
39
  string: |
40
- {"_id":"WO_NPO_1950962","_rev":"4-594e55601c906f36434b21bc9db51c90","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1442491591146,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"Liedje: de wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":1,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1442491834775,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
- http_version: '1.1'
40
+ {"_id":"WO_NPO_1950962","_rev":"8-427f3fcb3d9b620ddcd3e9387a4e67c2","objectType":"program","mid":"WO_NPO_1950962","creationDate":1442490263679,"lastModified":1447947725305,"sortDate":1442490263679,"urn":"urn:vpro:media:program:62589080","embeddable":true,"broadcasters":["NPO"],"titles":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"},{"value":"De wielen van de bus","owner":"BROADCASTER","type":"SUB"}],"descriptions":[{"value":"De wielen van de bus","owner":"BROADCASTER","type":"MAIN"}],"genres":["Jeugd"],"countries":[],"languages":[],"duration":60000,"descendantOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST"},{"midRef":"POMS_S_NTR_3191139","urnRef":"urn:vpro:media:group:70383463","type":"SERIES"}],"memberOf":[{"midRef":"POMS_S_NPO_2015412","urnRef":"urn:vpro:media:group:62589310","type":"PLAYLIST","index":2,"highlighted":false,"added":1442490529409}],"locations":[{"programUrl":"http://download.omroep.nl/npo/zappelin/DWVZ_AFL_86_De_wielen_van_de_bus.mp4","avAttributes":{"bitrate":1000000,"avFileFormat":"MP4"},"owner":"BROADCASTER","creationDate":1442490345785,"lastModified":1442490345864,"workflow":"PUBLISHED","urn":"urn:vpro:media:location:62589229"}],"images":[{"title":"Wielen van de bus","description":"wielen van de bus","imageUri":"urn:vpro:image:653515","height":259,"width":559,"owner":"BROADCASTER","type":"PORTRAIT","highlighted":true,"creationDate":1442491591052,"lastModified":1442491591141,"workflow":"PUBLISHED","urn":"urn:vpro:media:image:62590127"}],"publishDate":1454339417687,"workflow":"PUBLISHED","type":"CLIP","avType":"VIDEO"}
41
+ http_version:
42
42
  recorded_at: Tue, 06 Oct 2015 12:00:00 GMT
43
43
  recorded_with: VCR 2.9.3