Module: Smiling

Includes:
HTTParty
Defined in:
lib/smiling.rb,
lib/smiling/tag.rb,
lib/smiling/video.rb,
lib/smiling/version.rb

Overview

Public: Utility methods useful for fetching information from Nico Nico Douga. All methods are module methods and should be called on the Smiling module.

Examples

Smiling.video('sm9')
# => #<Smiling::Video:0x007fd24bb62d88 @id="sm9">

Defined Under Namespace

Classes: Tag, Video

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.video(id) ⇒ Object

Public: Get video information with getthumbinfo API.

id - The String of video id to get the information.

Examples

video = Smiling.video('sm9')
# => #<Smiling::Video:0x007fd24bb62d88 @id="sm9">

Returns an instance of Smiling::Video.



30
31
32
# File 'lib/smiling.rb', line 30

def self.video(id)
  Video.new(self.get("/api/getthumbinfo/#{id}"))
end