ann_wrapper 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +3 -0
- data/README.md +81 -31
- data/ann_wrapper.gemspec +1 -1
- data/lib/ann_wrapper.rb +47 -14
- data/lib/ann_wrapper/ann.rb +44 -0
- data/lib/ann_wrapper/ann_anime.rb +85 -0
- data/lib/ann_wrapper/ann_manga.rb +63 -0
- data/lib/ann_wrapper/ann_media.rb +67 -0
- data/lib/ann_wrapper/ann_report.rb +26 -0
- data/lib/ann_wrapper/version.rb +1 -1
- data/spec/ann_anime_spec.rb +64 -94
- data/spec/ann_manga_spec.rb +109 -0
- data/spec/ann_report_spec.rb +62 -0
- data/spec/ann_wrapper_spec.rb +128 -14
- data/spec/spec_helper.rb +8 -1
- data/spec/support/fake_ann.rb +17 -1
- data/spec/support/fixtures/anime_batch.xml +884 -0
- data/spec/support/fixtures/anime_batch_with_invalid.xml +248 -0
- data/spec/support/fixtures/invalid_warning.xml +3 -0
- data/spec/support/fixtures/list_report.xml +47 -0
- data/spec/support/fixtures/manga_batch.xml +92 -0
- data/spec/support/fixtures/manga_batch_with_invalid.xml +55 -0
- data/spec/support/fixtures/steins_gate.xml +34 -12
- data/spec/support/fixtures/tokyo_ghoul.xml +60 -0
- metadata +27 -5
- data/lib/ann_wrapper/ann_objects.rb +0 -217
@@ -1,8 +1,11 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
<info gid="
|
1
|
+
|
2
|
+
<ann><anime id="11770" gid="3907583141" type="TV" name="Steins;Gate" precision="TV" generated-on="2014-12-24T09:02:08Z">
|
3
|
+
<info gid="1864351140" type="Picture" src="http://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A11770-1864351140.1370764886.jpg" width="200" height="125"><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-fit200x200/encyc/A11770-1864351140.1370764886.jpg" width="200" height="125"/><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-max500x600/encyc/A11770-1864351140.1370764886.jpg" width="500" height="312"/><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-full/encyc/A11770-1864351140.1370764886.jpg" width="900" height="562"/></info>
|
4
|
+
<info gid="2893564300" type="Picture" src="http://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A11770-8.jpg" width="200" height="200"><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-fit200x200/encyc/A11770-8.jpg" width="200" height="200"/><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-max500x600/encyc/A11770-8.jpg" width="317" height="317"/></info>
|
4
5
|
<info gid="1370260427" type="Main title" lang="JA">Steins;Gate</info>
|
5
6
|
<info gid="2774671084" type="Alternative title" lang="PT">Steins-Gate e a Teoria do Caos</info>
|
7
|
+
<info gid="2051310872" type="Alternative title" lang="RU">Врата Штейна</info>
|
8
|
+
<info gid="990136510" type="Alternative title" lang="AR">ستاينز؛غيت</info>
|
6
9
|
<info gid="2578893998" type="Alternative title" lang="JA">シュタインズ・ゲート</info>
|
7
10
|
<info gid="1665915370" type="Alternative title" lang="ZH-TW">命運石之門</info>
|
8
11
|
<info gid="1694538789" type="Alternative title" lang="KO">슈타인즈 게이트</info>
|
@@ -18,20 +21,23 @@
|
|
18
21
|
<info gid="470020657" type="Themes">conspiracy</info>
|
19
22
|
<info gid="2931273993" type="Themes">technology</info>
|
20
23
|
<info gid="3676887126" type="Themes">Time travel</info>
|
24
|
+
<info gid="1283244007" type="Themes">tragedy</info>
|
21
25
|
<info gid="2673674224" type="Objectionable content">TA</info>
|
22
|
-
<info gid="
|
26
|
+
<info gid="2376613060" type="Plot Summary">Rintaro Okabe is a self-proclaimed "mad scientist" who believes that an international organization is conspiring to reshape the world according to its own interests. He and his friend Itaru Hashida inadvertently create a gadget able to send messages to the past. The discovery and experimentation of this instrument become the catalyst of fundamental alterations to the present. Oblivious of the consequences of their actions, Rintaro and his friends end up creating modifications of grievous proportions. He must then try to find a way to return as close as possible to the original timeline in order to save his precious lab members.</info>
|
27
|
+
<info gid="1679735241" type="Plot Summary">Rintaro Okabe is a self-proclaimed "mad scientist" who believes that an international scientific organization named SERN is conspiring to reshape the world according to its own interests. He and his friend Itaru Hashida inadvertently create a gadget able to send messages to the past. The discovery and experimentation of this instrument become the catalyst of fundamental alterations to the present. Okabe is the only one aware of these changes because he possesses a Reading Steiner, the ability to retain the memories from previous experienced timelines. Oblivious of the consequences of their actions, Rintaro and his friends end up creating modifications of grievous proportions. He must then try to find a way to return as close as possible to the original timeline in order to save his precious lab partners.</info>
|
23
28
|
<info gid="1746069252" type="Running time">half hour</info>
|
24
29
|
<info gid="2268120855" type="Number of episodes">24</info>
|
25
30
|
<info gid="1580057252" type="Vintage">2011-04-03 (Advanced screening)</info>
|
26
31
|
<info gid="978621226" type="Vintage">2011-04-05 to 2011-09-13</info>
|
27
|
-
<info gid="1764714377" type="Opening Theme"
|
28
|
-
<info gid="1778834947" type="Ending Theme"
|
29
|
-
<info gid="2878363404" type="Ending Theme">#2:
|
30
|
-
<info gid="2705161280" type="Ending Theme">#3:
|
31
|
-
<info gid="830513243" type="Insert song"
|
32
|
-
<info gid="3815310299" type="Insert song"
|
32
|
+
<info gid="1764714377" type="Opening Theme">"Hacking to the Gate" by Kanako Ito</info>
|
33
|
+
<info gid="1778834947" type="Ending Theme">"Tokitsukasadoru Jūni no Meiyaku" (刻司ル十二ノ盟約) by Yui Sakakibara</info>
|
34
|
+
<info gid="2878363404" type="Ending Theme">#2: "Sukai Kuraddo no Kansokusha" (スカイクラッドの観測者) by Kanako Ito (ep 23)</info>
|
35
|
+
<info gid="2705161280" type="Ending Theme">#3: "Another Heaven" by Kanako Itou (ep 24)</info>
|
36
|
+
<info gid="830513243" type="Insert song">"My White Ribbon" by Afilia Saga East (ep 9)</info>
|
37
|
+
<info gid="3815310299" type="Insert song">"Watashi ☆LOVE na☆ Otome!" (ワタシ☆LOVEな☆オトメ!) by Afilia Saga East (eps 2,9)</info>
|
33
38
|
<info gid="1555341449" type="Official website" lang="JA" href="http://steinsgate.jp/">想定科学ADV『STEINS;GATE(シュタインズゲート)』公式Webサイト</info>
|
34
39
|
<info gid="2038747414" type="Official website" lang="JA" href="http://steinsgate.tv/">TVアニメ「STEINS;GATE」公式サイト</info>
|
40
|
+
<ratings nb_votes="3788" weighted_score="9.1129" bayesian_score="9.1075"/>
|
35
41
|
<episode num="1">
|
36
42
|
<title gid="3773691252" lang="EN">Prologue of the Beginning and End</title></episode>
|
37
43
|
<episode num="2">
|
@@ -87,11 +93,13 @@
|
|
87
93
|
<review href="http://www.animenewsnetwork.com/review/steins-gate/episodes-1">Steins;Gate Episodes 1-24 Streaming</review>
|
88
94
|
<release date="2013-07-15" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=24296">Steins;Gate - Part 1 (Blu-Ray)</release>
|
89
95
|
<release date="2013-09-30" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=24299">Steins;Gate - Part 2 (Blu-Ray)</release>
|
96
|
+
<release date="2014-09-30" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=26659">Steins;Gate - Complete Series [Anime Classics] (BD+DVD)</release>
|
90
97
|
<release date="2012-09-25" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=24847">Steins;Gate - Complete Series Part One (BD+DVD 1)</release>
|
91
98
|
<release date="2012-09-25" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=21325">Steins;Gate - Complete Series Part One [Limited Edition] (BD+DVD 1)</release>
|
92
99
|
<release date="2012-12-18" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=22023">Steins;Gate - Complete Series Part Two (BD+DVD 2)</release>
|
93
100
|
<release date="2013-07-15" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=24297">Steins;Gate - Part 1 (DVD)</release>
|
94
101
|
<release date="2013-09-30" href="http://www.animenewsnetwork.com/encyclopedia/releases.php?id=24298">Steins;Gate - Part 2 (DVD)</release>
|
102
|
+
<news datetime="2010-07-25T05:29:47Z" href="http://www.animenewsnetwork.com/news/2010-07-25/steins-gate-game-gets-tv-anime"><cite>Steins;Gate</cite> Game Gets TV Anime</news>
|
95
103
|
<news datetime="2011-03-11T11:33:53Z" href="http://www.animenewsnetwork.com/news/2011-03-11/anime/manga/game-events-cancelled-after-march-11-quake">Anime/Manga/Game Events Cancelled After March 11 Quake</news>
|
96
104
|
<news datetime="2011-04-04T16:34:32Z" href="http://www.animenewsnetwork.com/news/2011-04-04/crunchyroll-to-simulcast-steins-gate-tv-anime">Crunchyroll to Simulcast <cite>Steins;Gate</cite> TV Anime</news>
|
97
105
|
<news datetime="2011-04-08T13:27:02Z" href="http://www.animenewsnetwork.com/news/2011-04-08/anime-on-demand-announces-next-three-simulcasts">Anime on Demand Announces Next Three Simulcasts</news>
|
@@ -140,9 +148,22 @@
|
|
140
148
|
<news datetime="2013-08-13T03:19:19Z" href="http://www.animenewsnetwork.com/news/2013-08-12/rozen-maiden-game-slated-for-november"><cite>Rozen Maiden</cite> Game Slated for November</news>
|
141
149
|
<news datetime="2013-10-07T01:00:00Z" href="http://www.animenewsnetwork.com/news/2013-10-06/mamoru-miyano-to-sing-2nd-wooser-hand-to-mouth-life-season-theme">Mamoru Miyano to Sing 2nd <cite>Wooser's Hand-to-Mouth Life</cite> Season's Theme</news>
|
142
150
|
<news datetime="2013-10-05T14:42:07Z" href="http://www.animenewsnetwork.com/news/2013-10-05/leeds-anime-day-line-up-confimed">Leeds Anime Day Line Up Confimed</news>
|
151
|
+
<news datetime="2013-10-17T04:30:00Z" href="http://www.animenewsnetwork.com/news/2013-10-17/steins-gate-stage-play-presented-in-digest-video"><cite>Steins;Gate</cite> Stage Play Presented in Digest Video</news>
|
152
|
+
<news datetime="2013-10-18T05:40:00Z" href="http://www.animenewsnetwork.com/news/2013-10-18/steins-gate-white-fox-makes-anime-short-for-space-satellite"><cite>Steins;Gate's</cite> White Fox Makes Anime Short for Space Satellite</news>
|
143
153
|
<news datetime="2013-11-07T10:09:49Z" href="http://www.animenewsnetwork.com/news/2013-11-07/leeds-anime-day-november-17">Leeds Anime Day November 17</news>
|
144
154
|
<news datetime="2013-11-19T11:55:32Z" href="http://www.animenewsnetwork.com/news/2013-11-19/steins-gate-film-2nd-dvd/bd-promo-tv-ad-streamed"><cite>Steins;Gate</cite> Film's 2nd DVD/BD Promo, TV Ad Streamed</news>
|
145
155
|
<news datetime="2014-01-15T04:52:08Z" href="http://www.animenewsnetwork.com/news/2014-01-14/jast-usa-delays-steins-gate-pc-game-until-march-31">JAST USA Delays <i>Steins;Gate</i> PC Game Until March 31</news>
|
156
|
+
<news datetime="2014-02-14T10:50:00Z" href="http://www.animenewsnetwork.com/news/2014-02-14/blade-and-soul-fantasy-tv-anime-1st-promo-streamed"><cite>Blade & Soul</cite> Fantasy TV Anime's 1st Promo Streamed</news>
|
157
|
+
<news datetime="2014-02-22T04:55:05Z" href="http://www.animenewsnetwork.com/news/2014-02-21/steins-gate-spinoff-linked-to-tv-anime-song-announcement"><cite>Steins;Gate</cite> Spinoff Linked to TV Anime Song Announcement</news>
|
158
|
+
<news datetime="2014-04-21T03:00:00Z" href="http://www.animenewsnetwork.com/news/2014-04-20/steins-gate/mugen-enten-no-arc-light-drama-cd-gets-manga"><cite>Steins;Gate: Mugen Enten no Arc Light</cite> Drama CD Gets Manga</news>
|
159
|
+
<news datetime="2014-06-20T14:45:00Z" href="http://www.animenewsnetwork.com:/news/2014-06-21/new-steins-gate-novel-tells-what-happens-6-years-after-game/.75771">New <cite>Steins;Gate</cite> Novel Tells What Happens 6 Years After Game</news>
|
160
|
+
<news datetime="2014-06-30T00:06:44Z" href="http://www.animenewsnetwork.com:/news/2014-06-30/one-piece-strong-world-and-we-without-wings-released-monday/.76116"><i>One Piece: Strong World</i> and <i>We Without Wings</i> Released Monday</news>
|
161
|
+
<news datetime="2014-08-04T08:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-08-04/free-anime-in-australia-3-aug-10-aug/.77279">Free Anime in Australia: 3/Aug - 10/Aug</news>
|
162
|
+
<news datetime="2014-08-11T08:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-08-11/free-anime-in-australia-11-aug-17-aug/.77517">Free Anime in Australia: 11/Aug - 17/Aug</news>
|
163
|
+
<news datetime="2014-09-30T22:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-30/north-american-anime-manga-releases-september-28-october-4/.79362">North American Anime, Manga Releases, September 28-October 4</news>
|
164
|
+
<news datetime="2014-10-15T10:58:27Z" href="http://www.animenewsnetwork.com:/news/2014-10-15/new-steins-gate-anime-shorts-promote-ibm-next-generation-computing/.79939">New <cite>Steins;Gate</cite> Anime Shorts Promote IBM's Next-Generation Computing</news>
|
165
|
+
<news datetime="2014-10-18T03:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-17/1st-steins-gate-ibm-short-streamed-with-english-subtitles/.80065">1st <cite>Steins;Gate</cite> IBM Short Streamed with English Subtitles</news>
|
166
|
+
<news datetime="2014-12-22T18:20:00Z" href="http://www.animenewsnetwork.com:/news/2014-12-22/steins-gate-the-committee-of-antimatter-novel-cancelled/.82516"><cite>Steins;Gate -The Committee of Antimatter-</cite> Novel Cancelled</news>
|
146
167
|
<staff gid="1755272986"><task>Director</task><person id="593">Takuya Satō</person></staff>
|
147
168
|
<staff gid="1176923263"><task>Director</task><person id="9693">Hiroshi Hamasaki</person></staff>
|
148
169
|
<staff gid="760045321"><task>Director</task><person id="35713">Tomoki Kobayashi</person></staff>
|
@@ -208,14 +229,15 @@
|
|
208
229
|
<staff gid="2438292488"><task>Producer</task><person id="51941">Takayuki Matsunaga</person></staff>
|
209
230
|
<staff gid="3552431102"><task>Producer</task><person id="77911">Kenjirou Gomi</person></staff>
|
210
231
|
<staff gid="2172519109"><task>Producer</task><person id="98396">Yoshinao Doi</person></staff>
|
211
|
-
<cast gid="
|
232
|
+
<cast gid="3723438079" lang="DE"><role>Rintarō Okabe</role><person id="110469">Peter Lehn</person></cast>
|
233
|
+
<cast gid="2966385551" lang="EN"><role>Yugo "Braun" Tennoji</role><person id="1386">Christopher R. Sabat</person></cast>
|
212
234
|
<cast gid="2855120078" lang="EN"><role>Nae Tennoji</role><person id="31220">Brina Palencia</person></cast>
|
213
235
|
<cast gid="1885084205" lang="EN"><role>Kurisu Makise</role><person id="58419">Trina Nishimura</person></cast>
|
214
236
|
<cast gid="2604384678" lang="EN"><role>Suzuha Amane</role><person id="64331">Cherami Leigh</person></cast>
|
215
237
|
<cast gid="3390236191" lang="EN"><role>Rintaro Okabe</role><person id="65527">J. Michael Tatum</person></cast>
|
216
238
|
<cast gid="387662540" lang="EN"><role>Faris Nyannyan</role><person id="71281">Jad Saxton</person></cast>
|
217
239
|
<cast gid="974375242" lang="EN"><role>Ruka Urushibara</role><person id="83913">Lindsay Seidel</person></cast>
|
218
|
-
<cast gid="3228476880" lang="EN"><role>Itaru
|
240
|
+
<cast gid="3228476880" lang="EN"><role>Itaru "Daru" Hashida</role><person id="85022">Tyson Rinehart</person></cast>
|
219
241
|
<cast gid="3089478478" lang="EN"><role>Moeka Kiryu</role><person id="93816">Jessica Cavanagh</person></cast>
|
220
242
|
<cast gid="280562492" lang="EN"><role>Mayuri Shiina</role><person id="111977">Jackie Ross</person></cast>
|
221
243
|
<cast gid="1431252936" lang="IT"><role>Moeka Kiryū</role><person id="26049">Laura Lenghi</person></cast>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
|
2
|
+
<ann><manga id="16086" gid="1769009652" type="manga" name="Tokyo Ghoul" precision="manga" generated-on="2014-12-24T09:42:46Z">
|
3
|
+
<info gid="3098213756" type="Picture" src="http://cdn.animenewsnetwork.com/thumbnails/fit200x200/encyc/A16086-3098213756.1401567064.jpg" width="141" height="200"><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-fit200x200/encyc/A16086-3098213756.1401567064.jpg" width="141" height="200"/><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-max500x600/encyc/A16086-3098213756.1401567064.jpg" width="424" height="600"/><img src="http://cdn.animenewsnetwork.com/thumbnails/hotlink-full/encyc/A16086-3098213756.1401567064.jpg" width="640" height="905"/></info>
|
4
|
+
<info gid="2268785140" type="Main title" lang="EN">Tokyo Ghoul</info>
|
5
|
+
<info gid="2275884987" type="Alternative title" lang="JA">東京喰種トーキョーグール</info>
|
6
|
+
<info gid="2196443064" type="Genres">horror</info>
|
7
|
+
<info gid="2837242640" type="Themes">monsters</info>
|
8
|
+
<info gid="1981766714" type="Plot Summary">Ken Kaneki is a bookworm college student who meets a girl named Rize at a cafe he frequents. They're the same age and have the same interests, so they quickly become close. Little does Kaneki know that Rize is a ghoul - a kind of monster that lives by hunting and devouring human flesh. When part of her special organ - "the red child" - is transplanted into Kaneki, he becomes a ghoul himself, trapped in a warped world where humans are not the top of the food chain.</info>
|
9
|
+
<info gid="1200358852" type="Number of pages">202</info>
|
10
|
+
<info gid="1813617554" type="Number of tankoubon">9</info>info>
|
11
|
+
<info gid="3522510083" type="Vintage">2011-09-08 to 2014-09-18 (serialized in Weekly Young Jump)</info>
|
12
|
+
<info gid="2903430486" type="Official website" lang="JA" href="http://twitter.com/tkg_official">東京喰種トーキョーグール (tkg_official) on Twitter</info>
|
13
|
+
<info gid="1135774555" type="Official website" lang="JA" href="http://youngjump.jp/tokyoghoul/">東京喰種トーキョーグール ―解体「真」報― - 週刊ヤングジャンプ公式サイト</info>
|
14
|
+
<ratings nb_votes="32" weighted_score="8.5385" bayesian_score="8.4562"/>
|
15
|
+
<news datetime="2012-09-27T02:20:00Z" href="http://www.animenewsnetwork.com/news/2012-09-26/japanese-comic-ranking-september-17-23">Japanese Comic Ranking, September 17-23</news>
|
16
|
+
<news datetime="2012-12-27T19:45:00Z" href="http://www.animenewsnetwork.com/news/2012-12-27/japanese-comic-ranking-december-17-23">Japanese Comic Ranking, December 17-23</news>
|
17
|
+
<news datetime="2013-01-24T01:30:00Z" href="http://www.animenewsnetwork.com/news/2013-01-23/japanese-comic-ranking-january-14-20">Japanese Comic Ranking, January 14-20</news>
|
18
|
+
<news datetime="2013-01-30T23:15:00Z" href="http://www.animenewsnetwork.com/news/2013-01-30/japanese-comic-ranking-january-21-27">Japanese Comic Ranking, January 21-27</news>
|
19
|
+
<news datetime="2013-04-24T23:00:00Z" href="http://www.animenewsnetwork.com/news/2013-04-24/japanese-comic-ranking-april-14-20">Japanese Comic Ranking, April 15-21</news>
|
20
|
+
<news datetime="2013-05-01T22:30:00Z" href="http://www.animenewsnetwork.com/news/2013-05-01/japanese-comic-ranking-april-21-27">Japanese Comic Ranking, April 22-28</news>
|
21
|
+
<news datetime="2013-07-25T23:00:00Z" href="http://www.animenewsnetwork.com/news/2013-07-25/japanese-comic-ranking-july-14-20">Japanese Comic Ranking, July 15-21</news>
|
22
|
+
<news datetime="2013-08-01T21:00:00Z" href="http://www.animenewsnetwork.com/news/2013-08-01/japanese-comic-ranking-july-21-27">Japanese Comic Ranking, July 22-28</news>
|
23
|
+
<news datetime="2013-10-23T21:00:00Z" href="http://www.animenewsnetwork.com/news/2013-10-23/japanese-comic-ranking-october-14-20">Japanese Comic Ranking, October 14-20</news>
|
24
|
+
<news datetime="2013-10-30T21:30:00Z" href="http://www.animenewsnetwork.com/news/2013-10-30/japanese-comic-ranking-october-21-27">Japanese Comic Ranking, October 21-27</news>
|
25
|
+
<news datetime="2013-11-06T22:30:00Z" href="http://www.animenewsnetwork.com/news/2013-11-06/japanese-comic-ranking-october-28-november-3">Japanese Comic Ranking, October 28-November 3</news>
|
26
|
+
<news datetime="2013-12-02T01:00:00Z" href="http://www.animenewsnetwork.com/news/2013-12-01/top-selling-manga-in-japan-by-series/2013">Top-Selling Manga in Japan by Series: 2013</news>
|
27
|
+
<news datetime="2014-01-16T11:25:59Z" href="http://www.animenewsnetwork.com/news/2014-01-16/sui-ishida-suspense-horror-manga-tokyo-ghoul-gets-anime">Sui Ishida's Suspense Horror Manga <cite>Tokyo Ghoul</cite> Gets Anime</news>
|
28
|
+
<news datetime="2014-01-23T01:00:00Z" href="http://www.animenewsnetwork.com/news/2014-01-22/japanese-comic-ranking-january-13-19">Japanese Comic Ranking, January 13-19</news>
|
29
|
+
<news datetime="2014-01-31T20:30:00Z" href="http://www.animenewsnetwork.com/news/2014-01-31/japanese-comic-ranking-january-20-26">Japanese Comic Ranking, January 20-26</news>
|
30
|
+
<news datetime="2014-02-06T00:28:02Z" href="http://www.animenewsnetwork.com/news/2014-02-05/japanese-comic-ranking-january-27-february-2">Japanese Comic Ranking, January 27-February 2</news>
|
31
|
+
<news datetime="2014-02-12T23:20:59Z" href="http://www.animenewsnetwork.com/news/2014-02-12/japanese-comic-ranking-february-3-9">Japanese Comic Ranking, February 3-9</news>
|
32
|
+
<news datetime="2014-04-03T18:10:44Z" href="http://www.animenewsnetwork.com/news/2014-04-03/38th-annual-kodansha-manga-awards-nominees-announced">38th Annual Kodansha Manga Awards' Nominees Announced</news>
|
33
|
+
<news datetime="2014-04-23T21:00:36Z" href="http://www.animenewsnetwork.com/news/2014-04-23/japanese-comic-ranking-april-14-20">Japanese Comic Ranking, April 14-20</news>
|
34
|
+
<news datetime="2014-04-30T21:00:38Z" href="http://www.animenewsnetwork.com/news/2014-04-30/japanese-comic-ranking-april-21-27">Japanese Comic Ranking, April 21-27</news>
|
35
|
+
<news datetime="2014-05-07T21:45:29Z" href="http://www.animenewsnetwork.com/news/2014-05-07/japanese-comic-ranking-april-28-may-4">Japanese Comic Ranking, April 28-May 4</news>
|
36
|
+
<news datetime="2014-06-25T23:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-06-26/japanese-comic-ranking-june-16-22/.75966">Japanese Comic Ranking, June 16-22</news>
|
37
|
+
<news datetime="2014-07-03T05:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-07-03/japanese-comic-ranking-june-23-29/.76254">Japanese Comic Ranking, June 23-29</news>
|
38
|
+
<news datetime="2014-07-09T21:30:11Z" href="http://www.animenewsnetwork.com:/news/2014-07-10/japanese-comic-ranking-june-30-july-6/.76501">Japanese Comic Ranking, June 30-July 6</news>
|
39
|
+
<news datetime="2014-07-16T22:30:15Z" href="http://www.animenewsnetwork.com:/news/2014-07-17/japanese-comic-ranking-july-7-13/.76747">Japanese Comic Ranking, July 7-13</news>
|
40
|
+
<news datetime="2014-07-23T23:00:10Z" href="http://www.animenewsnetwork.com:/news/2014-07-24/japanese-comic-ranking-july-14-20/.76978">Japanese Comic Ranking, July 14-20</news>
|
41
|
+
<news datetime="2014-07-31T06:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-07-31/japanese-comic-ranking-july-21-27/.77147">Japanese Comic Ranking, July 21-27</news>
|
42
|
+
<news datetime="2014-08-06T22:30:54Z" href="http://www.animenewsnetwork.com:/news/2014-08-07/japanese-comic-ranking-july-28-august-3/.77371">Japanese Comic Ranking, July 28-August 3</news>
|
43
|
+
<news datetime="2014-08-13T23:00:19Z" href="http://www.animenewsnetwork.com:/news/2014-08-14/japanese-comic-ranking-august-4-10/.77603">Japanese Comic Ranking, August 4-10</news>
|
44
|
+
<news datetime="2014-08-21T16:10:24Z" href="http://www.animenewsnetwork.com:/news/2014-08-22/japanese-comic-ranking-august-11-17/.77821">Japanese Comic Ranking, August 11-17</news>
|
45
|
+
<news datetime="2014-08-27T23:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-08-27/japanese-comic-ranking-august-18-24/.78097">Japanese Comic Ranking, August 18-24</news>
|
46
|
+
<news datetime="2014-09-03T22:40:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-03/japanese-comic-ranking-august-25-31/.78358">Japanese Comic Ranking, August 25-31</news>
|
47
|
+
<news datetime="2014-09-10T23:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-10/japanese-comic-ranking-september-1-7/.78635">Japanese Comic Ranking, September 1-7</news>
|
48
|
+
<news datetime="2014-09-12T09:50:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-12/tokyo-ghoul-manga-to-end-this-month/.78700"><cite>Tokyo Ghoul</cite> Manga to End This Month</news>
|
49
|
+
<news datetime="2014-09-17T22:20:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-17/japanese-comic-ranking-september-8-14/.78880">Japanese Comic Ranking, September 8-14</news>
|
50
|
+
<news datetime="2014-09-24T23:40:00Z" href="http://www.animenewsnetwork.com:/news/2014-09-24/japanese-comic-ranking-september-15-21/.79161">Japanese Comic Ranking, September 15-21</news>
|
51
|
+
<news datetime="2014-10-02T23:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-02/japanese-comic-ranking-september-22-28/.79454">Japanese Comic Ranking, September 22-28</news>
|
52
|
+
<news datetime="2014-10-04T08:45:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-04/tokyo-ghoul-sui-ishida-to-launch-new-manga-in-october/.79550"><cite>Tokyo Ghoul's</cite> Sui Ishida to Launch New Manga in October</news>
|
53
|
+
<news datetime="2014-10-09T19:37:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-09/viz-media-adds-tokyo-ghoul-so-cute-it-hurts-manga/.79756">Viz Media Adds <cite>Tokyo Ghoul, So Cute It Hurts!!</cite> Manga</news>
|
54
|
+
<news datetime="2014-10-23T21:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-23/japanese-comic-ranking-october-13-19/.80269">Japanese Comic Ranking, October 13-19</news>
|
55
|
+
<news datetime="2014-10-29T22:40:00Z" href="http://www.animenewsnetwork.com:/news/2014-10-29/japanese-comic-ranking-october-20-26/.80471">Japanese Comic Ranking, October 20-26</news>
|
56
|
+
<news datetime="2014-11-06T05:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-11-06/japanese-comic-ranking-october-27-november-2/.80703">Japanese Comic Ranking, October 27-November 2</news>
|
57
|
+
<news datetime="2014-11-13T01:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-11-12/japanese-comic-ranking-november-3-9/.80954">Japanese Comic Ranking, November 3-9</news>
|
58
|
+
<news datetime="2014-11-20T23:30:00Z" href="http://www.animenewsnetwork.com:/news/2014-11-20/japanese-comic-ranking-november-10-16/.81260">Japanese Comic Ranking, November 10-16</news>
|
59
|
+
<news datetime="2014-12-08T09:00:00Z" href="http://www.animenewsnetwork.com:/news/2014-12-08/kono-manga-ga-sugoi-2015-series-ranking-for-male-readers/.81892"><cite>Kono Manga ga Sugoi!</cite> 2015's Series Ranking for Male Readers</news>
|
60
|
+
<staff gid="2459178861"><task>Story & Art</task><person id="123563">Sui Ishida</person></staff></manga></ann>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ann_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shawntoffel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -109,15 +109,28 @@ files:
|
|
109
109
|
- Rakefile
|
110
110
|
- ann_wrapper.gemspec
|
111
111
|
- lib/ann_wrapper.rb
|
112
|
-
- lib/ann_wrapper/
|
112
|
+
- lib/ann_wrapper/ann.rb
|
113
|
+
- lib/ann_wrapper/ann_anime.rb
|
114
|
+
- lib/ann_wrapper/ann_manga.rb
|
115
|
+
- lib/ann_wrapper/ann_media.rb
|
116
|
+
- lib/ann_wrapper/ann_report.rb
|
113
117
|
- lib/ann_wrapper/version.rb
|
114
118
|
- spec/ann_anime_spec.rb
|
119
|
+
- spec/ann_manga_spec.rb
|
120
|
+
- spec/ann_report_spec.rb
|
115
121
|
- spec/ann_wrapper_spec.rb
|
116
122
|
- spec/spec_helper.rb
|
117
123
|
- spec/support/fake_ann.rb
|
124
|
+
- spec/support/fixtures/anime_batch.xml
|
125
|
+
- spec/support/fixtures/anime_batch_with_invalid.xml
|
126
|
+
- spec/support/fixtures/invalid_warning.xml
|
127
|
+
- spec/support/fixtures/list_report.xml
|
128
|
+
- spec/support/fixtures/manga_batch.xml
|
129
|
+
- spec/support/fixtures/manga_batch_with_invalid.xml
|
118
130
|
- spec/support/fixtures/no_result.xml
|
119
131
|
- spec/support/fixtures/steins_gate.xml
|
120
|
-
|
132
|
+
- spec/support/fixtures/tokyo_ghoul.xml
|
133
|
+
homepage: http://getkura.github.io/ann_wrapper/
|
121
134
|
licenses:
|
122
135
|
- MIT
|
123
136
|
metadata: {}
|
@@ -137,14 +150,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
150
|
version: '0'
|
138
151
|
requirements: []
|
139
152
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.1.11
|
141
154
|
signing_key:
|
142
155
|
specification_version: 4
|
143
156
|
summary: Anime News Network API wrapper
|
144
157
|
test_files:
|
145
158
|
- spec/ann_anime_spec.rb
|
159
|
+
- spec/ann_manga_spec.rb
|
160
|
+
- spec/ann_report_spec.rb
|
146
161
|
- spec/ann_wrapper_spec.rb
|
147
162
|
- spec/spec_helper.rb
|
148
163
|
- spec/support/fake_ann.rb
|
164
|
+
- spec/support/fixtures/anime_batch.xml
|
165
|
+
- spec/support/fixtures/anime_batch_with_invalid.xml
|
166
|
+
- spec/support/fixtures/invalid_warning.xml
|
167
|
+
- spec/support/fixtures/list_report.xml
|
168
|
+
- spec/support/fixtures/manga_batch.xml
|
169
|
+
- spec/support/fixtures/manga_batch_with_invalid.xml
|
149
170
|
- spec/support/fixtures/no_result.xml
|
150
171
|
- spec/support/fixtures/steins_gate.xml
|
172
|
+
- spec/support/fixtures/tokyo_ghoul.xml
|
@@ -1,217 +0,0 @@
|
|
1
|
-
##################################################
|
2
|
-
# ANN_Objects
|
3
|
-
##################################################
|
4
|
-
|
5
|
-
|
6
|
-
# parent with helper methods
|
7
|
-
class ANN
|
8
|
-
private
|
9
|
-
##
|
10
|
-
# define method with supplied name and block
|
11
|
-
def create_method(name, &block)
|
12
|
-
self.class.send(:define_method, name, &block)
|
13
|
-
end
|
14
|
-
|
15
|
-
# return hash of methods and returns excluding those in excludes
|
16
|
-
def to_hash(excludes)
|
17
|
-
# get list of methods excluding above
|
18
|
-
methods = self.class.instance_methods(false).reject {|m| excludes.include? m}
|
19
|
-
|
20
|
-
# map methods and results to hash
|
21
|
-
data = methods.map do |method |
|
22
|
-
result = self.send(method)
|
23
|
-
|
24
|
-
# convert Structs to hash
|
25
|
-
if (result.is_a? Array)
|
26
|
-
result.map! do |item|
|
27
|
-
item.is_a?(Struct) ? item.hash : item
|
28
|
-
end
|
29
|
-
else
|
30
|
-
result.hash! if result.is_a?(Struct)
|
31
|
-
end
|
32
|
-
|
33
|
-
# make hash with method name and result of call
|
34
|
-
[method.to_sym, result]
|
35
|
-
end
|
36
|
-
|
37
|
-
# return hash
|
38
|
-
Hash[data]
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# various ANN struct types
|
43
|
-
ANN_Error = Struct.new(:message)
|
44
|
-
ANN_Staff = Struct.new(:id, :task, :name)
|
45
|
-
ANN_Cast = Struct.new(:id, :role, :name, :lang)
|
46
|
-
ANN_Episode = Struct.new(:number, :title, :lang)
|
47
|
-
ANN_Image = Struct.new(:src, :width, :height)
|
48
|
-
|
49
|
-
class ANN_Anime < ANN
|
50
|
-
# ann_anime Nokogiri object
|
51
|
-
attr_writer :ann_anime
|
52
|
-
|
53
|
-
|
54
|
-
# initialize and create info methods
|
55
|
-
def initialize(ann_anime)
|
56
|
-
@ann_anime = ann_anime
|
57
|
-
|
58
|
-
# information available from detail
|
59
|
-
@info = Hash.new
|
60
|
-
@info[:title] = "Main title"
|
61
|
-
@info[:synopsis] = "Plot Summary"
|
62
|
-
@info[:num_episodes] = "Number of episodes"
|
63
|
-
@info[:genres] = "Genres"
|
64
|
-
@info[:themes] = "Themes"
|
65
|
-
@info[:vintage] = "Vintage"
|
66
|
-
@info[:op_theme] = "Opening Theme"
|
67
|
-
@info[:ed_theme] = "Ending Theme"
|
68
|
-
|
69
|
-
# create methods
|
70
|
-
@info.each do |name, key|
|
71
|
-
create_method(name) do
|
72
|
-
info = find_info(key)
|
73
|
-
return nil if info.nil?
|
74
|
-
info.map do |i|
|
75
|
-
i.content
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
# @return [Nokogiri::XML::NodeSet] return all info with provided key
|
83
|
-
def find_info(key)
|
84
|
-
begin
|
85
|
-
@ann_anime.search("info[@type=\"#{key}\"]")
|
86
|
-
rescue
|
87
|
-
nil
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
# @return [String] returns anime id
|
92
|
-
def id
|
93
|
-
@id ||= @ann_anime['id']
|
94
|
-
end
|
95
|
-
|
96
|
-
##
|
97
|
-
# These methods are created via create_method in the constructor
|
98
|
-
|
99
|
-
# @return [[String]] returns title(s)
|
100
|
-
def title; end
|
101
|
-
# @return [[String]] returns synopsis
|
102
|
-
def synopsis; end
|
103
|
-
# @return [[String]] returns number of episodes
|
104
|
-
def num_episodes; end
|
105
|
-
# @return [[String]] returns array of genres
|
106
|
-
def genres; end
|
107
|
-
# @return [[String]] returns array of themes
|
108
|
-
def themes; end
|
109
|
-
# @return [[String]] returns array of vintage(s)
|
110
|
-
def vintage; end
|
111
|
-
# @return [[String]] returns op theme(s)
|
112
|
-
def op_theme; end
|
113
|
-
# @return [[String]] returns ed theme(s)
|
114
|
-
def ed_theme; end
|
115
|
-
|
116
|
-
# @return [Hash] returns hash of titles grouped by language abbreviation
|
117
|
-
def alt_titles
|
118
|
-
begin
|
119
|
-
titles = find_info("Alternative title").group_by {|title| title['lang']}
|
120
|
-
titles.each do |key, value|
|
121
|
-
value.map! do |title|
|
122
|
-
title.content
|
123
|
-
end
|
124
|
-
end
|
125
|
-
rescue NameError
|
126
|
-
nil
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
# @return [String] returns anime type
|
131
|
-
def type
|
132
|
-
@type ||= @ann_anime['type']
|
133
|
-
end
|
134
|
-
|
135
|
-
# @return [[ANN_Image]] returns array of ANN_Image
|
136
|
-
def images
|
137
|
-
begin
|
138
|
-
@images ||= find_info("Picture").xpath("//img").map do |i|
|
139
|
-
ANN_Image.new(i['src'], i['width'], i['height'])
|
140
|
-
end
|
141
|
-
rescue NameError
|
142
|
-
nil
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
# @return [[ANN_Episode]] returns array of ANN_Episode
|
147
|
-
def episodes
|
148
|
-
begin
|
149
|
-
@episodes ||= @ann_anime.xpath("//episode").map do |e|
|
150
|
-
title = e.at_xpath("title")
|
151
|
-
ANN_Episode.new(e['num'], title.content, title['lang'])
|
152
|
-
end
|
153
|
-
rescue NameError
|
154
|
-
nil
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
# @return [[ANN_Staff]] returns array of ANN_Staff
|
159
|
-
def staff
|
160
|
-
begin
|
161
|
-
@staff ||= @ann_anime.xpath("//staff").map do |s|
|
162
|
-
task = s.at_xpath("task")
|
163
|
-
person = s.at_xpath("person")
|
164
|
-
ANN_Staff.new(person['id'], task.content, person.content)
|
165
|
-
end
|
166
|
-
rescue NameError
|
167
|
-
nil
|
168
|
-
end
|
169
|
-
end
|
170
|
-
|
171
|
-
# @return [[ANN_Cast]] returns array of ANN_Cast
|
172
|
-
def cast
|
173
|
-
begin
|
174
|
-
@cast ||= @ann_anime.xpath("//cast").map do |s|
|
175
|
-
role = s.at_xpath("role")
|
176
|
-
person = s.at_xpath("person")
|
177
|
-
ANN_Cast.new(person['id'], role.content, person.content, s['lang'])
|
178
|
-
end
|
179
|
-
rescue NameError
|
180
|
-
nil
|
181
|
-
end
|
182
|
-
end
|
183
|
-
|
184
|
-
# @return [Hash] hash of self
|
185
|
-
def to_h
|
186
|
-
# create hash excluding some methods
|
187
|
-
to_hash([:to_h, :ann_anime=, :find_info])
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
class ANN_Report < ANN
|
192
|
-
# initialize and build access methods
|
193
|
-
def initialize(ann_report)
|
194
|
-
@id, @type, @name, @precision, @vintage = ""
|
195
|
-
@ann_report = ann_report
|
196
|
-
|
197
|
-
self.instance_variables.each do |iv|
|
198
|
-
var_name = iv[1..-1]
|
199
|
-
create_method(var_name) { get_info_on(var_name) }
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
# get info from xml
|
204
|
-
def get_info_on(var_name)
|
205
|
-
begin
|
206
|
-
@ann_report.at_xpath(var_name).content
|
207
|
-
rescue NameError
|
208
|
-
nil
|
209
|
-
end
|
210
|
-
end
|
211
|
-
|
212
|
-
# @return [Hash] hash of self
|
213
|
-
def to_h
|
214
|
-
# create hash excluding some methods
|
215
|
-
to_hash([:to_h, :ann_report, :get_info_on])
|
216
|
-
end
|
217
|
-
end
|