active_public_resources 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rspec +1 -0
- data/.travis.yml +3 -0
- data/Gemfile +24 -0
- data/Guardfile +9 -0
- data/LICENSE.txt +18 -0
- data/README.md +326 -0
- data/Rakefile +7 -0
- data/active_public_resources.gemspec +27 -0
- data/active_public_resources_config.yml.example +10 -0
- data/lib/active_public_resources/base_response_type.rb +11 -0
- data/lib/active_public_resources/base_return_type.rb +17 -0
- data/lib/active_public_resources/client.rb +22 -0
- data/lib/active_public_resources/driver.rb +21 -0
- data/lib/active_public_resources/driver_response.rb +15 -0
- data/lib/active_public_resources/drivers/khan_academy.rb +143 -0
- data/lib/active_public_resources/drivers/quizlet.rb +92 -0
- data/lib/active_public_resources/drivers/schooltube.rb +99 -0
- data/lib/active_public_resources/drivers/vimeo.rb +181 -0
- data/lib/active_public_resources/drivers/youtube.rb +113 -0
- data/lib/active_public_resources/request_criteria.rb +51 -0
- data/lib/active_public_resources/response_types/exercise.rb +11 -0
- data/lib/active_public_resources/response_types/folder.rb +18 -0
- data/lib/active_public_resources/response_types/image.rb +11 -0
- data/lib/active_public_resources/response_types/quiz.rb +11 -0
- data/lib/active_public_resources/response_types/video.rb +12 -0
- data/lib/active_public_resources/return_types/file.rb +11 -0
- data/lib/active_public_resources/return_types/iframe.rb +11 -0
- data/lib/active_public_resources/return_types/image_url.rb +11 -0
- data/lib/active_public_resources/return_types/oembed.rb +11 -0
- data/lib/active_public_resources/return_types/url.rb +11 -0
- data/lib/active_public_resources/version.rb +3 -0
- data/lib/active_public_resources.rb +55 -0
- data/spec/lib/active_public_resources/client_spec.rb +75 -0
- data/spec/lib/active_public_resources/driver_spec.rb +48 -0
- data/spec/lib/active_public_resources/drivers/khan_academy_spec.rb +106 -0
- data/spec/lib/active_public_resources/drivers/quizlet_spec.rb +50 -0
- data/spec/lib/active_public_resources/drivers/schooltube_spec.rb +50 -0
- data/spec/lib/active_public_resources/drivers/vimeo_spec.rb +71 -0
- data/spec/lib/active_public_resources/drivers/youtube_spec.rb +52 -0
- data/spec/lib/active_public_resources/live_client_spec.rb +91 -0
- data/spec/lib/active_public_resources/request_criteria_spec.rb +53 -0
- data/spec/spec_helper.rb +46 -0
- data/spec/vcr/active_public_resources/client/khan_academy_should_traverse_folders.yml +1039 -0
- data/spec/vcr/active_public_resources/client/quizlet_should_perform_request.yml +70 -0
- data/spec/vcr/active_public_resources/client/shooltube_should_perform_request.yml +815 -0
- data/spec/vcr/active_public_resources/client/vimeo_should_perform_request.yml +70 -0
- data/spec/vcr/active_public_resources/client/youtube_should_perform_request.yml +212 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_driver_perform_request/should_get_folder_cs/programming.yml +117 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_driver_perform_request/should_get_folder_cs.yml +72 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_driver_perform_request/should_get_folder_science/mcat/society_and_culture/social_structures.yml +578 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_driver_perform_request/should_get_root_folders.yml +122 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_perform_request/should_get_folder_cs/programming.yml +120 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_perform_request/should_get_folder_cs.yml +73 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_perform_request/should_get_folder_science/mcat/society_and_culture/social_structures.yml +577 -0
- data/spec/vcr/active_public_resources/drivers/khan_academy_perform_request/should_get_root_folders.yml +119 -0
- data/spec/vcr/active_public_resources/drivers/quizlet_driver_perform_request/should_perform_request.yml +75 -0
- data/spec/vcr/active_public_resources/drivers/quizlet_perform_request/should_perform_request.yml +72 -0
- data/spec/vcr/active_public_resources/drivers/schooltube_driver_perform_request/should_perform_request.yml +815 -0
- data/spec/vcr/active_public_resources/drivers/schooltube_perform_request/should_perform_request.yml +810 -0
- data/spec/vcr/active_public_resources/drivers/vimeo_driver_perform_request/should_perform_request.yml +279 -0
- data/spec/vcr/active_public_resources/drivers/vimeo_perform_request/should_perform_request.yml +70 -0
- data/spec/vcr/active_public_resources/drivers/youtube_driver_perform_request/should_perform_request.yml +212 -0
- data/spec/vcr/active_public_resources/drivers/youtube_perform_request/should_perform_request.yml +209 -0
- metadata +182 -0
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.khanacademy.org/api/v1/topic/programming
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- www.khanacademy.org
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- '*'
|
27
|
+
Access-Control-Allow-Credentials:
|
28
|
+
- 'true'
|
29
|
+
X-Ka-Api-Response:
|
30
|
+
- 'true'
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
Set-Cookie:
|
34
|
+
- gae_b_id=X2dhZV9iaW5nb19yYW5kb206UHNCaVBZMXVjekVNVjVuRW5fQmZVbUp4UDZ5bXZlc0ZPdUlWbi0wOQ==;
|
35
|
+
expires=Fri, 21 Nov 2014 17:45:32 GMT; Max-Age=31536000; Path=/
|
36
|
+
Vary:
|
37
|
+
- Accept-Encoding
|
38
|
+
Date:
|
39
|
+
- Thu, 21 Nov 2013 17:45:32 GMT
|
40
|
+
Server:
|
41
|
+
- Google Frontend
|
42
|
+
Expires:
|
43
|
+
- Thu, 21 Nov 2013 17:45:32 GMT
|
44
|
+
Transfer-Encoding:
|
45
|
+
- chunked
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"icon_src": "", "domain_slug": null, "relative_url": "/cs/programming",
|
49
|
+
"web_url": "", "ka_url": "http://www.khanacademy.org/cs/programming", "translated_standalone_title":
|
50
|
+
"Drawing and animation programming", "translated_title": "Drawing and animation",
|
51
|
+
"gplus_url": "", "id": "x05187c3c", "old_key_name": null, "hide": false, "title":
|
52
|
+
"Drawing and animation", "child_data": [{"kind": "Topic", "id": "x8edeb601"},
|
53
|
+
{"kind": "Topic", "id": "xf53d7aa7"}, {"kind": "Topic", "id": "x8686923b"},
|
54
|
+
{"kind": "Topic", "id": "x3312fbc8"}, {"kind": "Topic", "id": "xb0180d93"},
|
55
|
+
{"kind": "Topic", "id": "xc4ab8747"}, {"kind": "Topic", "id": "x7323ca45"},
|
56
|
+
{"kind": "Topic", "id": "x2f8e35eb"}, {"kind": "Topic", "id": "x54f8c602"},
|
57
|
+
{"kind": "Topic", "id": "x611e8e74"}, {"kind": "Topic", "id": "x8d3377f2"}],
|
58
|
+
"children": [{"kind": "Topic", "hide": false, "internal_id": "x8edeb601",
|
59
|
+
"title": "Intro to programming", "url": "http://www.khanacademy.org/cs/programming/intro-to-programming",
|
60
|
+
"node_slug": "intro-to-programming", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg4ZWRlYjYwMQw",
|
61
|
+
"translated_title": "Intro to programming", "id": "intro-to-programming"},
|
62
|
+
{"kind": "Topic", "hide": false, "internal_id": "xf53d7aa7", "title": "Drawing
|
63
|
+
basics", "url": "http://www.khanacademy.org/cs/programming/drawing-basics",
|
64
|
+
"node_slug": "drawing-basics", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXhmNTNkN2FhNww",
|
65
|
+
"translated_title": "Drawing basics", "id": "drawing-basics"}, {"kind": "Topic",
|
66
|
+
"hide": false, "internal_id": "x8686923b", "title": "Variables", "url": "http://www.khanacademy.org/cs/programming/variables",
|
67
|
+
"node_slug": "variables", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg4Njg2OTIzYgw",
|
68
|
+
"translated_title": "Variables", "id": "variables"}, {"kind": "Topic", "hide":
|
69
|
+
false, "internal_id": "x3312fbc8", "title": "Animation basics", "url": "http://www.khanacademy.org/cs/programming/animation-basics",
|
70
|
+
"node_slug": "animation-basics", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXgzMzEyZmJjOAw",
|
71
|
+
"translated_title": "Animation basics", "id": "animation-basics"}, {"kind":
|
72
|
+
"Topic", "hide": false, "internal_id": "xb0180d93", "title": "Text", "url":
|
73
|
+
"http://www.khanacademy.org/cs/programming/text-basics", "node_slug": "text-basics",
|
74
|
+
"edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXhiMDE4MGQ5Mww",
|
75
|
+
"translated_title": "Text", "id": "text-basics"}, {"kind": "Topic", "hide":
|
76
|
+
false, "internal_id": "xc4ab8747", "title": "Functions", "url": "http://www.khanacademy.org/cs/programming/functions",
|
77
|
+
"node_slug": "functions", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXhjNGFiODc0Nww",
|
78
|
+
"translated_title": "Functions", "id": "functions"}, {"kind": "Topic", "hide":
|
79
|
+
false, "internal_id": "x7323ca45", "title": "Logic and if Statements", "url":
|
80
|
+
"http://www.khanacademy.org/cs/programming/logic-if-statements", "node_slug":
|
81
|
+
"logic-if-statements", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg3MzIzY2E0NQw",
|
82
|
+
"translated_title": "Logic and if Statements", "id": "logic-if-statements"},
|
83
|
+
{"kind": "Topic", "hide": false, "internal_id": "x2f8e35eb", "title": "Looping",
|
84
|
+
"url": "http://www.khanacademy.org/cs/programming/looping", "node_slug": "looping",
|
85
|
+
"edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXgyZjhlMzVlYgw",
|
86
|
+
"translated_title": "Looping", "id": "looping"}, {"kind": "Topic", "hide":
|
87
|
+
false, "internal_id": "x54f8c602", "title": "Arrays", "url": "http://www.khanacademy.org/cs/programming/arrays",
|
88
|
+
"node_slug": "arrays", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg1NGY4YzYwMgw",
|
89
|
+
"translated_title": "Arrays", "id": "arrays"}, {"kind": "Topic", "hide": false,
|
90
|
+
"internal_id": "x611e8e74", "title": "Objects", "url": "http://www.khanacademy.org/cs/programming/objects",
|
91
|
+
"node_slug": "objects", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg2MTFlOGU3NAw",
|
92
|
+
"translated_title": "Objects", "id": "objects"}, {"kind": "Topic", "hide":
|
93
|
+
false, "internal_id": "x8d3377f2", "title": "Becoming a better programmer",
|
94
|
+
"url": "http://www.khanacademy.org/cs/programming/good-practices", "node_slug":
|
95
|
+
"good-practices", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXg4ZDMzNzdmMgw",
|
96
|
+
"translated_title": "Becoming a better programmer", "id": "good-practices"}],
|
97
|
+
"twitter_url": "", "translated_description": "Programming is how we tell computers
|
98
|
+
what we want them to do, like to build iPhone apps, video games, or websites
|
99
|
+
like this one. At Khan Academy, you can use our programming environment to
|
100
|
+
build graphics, animations, and interactive visualizations. If you''ve never
|
101
|
+
programmed before, follow these tutorials to learn how!", "deleted_mod_time":
|
102
|
+
"2013-07-21T23:11:33Z", "logo_image_url": "", "in_knowledge_map": false, "description":
|
103
|
+
"Programming is how we tell computers what we want them to do, like to build
|
104
|
+
iPhone apps, video games, or websites like this one. At Khan Academy, you
|
105
|
+
can use our programming environment to build graphics, animations, and interactive
|
106
|
+
visualizations. If you''ve never programmed before, follow these tutorials
|
107
|
+
to learn how!", "x_pos": 0.0, "node_slug": "programming", "deleted": false,
|
108
|
+
"facebook_url": "", "backup_timestamp": "2013-09-24T00:32:46Z", "render_type":
|
109
|
+
"Topic", "background_image_url": "", "background_image_caption": "", "assessment_progress_key":
|
110
|
+
"ax05187c3c", "topic_page_url": "/cs/programming", "extended_slug": "cs/programming",
|
111
|
+
"slug": "programming", "tags": [], "kind": "Topic", "in_topic_browser": true,
|
112
|
+
"sha": "393b92cf5cc13812929d825fda2852edab10b388", "standalone_title": "Drawing
|
113
|
+
and animation programming", "y_pos": 0.0, "current_revision_key": "393b92cf5cc13812929d825fda2852edab10b388",
|
114
|
+
"content_kind": "Topic"}'
|
115
|
+
http_version:
|
116
|
+
recorded_at: Thu, 21 Nov 2013 17:45:32 GMT
|
117
|
+
recorded_with: VCR 2.6.0
|
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.khanacademy.org/api/v1/topic/cs
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
Host:
|
17
|
+
- www.khanacademy.org
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- '*'
|
27
|
+
Access-Control-Allow-Credentials:
|
28
|
+
- 'true'
|
29
|
+
X-Ka-Api-Response:
|
30
|
+
- 'true'
|
31
|
+
Cache-Control:
|
32
|
+
- no-cache
|
33
|
+
Set-Cookie:
|
34
|
+
- gae_b_id=X2dhZV9iaW5nb19yYW5kb206b2k3eVhrMmVKZmRXUVRBanRUS0p1QzJkM1FObkZsN1V1dHJydTVhbw==;
|
35
|
+
expires=Fri, 21 Nov 2014 17:45:32 GMT; Max-Age=31536000; Path=/
|
36
|
+
Vary:
|
37
|
+
- Accept-Encoding
|
38
|
+
Date:
|
39
|
+
- Thu, 21 Nov 2013 17:45:32 GMT
|
40
|
+
Server:
|
41
|
+
- Google Frontend
|
42
|
+
Expires:
|
43
|
+
- Thu, 21 Nov 2013 17:45:32 GMT
|
44
|
+
Transfer-Encoding:
|
45
|
+
- chunked
|
46
|
+
body:
|
47
|
+
encoding: UTF-8
|
48
|
+
string: '{"icon_src": "", "domain_slug": null, "relative_url": "/cs", "web_url":
|
49
|
+
"", "ka_url": "http://www.khanacademy.org/cs", "translated_standalone_title":
|
50
|
+
"Computer programming", "translated_title": "Computer programming", "gplus_url":
|
51
|
+
"", "id": "xffde7c31", "old_key_name": null, "hide": false, "title": "Computer
|
52
|
+
programming", "child_data": [{"kind": "Topic", "id": "x05187c3c"}], "children":
|
53
|
+
[{"kind": "Topic", "hide": false, "internal_id": "x05187c3c", "title": "Drawing
|
54
|
+
and animation", "url": "http://www.khanacademy.org/cs/programming", "node_slug":
|
55
|
+
"programming", "edit_slug": "", "key": "ag5zfmtoYW4tYWNhZGVteXIUCxIFVG9waWMiCXgwNTE4N2MzYww",
|
56
|
+
"translated_title": "Drawing and animation", "id": "programming"}], "twitter_url":
|
57
|
+
"", "translated_description": "Learn the fundamentals of programming on the
|
58
|
+
Khan Academy Computer Science platform. Explore programs made by others. Write
|
59
|
+
your own programs and share them!", "deleted_mod_time": "2013-07-21T23:11:34Z",
|
60
|
+
"logo_image_url": "", "in_knowledge_map": false, "description": "Learn the
|
61
|
+
fundamentals of programming on the Khan Academy Computer Science platform.
|
62
|
+
Explore programs made by others. Write your own programs and share them!",
|
63
|
+
"x_pos": 0.0, "node_slug": "cs", "deleted": false, "facebook_url": "", "backup_timestamp":
|
64
|
+
"2013-09-06T16:25:14Z", "render_type": "Subject", "background_image_url":
|
65
|
+
"", "background_image_caption": "", "assessment_progress_key": "axffde7c31",
|
66
|
+
"topic_page_url": "/cs", "extended_slug": "cs", "slug": "cs", "tags": [],
|
67
|
+
"kind": "Topic", "in_topic_browser": true, "sha": "fca71d1c1fbc9dc5f6c1a9c4daed4472063c8ece",
|
68
|
+
"standalone_title": "Computer programming", "y_pos": 0.0, "current_revision_key":
|
69
|
+
"fca71d1c1fbc9dc5f6c1a9c4daed4472063c8ece", "content_kind": "Topic"}'
|
70
|
+
http_version:
|
71
|
+
recorded_at: Thu, 21 Nov 2013 17:45:32 GMT
|
72
|
+
recorded_with: VCR 2.6.0
|