Skip to content

Commit

Permalink
Bump Release zu 0.6 in Doku, Endpoint /me in Doku ergänzt
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 13, 2016
1 parent fef503f commit 2e1cbff
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/pages/api/api_oauth2.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Wenn bei der Anfrage nach dem Access-Token ein Fehler auftritt (z.B. weil das Re
POST https://youthweb.net/auth/token
Content-Header: application/vnd.api+json
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
{
"meta": {
Expand All @@ -144,7 +144,7 @@ Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.ver
200 OK
Content-Header: application/vnd.api+json
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
{
"meta": {
Expand All @@ -163,7 +163,7 @@ Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.ver
GET https://api.youthweb.net/users/123456
Content-Header: application/vnd.api+json
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTgyMzE2MDAsImlzcyI6IkpOdlBnY3ROcEg1Y0s2UmMifQ.BOn0XFDDYa5iBHJb636A0C0m4sU5NO8SA_CPOVHoWNs
```
Expand Down
12 changes: 6 additions & 6 deletions docs/pages/api/api_resource_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ folder: api

```
GET https://api.youthweb.net/stats/account
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
```

**Response**

```
Status: 200 OK
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
{
Expand All @@ -49,15 +49,15 @@ Content-Type: application/vnd.api+json

```
GET https://api.youthweb.net/stats/forum
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
```

**Response**

```
Status: 200 OK
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
{
Expand All @@ -79,15 +79,15 @@ Content-Type: application/vnd.api+json

```
GET https://api.youthweb.net/stats/groups
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
```

**Response**

```
Status: 200 OK
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
{
Expand Down
53 changes: 50 additions & 3 deletions docs/pages/api/api_resource_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,60 @@ permalink: api_resource_users.html
folder: api
---

## Beispiel
## Beispiele

### Beispiel 1: Daten zu User-ID 123456 anfragen

**Request**

```
GET https://api.youthweb.net/users/123456
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTgyMzE2MDAsImlzcyI6IkpOdlBnY3ROcEg1Y0s2UmMifQ.BOn0XFDDYa5iBHJb636A0C0m4sU5NO8SA_CPOVHoWNs
```

**Response**

```
Status: 200 OK
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
{
"data": {
"type": "users",
"id": "123456",
"attributes": {
"username": "JohnSmith",
"first_name": "John",
"last_name": "Smith",
"email": "john_smith@example.org",
"birthday": "1988-03-05",
"created_at": "2006-01-01T21:00:00+01:00",
"last_login": "2016-01-01T22:00:00+02:00",
"zip": "12345",
"city": "Jamestown",
"description_jesus": "Lorem ipsum dolor sit amet",
"description_job": "Lorem ipsum dolor sit amet",
"description_hobbies": "Lorem ipsum dolor sit amet",
"description_motto": "Lorem ipsum dolor sit amet",
"picture_thumb_url": "https://youthweb.net/img/steckbriefe/default_pic_m.jpg",
"picture_url": "https://youthweb.net/img/steckbriefe/default_pic_m.jpg"
}
}
}
```

### Beispiel 2: Daten zum autorisierten User anfragen

Fragt die Userdaten des autorisierten Users ab. Dies ist ein Shortcut für /users/{user_id}, wenn die User-ID des autorisierten Users nicht bekannt ist.

**Request**

```
GET https://api.youthweb.net/users/123456
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTgyMzE2MDAsImlzcyI6IkpOdlBnY3ROcEg1Y0s2UmMifQ.BOn0XFDDYa5iBHJb636A0C0m4sU5NO8SA_CPOVHoWNs
```
Expand All @@ -23,7 +70,7 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTgyMzE2M

```
Status: 200 OK
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5
Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6
Content-Type: application/vnd.api+json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api/api_versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ folder: api

Die API wird immer weiter entwickelt und der aktuelle Stand wird hier festgehalten. Die Änderungen an der API werden während der Entwicklung nicht immer abwärtskompatibel sein, weswegen wir [eine Versionierung](http://semver.org/) eingeführt haben. Die angefragte Version MUSS im Request-Header angegeben werden:

`Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.5`
`Accept: application/vnd.api+json, application/vnd.api+json; net.youthweb.api.version=0.6`

### Unterstützte Versionen

Expand Down

0 comments on commit 2e1cbff

Please sign in to comment.