Created
January 16, 2019 04:38
-
-
Save gkatsev/24009cb938f41e58517431a22579cfe9 to your computer and use it in GitHub Desktop.
Get item count in getpocket.com by piggy backing on their cookie.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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