episodic-platform 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +35 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +86 -0
- data/Rakefile +45 -0
- data/lib/episodic/platform.rb +82 -0
- data/lib/episodic/platform/analytics_methods.rb +190 -0
- data/lib/episodic/platform/base.rb +64 -0
- data/lib/episodic/platform/collection_response.rb +45 -0
- data/lib/episodic/platform/connection.rb +305 -0
- data/lib/episodic/platform/exceptions.rb +105 -0
- data/lib/episodic/platform/query_methods.rb +721 -0
- data/lib/episodic/platform/response.rb +94 -0
- data/lib/episodic/platform/write_methods.rb +446 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/fixtures/1-0.mp4 +0 -0
- data/test/fixtures/create-episode-response-s3.xml +15 -0
- data/test/fixtures/create-episode-response.xml +3 -0
- data/test/fixtures/episodes-response.xml +408 -0
- data/test/fixtures/episodes-summary-report-response.xml +4 -0
- data/test/fixtures/invalid-param-response-multiple.xml +8 -0
- data/test/fixtures/invalid-param-response-single.xml +9 -0
- data/test/fixtures/playlists-response.xml +611 -0
- data/test/fixtures/shows-response.xml +26 -0
- data/test/test_analytics_requests.rb +42 -0
- data/test/test_analytics_responses.rb +14 -0
- data/test/test_connection.rb +31 -0
- data/test/test_error_responses.rb +29 -0
- data/test/test_helper.rb +8 -0
- data/test/test_query_requests.rb +62 -0
- data/test/test_query_responses.rb +165 -0
- data/test/test_write_requests.rb +56 -0
- data/test/test_write_responses.rb +24 -0
- metadata +135 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/test_helper.rb'
|
2
|
+
|
3
|
+
class TestWriteResponses < Test::Unit::TestCase #:nodoc:
|
4
|
+
|
5
|
+
def test_create_episode_response_s3
|
6
|
+
response_xml = File.open(File.dirname(__FILE__) + "/fixtures/create-episode-response-s3.xml") {|f|f.read}
|
7
|
+
|
8
|
+
response = ::Episodic::Platform::CreateEpisodeResponse.new(Episodic::Platform::HTTPResponse.new(200, response_xml))
|
9
|
+
|
10
|
+
assert_equal "p3h7kldgjg1t", response.episode_id
|
11
|
+
assert_equal "1-0.mp4", response.uploads.first.filename
|
12
|
+
assert_equal "http://randy.dev.assets.episodic.com.s3.amazonaws.com/", response.uploads.first.url
|
13
|
+
assert 5, response.uploads.first.params.length
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_create_episode_response
|
17
|
+
response_xml = File.open(File.dirname(__FILE__) + "/fixtures/create-episode-response.xml") {|f|f.read}
|
18
|
+
|
19
|
+
response = ::Episodic::Platform::CreateEpisodeResponse.new(Episodic::Platform::HTTPResponse.new(200, response_xml))
|
20
|
+
|
21
|
+
assert_equal "p3h7kldgjg1t", response.episode_id
|
22
|
+
assert_equal 0, response.uploads.length
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: episodic-platform
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "0.9"
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Randy Simon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-03-03 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rubyforge
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.0.3
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: gemcutter
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.3.0
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: hoe
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.5.0
|
44
|
+
version:
|
45
|
+
description: |-
|
46
|
+
Ruby client library for Episodic's Platform REST API
|
47
|
+
|
48
|
+
For more information about Episodic's Platform API see {http://app.episodic.com/help/server_api}[http://app.episodic.com/help/server_api]
|
49
|
+
|
50
|
+
Rdocs are located at {http://episodic.github.com/episodic-platform-ruby/doc/index.html}[http://episodic.github.com/episodic-platform-ruby/doc/index.html]
|
51
|
+
email:
|
52
|
+
- support@episodic.com
|
53
|
+
executables: []
|
54
|
+
|
55
|
+
extensions: []
|
56
|
+
|
57
|
+
extra_rdoc_files:
|
58
|
+
- History.txt
|
59
|
+
- Manifest.txt
|
60
|
+
- PostInstall.txt
|
61
|
+
files:
|
62
|
+
- History.txt
|
63
|
+
- Manifest.txt
|
64
|
+
- PostInstall.txt
|
65
|
+
- README.rdoc
|
66
|
+
- Rakefile
|
67
|
+
- lib/episodic/platform.rb
|
68
|
+
- lib/episodic/platform/analytics_methods.rb
|
69
|
+
- lib/episodic/platform/base.rb
|
70
|
+
- lib/episodic/platform/collection_response.rb
|
71
|
+
- lib/episodic/platform/connection.rb
|
72
|
+
- lib/episodic/platform/exceptions.rb
|
73
|
+
- lib/episodic/platform/query_methods.rb
|
74
|
+
- lib/episodic/platform/response.rb
|
75
|
+
- lib/episodic/platform/write_methods.rb
|
76
|
+
- script/console
|
77
|
+
- script/destroy
|
78
|
+
- script/generate
|
79
|
+
- test/fixtures/1-0.mp4
|
80
|
+
- test/fixtures/create-episode-response-s3.xml
|
81
|
+
- test/fixtures/create-episode-response.xml
|
82
|
+
- test/fixtures/episodes-response.xml
|
83
|
+
- test/fixtures/episodes-summary-report-response.xml
|
84
|
+
- test/fixtures/invalid-param-response-multiple.xml
|
85
|
+
- test/fixtures/invalid-param-response-single.xml
|
86
|
+
- test/fixtures/playlists-response.xml
|
87
|
+
- test/fixtures/shows-response.xml
|
88
|
+
- test/test_analytics_requests.rb
|
89
|
+
- test/test_analytics_responses.rb
|
90
|
+
- test/test_connection.rb
|
91
|
+
- test/test_error_responses.rb
|
92
|
+
- test/test_helper.rb
|
93
|
+
- test/test_query_requests.rb
|
94
|
+
- test/test_query_responses.rb
|
95
|
+
- test/test_write_requests.rb
|
96
|
+
- test/test_write_responses.rb
|
97
|
+
has_rdoc: true
|
98
|
+
homepage: http://github.com/episodic/episodic-platform-ruby
|
99
|
+
licenses: []
|
100
|
+
|
101
|
+
post_install_message: PostInstall.txt
|
102
|
+
rdoc_options:
|
103
|
+
- --main
|
104
|
+
- README.rdoc
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: "0"
|
112
|
+
version:
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: "0"
|
118
|
+
version:
|
119
|
+
requirements: []
|
120
|
+
|
121
|
+
rubyforge_project: episodic-platform
|
122
|
+
rubygems_version: 1.3.5
|
123
|
+
signing_key:
|
124
|
+
specification_version: 3
|
125
|
+
summary: Ruby client library for Episodic's Platform REST API For more information about Episodic's Platform API see {http://app.episodic.com/help/server_api}[http://app.episodic.com/help/server_api] Rdocs are located at {http://episodic.github.com/episodic-platform-ruby/doc/index.html}[http://episodic.github.com/episodic-platform-ruby/doc/index.html]
|
126
|
+
test_files:
|
127
|
+
- test/test_analytics_requests.rb
|
128
|
+
- test/test_analytics_responses.rb
|
129
|
+
- test/test_connection.rb
|
130
|
+
- test/test_error_responses.rb
|
131
|
+
- test/test_helper.rb
|
132
|
+
- test/test_query_requests.rb
|
133
|
+
- test/test_query_responses.rb
|
134
|
+
- test/test_write_requests.rb
|
135
|
+
- test/test_write_responses.rb
|