mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-27 14:57:44 +00:00
fix rubocop warnings
This commit is contained in:
parent
62098418d6
commit
d1d493226c
2 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ module Instapaper
|
||||||
# always text/html encoded as UTF-8.
|
# always text/html encoded as UTF-8.
|
||||||
# @param bookmark_id [String] The id of the bookmark.
|
# @param bookmark_id [String] The id of the bookmark.
|
||||||
def get_text(bookmark_id)
|
def get_text(bookmark_id)
|
||||||
perform_post_with_unparsed_response('/api/1/bookmarks/get_text', {bookmark_id: bookmark_id})
|
perform_post_with_unparsed_response('/api/1/bookmarks/get_text', bookmark_id: bookmark_id)
|
||||||
end
|
end
|
||||||
alias_method :text, :get_text
|
alias_method :text, :get_text
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ module Instapaper
|
||||||
module OAuth
|
module OAuth
|
||||||
# Gets an OAuth access token for a user.
|
# Gets an OAuth access token for a user.
|
||||||
def access_token(username, password)
|
def access_token(username, password)
|
||||||
response = perform_post_with_unparsed_response('/api/1/oauth/access_token', {x_auth_username: username, x_auth_password: password, x_auth_mode: 'client_auth'})
|
response = perform_post_with_unparsed_response('/api/1/oauth/access_token', x_auth_username: username, x_auth_password: password, x_auth_mode: 'client_auth')
|
||||||
params = response.split('&')
|
params = response.split('&')
|
||||||
values = params.map { |part| part.split('=') }.flatten
|
values = params.map { |part| part.split('=') }.flatten
|
||||||
values.unshift('error') if values.length == 1
|
values.unshift('error') if values.length == 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue