class Kollus::MediaSession

Public Class Methods

new(token) click to toggle source
# File lib/kollus.rb, line 72
def initialize token
  @token = token
end

Public Instance Methods

download(title = nil) click to toggle source
# File lib/kollus.rb, line 83
def download(title = nil); self.url(title, true) end
token() click to toggle source
# File lib/kollus.rb, line 84
def token; @token end
url(title = nil, download = false) click to toggle source
# File lib/kollus.rb, line 76
def url title = nil, download = false
  url = "http://v.kr.kollus.com/s?key=#{@token}"
  url += "&download" if download
  url += "&title=" + URI.encode(title) if title
  URI(url)
end