Skip to content

Instantly share code, notes, and snippets.

@gkatsev
Created January 16, 2019 04:38
Show Gist options
  • Save gkatsev/24009cb938f41e58517431a22579cfe9 to your computer and use it in GitHub Desktop.
Save gkatsev/24009cb938f41e58517431a22579cfe9 to your computer and use it in GitHub Desktop.
Get item count in getpocket.com by piggy backing on their cookie.
fetch('https://getpocket.com/v3/get?enable_cors=1&consumer_key=78809-9423d8c743a58f62b23ee85c', {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
"detailType": "simple",
"since": "1318881176"
})
}).then((res) => res.json())
.then((data) => {
console.log(data);
console.log(Object.entries(data.list).length);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment