module TINAMI::API

Public Instance Methods

add_bookmark(prof_id) click to toggle source

@authentication Auth Key @param prof_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 99
def add_bookmark(prof_id)
  get('bookmark/add', auth_keys.merge(prof_id: prof_id))
end
add_collection(cont_id) click to toggle source

@authentication Auth Key @param cont_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 83
def add_collection(cont_id)
  get('collection/add', auth_keys.merge(cont_id: cont_id))
end
add_comment(cont_id, comment) click to toggle source

@authentication Auth Key @param cont_id [Integer] @param comment [String] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 138
def add_comment(cont_id, comment)
  get('content/comment/add', auth_keys.merge(cont_id: cont_id, comment: comment))
end
auth(email, password) click to toggle source

@authentication API Key @param email [String] @param password [String] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 8
def auth(email, password)
  post('auth', api_keys.merge(email: email, password: password))
end
bookmark_contents(params = {}) click to toggle source

@authentication Auth Key @param params [Hash] @option params [Integer] :page (1) @option params [Integer] :perpage (20) @option params [Integer] :safe @return [Hashie::Mash]

# File lib/tinami/api.rb, line 46
def bookmark_contents(params = {})
  get('bookmark/content/list', auth_keys.merge(params))
end
bookmarks(params = {}) click to toggle source

@authentication Auth Key @param params [Hash] @option params [Integer] :page (1) @option params [Integer] :perpage (20) @return [Hashie::Mash]

# File lib/tinami/api.rb, line 92
def bookmarks(params = {})
  get('bookmark/list', auth_keys.merge(params))
end
collections(params = {}) click to toggle source

@authentication Auth Key @param params [Hash] @option params [Integer] :page (1) @option params [Integer] :perpage (20) @option params [Integer] :safe @return [Hashie::Mash]

# File lib/tinami/api.rb, line 76
def collections(params = {})
  get('collection/list', auth_keys.merge(params))
end
comments(cont_id) click to toggle source

@authentication API Key @param cont_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 130
def comments(cont_id)
  get('content/comment/list', auth_keys.merge(cont_id: cont_id))
end
content(cont_id, params = {}) click to toggle source

@authentication API Key @param cont_id [Integer] @param params [Hash] @option params [Integer] :dates @option params [Integer] :models @return [Hashie::Mash]

# File lib/tinami/api.rb, line 116
def content(cont_id, params = {})
  get('content/info', auth_keys.merge(params).merge(cont_id: cont_id))
end
creator(prof_id) click to toggle source

@authentication API Key @param prof_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 123
def creator(prof_id)
  get('creator/info', auth_keys.merge(prof_id: prof_id))
end
friend_recommends(params = {}) click to toggle source

@authentication Auth Key @param params [Hash] @option params [Integer] :page (1) @option params [Integer] :perpage (20) @option params [Integer] :safe @return [Hashie::Mash]

# File lib/tinami/api.rb, line 56
def friend_recommends(params = {})
  get('friend/recommend/content/list', auth_keys.merge(params))
end
info() click to toggle source

@authentication Auth Key @return [Hashie::Mash]

# File lib/tinami/api.rb, line 14
def info
  get('login/info', auth_keys)
end
logout() click to toggle source

@authentication Auth Key @return [Hashie::Mash]

# File lib/tinami/api.rb, line 20
def logout
  get('logout', auth_keys)
end
ranking(category) click to toggle source

@authentication API Key @param category [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 106
def ranking(category)
  get('ranking', auth_keys.merge(category: category))
end
remove_comment(comment_id) click to toggle source

@authentication Auth Key @param comment_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 145
def remove_comment(comment_id)
  get('content/comment/remove', auth_keys.merge(comment_id: comment_id))
end
support(cont_id) click to toggle source

@authentication Auth Key @param cont_id [Integer] @return [Hashie::Mash]

# File lib/tinami/api.rb, line 152
def support(cont_id)
  get('content/support', auth_keys.merge(cont_id: cont_id))
end
watchkeyword_contents(params = {}) click to toggle source

@authentication Auth Key @param params [Hash] @option params [Integer] :page (1) @option params [Integer] :perpage (20) @option params [Integer] :safe @return [Hashie::Mash]

# File lib/tinami/api.rb, line 66
def watchkeyword_contents(params = {})
  get('watchkeyword/content/list', auth_keys.merge(params))
end

Private Instance Methods

api_keys() click to toggle source
# File lib/tinami/api.rb, line 158
def api_keys
  params = {}
  params[:api_key] = api_key if api_key
  params
end
auth_keys() click to toggle source
# File lib/tinami/api.rb, line 164
def auth_keys
  params = {}
  params[:api_key] = api_key if api_key
  params[:auth_key] = auth_key if auth_key
  params
end