cleaned more date code, setup testing for stats, renamed plugin and info

cleaned more date code, setup testing for stats, renamed plugin and info
This commit is contained in:
ransurf 2021-10-12 19:48:33 -07:00
parent 0e6751f093
commit f77466b8a2
5 changed files with 45 additions and 12 deletions

View file

@ -14,3 +14,19 @@ export async function getTasks(username: string, credentials: string){
})
return (response)
}
export async function getStats(username: string, credentials: string){
const url = "https://habitica.com/export/userdata.json"
const response = fetch(url, {
method: 'GET',
headers: {
"Content-Type": "application/json",
"x-client": username.concat("-testAPI"),
"x-api-user": username,
"x-api-key": credentials,
},
})
console.log(response)
console.log("stats above")
return (response)
}