Sha256: b70ff14f19c045f63aadeb6a3962940a60c8c7e58a9579952d89c47de4f702a4
Contents?: true
Size: 1.47 KB
Versions: 3
Compression:
Stored size: 1.47 KB
Contents
require "nicoquery/api/tag_search_rss" require "nicoquery/object_mapper/tag_search_rss" require "nicoquery/object/movie" module NicoQuery module Object class TagSearch attr_accessor :movies [ 'title', 'url', 'link', 'description', 'publish_date', 'creator', ].each do |field_name| define_method(field_name) { @hash.meta.send field_name } end def initialize(tag: tag, sort: sort, order: order, page: page) @movies = [] source = (NicoQuery::Api::TagSearchRss.new(tag: tag, sort: sort, order: order, page: page)).get @hash = NicoQuery::ObjectMapper::TagSearchRss.new source @hash.items.map do |item| movie = NicoQuery::Object::Movie.new item.video_id movie.set_tag_search_rss_source item @movies.push movie end end end end end # <title>マイリスト to_test‐ニコニコ動画</title> # <link>http://www.nicovideo.jp/mylist/38369702</link> # <atom:link rel="self" type="application/rss+xml" href="http://www.nicovideo.jp/mylist/38369702?rss=2.0"/> # <description></description> # <pubDate>Sat, 17 Aug 2013 22:51:40 +0900</pubDate> # <lastBuildDate>Sat, 17 Aug 2013 22:51:40 +0900</lastBuildDate> # <generator>ニコニコ動画</generator> # <dc:creator>うえおに</dc:creator> # <language>ja-jp</language> # <copyright>(c) niwango, inc. All rights reserved.</copyright> # <docs>http://blogs.law.harvard.edu/tech/rss</docs>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nicoquery-0.0.2.2 | lib/nicoquery/object/tag_search.rb |
nicoquery-0.0.2.1 | lib/nicoquery/object/tag_search.rb |
nicoquery-0.0.2 | lib/nicoquery/object/tag_search.rb |