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:
parent
0e6751f093
commit
f77466b8a2
5 changed files with 45 additions and 12 deletions
|
|
@ -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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue