nicoapi 0.0.6 → 0.0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a55070e52bd1ba3b43715c130aa183412f409bf8
4
- data.tar.gz: a41bb5eeed230f137c98cbdee457213eb8c7cdf0
3
+ metadata.gz: 49a2d3622b1530a955a923b552cd793b6eac5271
4
+ data.tar.gz: d6702a10f11f6df0de54360b5db01326ebd5b393
5
5
  SHA512:
6
- metadata.gz: bfed0747d94957ae7cd76eb1a2c48c1722299cd2a6e2e192d6476e4591fdf75d901f5b59045626317ddc506c59e22f2d007443640225ff4658003cbb982dbdbb
7
- data.tar.gz: 26297ac2b634cd0f3b3ce504ec8bfe86ce099b473ca14de21a8754c2ef2864854f567651d2e66749831d46ead1ea18eeffdb345d1f2cbdc5cd7f1bab0af4f279
6
+ metadata.gz: d14c3e6965fbd32f26bc9e17b9802161a7a977f7beb3f4cf10004b57c0f337cbb6bb9f6896eea37fa5046f452b67ee1c42b938c328036f6288c3af9aae205d86
7
+ data.tar.gz: 55d34c9ce67ad4bb4e67e8383065e52217bbcff7fce09ef9e24b40d9fe8c5e561221f7eb0d1245abff72330557192be7e11ec1bdd2c61d91d9aa0de5adc8116b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nicoapi (0.0.6)
4
+ nicoapi (0.0.6.1)
5
5
  activesupport (~> 4.0.0)
6
6
  i18n
7
7
  rest-client
@@ -17,11 +17,20 @@ module NicoAPI
17
17
  end
18
18
 
19
19
  def tag_search(tag: tag, sort: sort, order: order, page: page)
20
- instance = NicoAPI::TagSearch.new tag: tag, sort: sort, order: order, page: page
20
+ instance = NicoAPI::TagSearch.new tag: tag,
21
+ sort: sort,
22
+ order: order,
23
+ page: page
24
+ instance.get
25
+ end
26
+
27
+ def mylist(mylist_id)
28
+ instance = NicoAPI::Mylist.new mylist_id
21
29
  instance.get
22
30
  end
23
31
 
24
32
  module_function :getthumbinfo
25
33
  module_function :video_array
26
34
  module_function :tag_search
35
+ module_function :mylist
27
36
  end
@@ -0,0 +1,31 @@
1
+ require 'active_support/core_ext'
2
+ require 'nicoapi/base'
3
+
4
+
5
+ module NicoAPI
6
+ class MylistRSS
7
+ include NicoAPI::Base
8
+
9
+ def initialize(mylist_id)
10
+ @dynamic_segment = mylist_id.to_s
11
+ @params_array = params_array
12
+ end
13
+
14
+ private
15
+ def host
16
+ 'www.nicovideo.jp'
17
+ end
18
+
19
+ def static_segment
20
+ 'mylist'
21
+ end
22
+
23
+ def params_array
24
+ [format]
25
+ end
26
+
27
+ def format
28
+ "rss=2.0"
29
+ end
30
+ end
31
+ end
@@ -1,3 +1,3 @@
1
1
  module NicoAPI
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.6.1"
3
3
  end
@@ -0,0 +1,16 @@
1
+ require 'nicoapi/mylist_rss'
2
+
3
+
4
+ describe "mylist_rss" do
5
+ before do
6
+ @instance = NicoAPI::MylistRSS.new 18266317
7
+ end
8
+
9
+ describe "uri" do
10
+ subject { @instance.uri }
11
+
12
+ specify { expect(subject).to match /http:\/\/www\.nicovideo\.jp\/mylist/ }
13
+ specify { expect(subject).to match /18266317/ }
14
+ specify { expect(subject).to match /rss\=2\.0/ }
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nicoapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masami Yonehara
@@ -142,11 +142,13 @@ files:
142
142
  - lib/nicoapi/getthumbinfo.rb
143
143
  - lib/nicoapi/hash_mapper.rb
144
144
  - lib/nicoapi/http_client.rb
145
+ - lib/nicoapi/mylist_rss.rb
145
146
  - lib/nicoapi/tag_search.rb
146
147
  - lib/nicoapi/version.rb
147
148
  - lib/nicoapi/video_array.rb
148
149
  - nicoapi.gemspec
149
150
  - spec/getthumbinfo_spec.rb
151
+ - spec/mylist_rss_spec.rb
150
152
  - spec/spec_helper.rb
151
153
  - spec/tag_search_spec.rb
152
154
  - spec/video_array_spec.rb
@@ -176,6 +178,7 @@ specification_version: 4
176
178
  summary: niconico low level api library
177
179
  test_files:
178
180
  - spec/getthumbinfo_spec.rb
181
+ - spec/mylist_rss_spec.rb
179
182
  - spec/spec_helper.rb
180
183
  - spec/tag_search_spec.rb
181
184
  - spec/video_array_spec.rb