nicoapi 0.0.6 → 0.0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nicoapi.rb +10 -1
- data/lib/nicoapi/mylist_rss.rb +31 -0
- data/lib/nicoapi/version.rb +1 -1
- data/spec/mylist_rss_spec.rb +16 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49a2d3622b1530a955a923b552cd793b6eac5271
|
4
|
+
data.tar.gz: d6702a10f11f6df0de54360b5db01326ebd5b393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14c3e6965fbd32f26bc9e17b9802161a7a977f7beb3f4cf10004b57c0f337cbb6bb9f6896eea37fa5046f452b67ee1c42b938c328036f6288c3af9aae205d86
|
7
|
+
data.tar.gz: 55d34c9ce67ad4bb4e67e8383065e52217bbcff7fce09ef9e24b40d9fe8c5e561221f7eb0d1245abff72330557192be7e11ec1bdd2c61d91d9aa0de5adc8116b
|
data/Gemfile.lock
CHANGED
data/lib/nicoapi.rb
CHANGED
@@ -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,
|
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
|
data/lib/nicoapi/version.rb
CHANGED
@@ -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
|