mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-04-27 14:57:44 +00:00
fix more rubocop failures
This commit is contained in:
parent
5161c68b5a
commit
29e49c1ed7
10 changed files with 43 additions and 44 deletions
|
|
@ -11,14 +11,14 @@ module Instapaper
|
|||
consumer_key: consumer_key,
|
||||
consumer_secret: consumer_secret,
|
||||
token: oauth_token,
|
||||
token_secret: oauth_token_secret
|
||||
token_secret: oauth_token_secret,
|
||||
}
|
||||
end
|
||||
|
||||
def consumer_tokens
|
||||
{
|
||||
consumer_key: consumer_key,
|
||||
consumer_secret: consumer_secret
|
||||
consumer_secret: consumer_secret,
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module Instapaper
|
|||
class Client
|
||||
# Defines methods related to bookmarks
|
||||
module Bookmark
|
||||
# Lists the user’s unread bookmarks, and can also synchronize reading positions.
|
||||
# Lists the user's unread bookmarks, and can also synchronize reading positions.
|
||||
# @option limit: Optional. A number between 1 and 500, default 25.
|
||||
# @option folder_id: Optional. Possible values are unread (default), starred, archive, or a folder_id value from /api/1/folders/list.
|
||||
# @option have: Optional. A concatenation of bookmark_id values that the client already has from the specified folder. See below.
|
||||
|
|
@ -10,7 +10,7 @@ module Instapaper
|
|||
post('bookmarks/list', options)[2..-1]
|
||||
end
|
||||
|
||||
# Updates the user’s reading progress on a single article.
|
||||
# Updates the user's reading progress on a single article.
|
||||
# @param bookmark_id [String] The id of the bookmark to update.
|
||||
# @param progress [Float] The user’s progress, as a floating-point number between 0.0 and 1.0, defined as the top edge of the user’s current viewport, expressed as a percentage of the article’s total length.
|
||||
# @param progress_timestamp [Integer] The Unix timestamp value of the time that the progress was recorded.
|
||||
|
|
@ -18,14 +18,14 @@ module Instapaper
|
|||
post('bookmarks/update_read_progress', bookmark_id: bookmark_id, progress: progress, progress_timestamp: progress_timestamp.to_i).first
|
||||
end
|
||||
|
||||
# Adds a new unread bookmark to the user’s account.
|
||||
# Adds a new unread bookmark to the user's account.
|
||||
# @param url [String] The url of the bookmark.
|
||||
def add_bookmark(url, options = {})
|
||||
post('bookmarks/add', options.merge(url: url)).first
|
||||
end
|
||||
|
||||
# Permanently deletes the specified bookmark.
|
||||
# This is NOT the same as Archive. Please be clear to users if you’re going to do this.
|
||||
# This is NOT the same as Archive. Please be clear to users if you're going to do this.
|
||||
# @param bookmark_id [String] The id of the bookmark.
|
||||
def delete_bookmark(bookmark_id)
|
||||
post('bookmarks/delete', bookmark_id: bookmark_id)
|
||||
|
|
@ -67,7 +67,7 @@ module Instapaper
|
|||
end
|
||||
alias_method :move_bookmark, :move
|
||||
|
||||
# Returns the specified bookmark’s processed text-view HTML, which is
|
||||
# Returns the specified bookmark's processed text-view HTML, which is
|
||||
# always text/html encoded as UTF-8.
|
||||
# @param bookmark_id [String] The id of the bookmark.
|
||||
def text(bookmark_id)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ module Instapaper
|
|||
class Client
|
||||
# Defines methods related to folders
|
||||
module Folder
|
||||
# List the account’s user-created folders.
|
||||
# List the account's user-created folders.
|
||||
# @note This only includes organizational folders and does not include RSS-feed folders or starred-subscription folders
|
||||
def folders
|
||||
post('folders/list')
|
||||
|
|
@ -20,7 +20,7 @@ module Instapaper
|
|||
post('folders/delete', folder_id: folder_id)
|
||||
end
|
||||
|
||||
# Re-orders a user’s folders.
|
||||
# Re-orders a user's folders.
|
||||
# @param order [Array] An array of folder_id:position pairs joined by commas.
|
||||
# @example Ordering folder_ids 100, 200, and 300
|
||||
# Instapaper.set_order(['100:1','200:2','300:3'])
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ module Instapaper
|
|||
'User-Agent' => user_agent
|
||||
},
|
||||
proxy: proxy,
|
||||
ssl: { verify: false },
|
||||
url: api_endpoint)
|
||||
|
||||
Faraday.new(merged_options) do |builder|
|
||||
|
|
|
|||
Loading…
Reference in a new issue