Created
May 27, 2023 06:38
-
-
Save uwe-schwarz/ddcde8a2432ab14db482039b5b675678 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| javascript:(function(){ | |
| async function getRewards() { | |
| var myHeaders = new Headers(); | |
| myHeaders.append("Authorization", "Bearer " + localStorage['id_token']); | |
| var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' }; | |
| return await fetch("https://api.plutus.it/platform/transactions/pluton", requestOptions) | |
| .then(response => response.json()) | |
| .then(jsonResponse => { return jsonResponse; }) | |
| .catch(err => console.warn(err)); | |
| } | |
| async function getTransactions() { | |
| var myHeaders = new Headers(); | |
| myHeaders.append("Authorization", "Bearer " + localStorage['id_token']); | |
| var requestOptions = { method: 'GET', headers: myHeaders, redirect: 'follow' }; | |
| return await fetch("https://api.plutus.it/platform/transactions/contis", requestOptions) | |
| .then(response => response.json()) | |
| .then(jsonResponse => { return jsonResponse; }) | |
| .catch(err => console.warn(err)); | |
| } | |
| function download(json, filename) { | |
| var downloadLink = document.createElement('a'); | |
| downloadLink.href = 'data:text/json;charset=utf-8,' + encodeURI(JSON.stringify(json)); | |
| downloadLink.download = filename + '.json'; | |
| downloadLink.click(); | |
| } | |
| getRewards().then(response => download(response, "rewards")); | |
| getTransactions().then(response => download(response, "transactions")); | |
| })(); |
Author
Sorry, I gave up on Plutus after the (IMO) disaster with the new cards. I would have gotten my new card sometime last week, but I won't trust a company with my money/expenses when they can't give me correct updates (or any updates at all) if something changes.
Totally understandable.
I only use(d) it for the Perk.
Plus to get the MCC via the API 😆
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you already find the endpoint for the new cards?
as https://api.plutus.it/platform/transactions/contis only shows transactions from the old contis cards but not new modulr