module TINAMI::API
Public Instance Methods
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@authentication Auth Key @return [Hashie::Mash]
# File lib/tinami/api.rb, line 14 def info get('login/info', auth_keys) end
@authentication Auth Key @return [Hashie::Mash]
# File lib/tinami/api.rb, line 20 def logout get('logout', auth_keys) end
@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
@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
@authentication API
Key @param params [Hash] @option params [String] :text @option params [String] :tag @option params [String] :search @option params [String] :sort @option params [Array<Integer>] :cont_type @option params [Integer] :page (1) @option params [Integer] :perpage (20) @option params [Integer] :prof_id @option params [Integer] :safe @return [Hashie::Mash]
# File lib/tinami/api.rb, line 36 def search(params = {}) get('content/search', auth_keys.merge(params)) end
@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
@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
# File lib/tinami/api.rb, line 158 def api_keys params = {} params[:api_key] = api_key if api_key params end
# 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