clarify 2.0.0.alpha.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +4 -0
- data/README.md +29 -0
- data/lib/clarify/version.rb +1 -1
- data/src_readme/README_no_output.md +22 -0
- data/src_readme/examples/bundles_show_tracks.rb +11 -0
- data/src_readme/readme.md.erb +4 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9dd13f6f24ee7c62e04f6f7a4a3c48f71692482
|
4
|
+
data.tar.gz: d9f41aed7e8805c0bd67599d699e51bcf79fee19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a21bb48f8005e50ca0b872ce6ed6da1860b4a83ce4607ee10120ee2e8cc93a6b245b10fead575aa906fad2a01c7fe78117bb1d8205322f7092e2beb49c9d9d7
|
7
|
+
data.tar.gz: ac8c17bef44562c8561ecf2ba035e29dfaa5abdd3c5ccbc5742ddb71dced7f124b5450e466f640ab531ea1648765d2d6b5c99e4547d9b71fc90656cb5a6c6821
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -146,6 +146,35 @@ Example output of bundles_list_fetch.rb:
|
|
146
146
|
- Bundle Name: Resignation Address
|
147
147
|
```
|
148
148
|
|
149
|
+
### Get a list of tracks and the URL of their original media
|
150
|
+
|
151
|
+
```ruby
|
152
|
+
# bundles_show_tracks.rb
|
153
|
+
require 'clarify'
|
154
|
+
|
155
|
+
clarify = Clarify::Client.new(api_key: 'docs-api-key')
|
156
|
+
|
157
|
+
clarify.bundles.fetch.each do |bundle_url|
|
158
|
+
tracks_url = clarify.get(bundle_url).relation('clarify:tracks')
|
159
|
+
|
160
|
+
clarify.get(tracks_url).each do |track|
|
161
|
+
puts " - #{track['media_url']}"
|
162
|
+
end
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
Example output of bundles_show_tracks.rb:
|
167
|
+
```
|
168
|
+
- http://archive.org/download/Greatest_Speeches_of_the_20th_Century/TheFutureofWomeninFlying_64kb.mp3
|
169
|
+
- http://ia700200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/ElectionEveCampaignSpeech_64kb.mp3
|
170
|
+
- http://ia600200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/AddresstotheWomenofAmerica_64kb.mp3
|
171
|
+
- http://ia700200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/AddresstoCongress-1958_64kb.mp3
|
172
|
+
- http://ia700200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/OnBlackPower_64kb.mp3
|
173
|
+
- http://ia600200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/TheFirstAmericaninEarthOrbit_64kb.mp3
|
174
|
+
- http://ia700200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/OnReleasingtheWatergateTapes_64kb.mp3
|
175
|
+
- http://ia600200.us.archive.org/18/items/Greatest_Speeches_of_the_20th_Century/ResignationAddress-1974_64kb.mp3
|
176
|
+
```
|
177
|
+
|
149
178
|
### Create a bundle
|
150
179
|
|
151
180
|
Here you will need your own API key. Creating the bundle will return a 204,
|
data/lib/clarify/version.rb
CHANGED
@@ -111,6 +111,28 @@ Example output of bundles_list_fetch.rb:
|
|
111
111
|
<output of bundles_list_fetch.rb>
|
112
112
|
```
|
113
113
|
|
114
|
+
### Get a list of tracks and the URL of their original media
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
# bundles_show_tracks.rb
|
118
|
+
require 'clarify'
|
119
|
+
|
120
|
+
clarify = Clarify::Client.new(api_key: 'docs-api-key')
|
121
|
+
|
122
|
+
clarify.bundles.fetch.each do |bundle_url|
|
123
|
+
tracks_url = clarify.get(bundle_url).relation('clarify:tracks')
|
124
|
+
|
125
|
+
clarify.get(tracks_url).each do |track|
|
126
|
+
puts " - #{track['media_url']}"
|
127
|
+
end
|
128
|
+
end
|
129
|
+
```
|
130
|
+
|
131
|
+
Example output of bundles_show_tracks.rb:
|
132
|
+
```
|
133
|
+
<output of bundles_show_tracks.rb>
|
134
|
+
```
|
135
|
+
|
114
136
|
### Create a bundle
|
115
137
|
|
116
138
|
Here you will need your own API key. Creating the bundle will return a 204,
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'clarify'
|
2
|
+
|
3
|
+
clarify = Clarify::Client.new(api_key: 'docs-api-key')
|
4
|
+
|
5
|
+
clarify.bundles.fetch.each do |bundle_url|
|
6
|
+
tracks_url = clarify.get(bundle_url).relation('clarify:tracks')
|
7
|
+
|
8
|
+
clarify.get(tracks_url).each do |track|
|
9
|
+
puts " - #{track['media_url']}"
|
10
|
+
end
|
11
|
+
end
|
data/src_readme/readme.md.erb
CHANGED
@@ -30,6 +30,10 @@ configuration and http client setup.
|
|
30
30
|
|
31
31
|
<%= example_with_output('bundles_list_fetch.rb') %>
|
32
32
|
|
33
|
+
### Get a list of tracks and the URL of their original media
|
34
|
+
|
35
|
+
<%= example_with_output('bundles_show_tracks.rb') %>
|
36
|
+
|
33
37
|
### Create a bundle
|
34
38
|
|
35
39
|
Here you will need your own API key. Creating the bundle will return a 204,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clarify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clarify Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- src_readme/examples/bundles_list_fetch.rb
|
178
178
|
- src_readme/examples/bundles_paged_over.rb
|
179
179
|
- src_readme/examples/bundles_search.rb
|
180
|
+
- src_readme/examples/bundles_show_tracks.rb
|
180
181
|
- src_readme/examples/list_bundles.rb
|
181
182
|
- src_readme/examples/searches_paged_over.rb
|
182
183
|
- src_readme/examples/setup.rb
|
@@ -197,9 +198,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
197
198
|
version: '0'
|
198
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
200
|
requirements:
|
200
|
-
- - '
|
201
|
+
- - '>='
|
201
202
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
203
|
+
version: '0'
|
203
204
|
requirements: []
|
204
205
|
rubyforge_project:
|
205
206
|
rubygems_version: 2.4.4
|