pyinstapaper package¶
Submodules¶
pyinstapaper.instapaper module¶
-
class
pyinstapaper.instapaper.
Bookmark
(client, **data)[source]¶ Bases:
pyinstapaper.instapaper.InstapaperObject
Object representing an Instapaper bookmark/article.
-
ATTRIBUTES
= ['bookmark_id', 'title', 'description', 'hash', 'url', 'progress_timestamp', 'time', 'progress', 'starred', 'type', 'private_source']¶
-
RESOURCE
= 'bookmarks'¶
-
RESOURCE_ID_ATTRIBUTE
= 'bookmark_id'¶
-
SIMPLE_ACTIONS
= ['delete', 'star', 'archive', 'unarchive', 'get_text']¶
-
TIMESTAMP_ATTRS
= ['progress_timestamp', 'time']¶
-
-
class
pyinstapaper.instapaper.
Folder
(client, **data)[source]¶ Bases:
pyinstapaper.instapaper.InstapaperObject
Object representing an Instapaper folder.
-
ATTRIBUTES
= ['folder_id', 'title', 'display_title', 'sync_to_mobile', 'folder_id', 'position', 'type', 'slug']¶
-
RESOURCE
= 'folders'¶
-
RESOURCE_ID_ATTRIBUTE
= 'folder_id'¶
-
SIMPLE_ACTIONS
= ['delete']¶
-
-
class
pyinstapaper.instapaper.
Highlight
(client, **data)[source]¶ Bases:
pyinstapaper.instapaper.InstapaperObject
Object representing an Instapaper highlight.
-
ATTRIBUTES
= ['highlight_id', 'text', 'note', 'time', 'position', 'bookmark_id', 'type', 'slug']¶
-
RESOURCE
= 'highlights'¶
-
RESOURCE_ID_ATTRIBUTE
= 'highlight_id'¶
-
SIMPLE_ACTIONS
= ['delete']¶
-
TIMESTAMP_ATTRS
= ['time']¶
-
-
class
pyinstapaper.instapaper.
Instapaper
(oauth_key, oauth_secret)[source]¶ Bases:
object
Instapaper client class.
Parameters: - str (oauth_secret) – Instapaper OAuth consumer key
- str – Instapaper OAuth consumer secret
-
get_bookmarks
(folder='unread', limit=25, have=None)[source]¶ Return list of user’s bookmarks.
Parameters: - folder (str) – Optional. Possible values are unread (default), starred, archive, or a folder_id value.
- limit (int) – Optional. A number between 1 and 500, default 25.
- have (list) – Optional. A list of IDs to exclude from results
Returns: List of user’s bookmarks
Return type: list
-
login
(username, password)[source]¶ Authenticate using XAuth variant of OAuth.
Parameters: - username (str) – Username or email address for the relevant account
- password (str) – Password for the account
-
request
(path, params=None, returns_json=True, method='POST', api_version='1')[source]¶ Process a request using the OAuth client’s request method.
Parameters: - path (str) – Path fragment to the API endpoint, e.g. “resource/ID”
- params (dict) – Parameters to pass to request
- method (str) – Optional HTTP method, normally POST for Instapaper
- api_version (str) – Optional alternative API version
Returns: response headers and body
Retval: dict
Module contents¶
Top-level package for PyInstapaper.