{"id":18665334,"url":"https://github.com/robertklep/node-instapaper","last_synced_at":"2025-04-11T22:31:05.785Z","repository":{"id":33955789,"uuid":"37684902","full_name":"robertklep/node-instapaper","owner":"robertklep","description":"Instapaper API client for Node.js","archived":false,"fork":false,"pushed_at":"2022-01-29T18:08:24.000Z","size":13,"stargazers_count":36,"open_issues_count":1,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-10T01:53:18.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertklep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-18T21:03:37.000Z","updated_at":"2025-02-01T08:18:55.000Z","dependencies_parsed_at":"2022-07-13T21:43:42.252Z","dependency_job_id":null,"html_url":"https://github.com/robertklep/node-instapaper","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-instapaper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-instapaper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-instapaper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertklep%2Fnode-instapaper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertklep","download_url":"https://codeload.github.com/robertklep/node-instapaper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248489547,"owners_count":21112599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T08:27:13.987Z","updated_at":"2025-04-11T22:31:05.430Z","avatar_url":"https://github.com/robertklep.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Instapaper API\n\nNode.js client for the [Instapaper API](https://www.instapaper.com/api/full).\n\nWork in progress!\n\n### Installation\n\n```\n$ npm i instapaper\n```\n\n### Quick example\n\n``` javascript\nvar Instapaper = require('instapaper');\nvar client     = Instapaper(CONSUMER_KEY, CONSUMER_SECRET);\n\nclient.setUserCredentials(USERNAME, PASSWORD);\n\n// Load a list of bookmarks using promises...\nclient.bookmarks.list().then(function(bookmarks) {\n  console.log('%j', bookmarks);\n}).catch(function(err) {\n  console.warn('oh noes', err);\n});\n\n// ...or regular callbacks\nclient.bookmarks.list(function(err, bookmarks) {\n  if (err) return console.warn('oh noes', err);\n  console.log('%j', bookmarks);\n});\n```\n\n### Authentication\n\nThe Instapaper API uses xAuth, which requires that you first register for API usage [here](https://www.instapaper.com/main/request_oauth_consumer_token). When your registration has been approved, you will receive a _\"consumer key\"_ and _\"consumer secret\"_, which you pass to the `Instapaper` constructor (see below).\n\nYou also need either:\n\n- a username and password belonging to the user on whose behalf you want to manage Instapaper;\n- or, an OAuth token and secret from a previous authentication round.\n\n\nYou should never store the username/password locally. Instead, after you've used them to get an OAuth token/secret pair, use those instead.\n\n## Usage:\n\n### Constructor\n\n``` javascript\nvar client = Instapaper(CONSUMER_KEY : String, CONSUMER_SECRET : String[, OPTIONS : Object]);\n```\n\n`OPTIONS` is an optional object that may contain the following properties:\n\n```\napiUrl   : String // Instapaper API URL prefix (default: 'https://www.instapaper.com/api/1')\nlogLevel : String // log level                 (default: 'info')\n```\n\n### Authentication\n\n#### Set user credentials\n\n```\nclient.setUserCredentials(USERNAME : String, PASSWORD : String) : client\n```\n\n#### Set OAuth credentials\n\n```\nclient.setOAuthCredentials(TOKEN : String, SECRET : String) : client\n```\n\n#### Authenticate\n\n```\nclient.authenticate() : Promise\n```\n\nAll regular API methods call this method implicitly. However, if you want to retrieve the OAuth credentials you can use this method to do so:\n\n```\nclient.authenticate().then(function(oauth) {\n  // { token : '...', secret : '...' }\n});\n```\n\n### Verify credentials\n\nThis can be used to verify that authenticating as the user was successful.\n\n```\nclient.verifyCredentials() : Promise\n```\n\n### Bookmarks management\n\n_Please refer to the [API documentation](https://www.instapaper.com/api/full) for valid parameters and response formats._\n\n```\nclient.bookmarks.list(PARAMS)           : Promise\nclient.bookmarks.getText(BOOKMARK_ID)   : Promise\nclient.bookmarks.delete(BOOKMARK_ID)    : Promise\nclient.bookmarks.star(BOOKMARK_ID)      : Promise\nclient.bookmarks.unstar(BOOKMARK_ID)    : Promise\nclient.bookmarks.archive(BOOKMARK_ID)   : Promise\nclient.bookmarks.unarchive(BOOKMARK_ID) : Promise\n```\n\n### Folder management\n\nTBD.\n\n## Terms of use\n\nPlease read the [Instapaper API Terms of Use](https://www.instapaper.com/api/terms) before using this API client.\n\n## AUTHOR\n\nRobert Klep \u003c\u003crobert@klep.name\u003e\u003e\n\n## LICENCE\n\nSee [LICENSE.md](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-instapaper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertklep%2Fnode-instapaper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertklep%2Fnode-instapaper/lists"}