This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
387e986
commit 498096e
Showing
1 changed file
with
90 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
sidebar_position: 6 | ||
title: Settings | ||
tags: | ||
- Settings | ||
- Setting | ||
- Account | ||
--- | ||
|
||
## Endpoints and Methods | ||
|
||
| Endpoints | Methods | Use | | ||
| ---------- | ------- | ------------------------------- | | ||
| /settings/ | GET | Get the Settings of the User | | ||
| /settings/ | PATCH | Change the Settings of the User | | ||
|
||
:::note Why store settings on our servers? | ||
We recommend storing the settings on our servers, as they than can be synced across devices and all applications using our API. | ||
::: | ||
|
||
## GET /settings/ | ||
|
||
### Request | ||
|
||
```js | ||
var axios = require("axios").default; | ||
|
||
var options = { | ||
method: "GET", | ||
url: "https://api.noten-app.de/v2/settings", | ||
headers: { Authorization: "Bearer DFw6zar4QF33Rb6jfp7cQj2UvcrAKgun" }, | ||
}; | ||
|
||
axios | ||
.request(options) | ||
.then(function (response) { | ||
console.log(response.data); | ||
}) | ||
.catch(function (error) { | ||
console.error(error); | ||
}); | ||
``` | ||
|
||
### Response | ||
|
||
```json | ||
{ | ||
"rounding": 1, | ||
"sorting": "average", | ||
"gradesystem": "noten", | ||
"school_year": "a76ak8g8" | ||
} | ||
``` | ||
|
||
## PATCH /grades/settings/ | ||
|
||
### Request | ||
|
||
```js | ||
var axios = require("axios").default; | ||
|
||
var options = { | ||
method: "PATCH", | ||
url: "https://api.noten-app.de/v2/settings", | ||
headers: { Authorization: "Bearer DFw6zar4QF33Rb6jfp7cQj2UvcrAKgun" }, | ||
{ | ||
"rounding": 2, | ||
"sorting": "date", | ||
"gradesystem": "points", | ||
"school_year": "a76ak8g8" | ||
} | ||
}; | ||
|
||
axios | ||
.request(options) | ||
.then(function (response) { | ||
console.log(response.data); | ||
}) | ||
.catch(function (error) { | ||
console.error(error); | ||
}); | ||
``` | ||
|
||
### Response | ||
|
||
```json | ||
{ | ||
"success": true | ||
} | ||
``` |