rat1borik / flask-api-users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flask-api-users

All queries available with ThunderClient extension for VSCode by importing from file https://github.com/rat1borik/flask-api-users/blob/master/thunder-collection_flask-api-example.json

Users API

User Adding

POST 127.0.0.1:3005/api/users

{
  "username":"y.rybnikov1934",
  "password":"shizofaziya332",
  "birthdate":"1934-12-31",
  "status":"online",
  "email":"shiza@aye.com"
}

image

Status: 200 OK Size: 24 Bytes Time: 21 ms

[
  {
    "id": 2
  }
]
  • User Adding exception

image

User Modifying

PUT 127.0.0.1:3005/api/users/2

{
    "status":"busy"
}

image

Status: 200 OK Size: 10 Bytes Time: 9 ms

successful

  • User Modifying exception

image

User Deleting

DELETE 127.0.0.1:3005/api/users/1

image

Status: 200 OK Size: 10 Bytes Time: 7 ms

successful

  • User Deleting exception

image

Users Viewing

GET 127.0.0.1:3005/api/users

image

Status: 200 OK Size: 226 Bytes Time: 11 ms

[
  {
    "birthdate": "1934-12-31",
    "dt": "2022-12-02 11:02:47",
    "email": "shiza@aye.com",
    "id": 2,
    "password": "93cf9e2a0644bb4a79c2c9e8cf04289d",
    "status": "busy",
    "username": "y.rybnikov1934"
  }
]

User Viewing

GET 127.0.0.1:3005/api/users

{
  "id":2
}

image

Status: 200 OK Size: 226 Bytes Time: 5 ms

[
  {
    "birthdate": "1934-12-31",
    "dt": "2022-12-02 11:02:47",
    "email": "shiza@aye.com",
    "id": 2,
    "password": "93cf9e2a0644bb4a79c2c9e8cf04289d",
    "status": "busy",
    "username": "y.rybnikov1934"
  }
]

User Authentification

POST 127.0.0.1:3005/api/users/auth

{
  "username":"y.rybnikov1934",
  "password":"shizofaziya332"
}

image

Status: 200 OK Size: 10 Bytes Time: 9 ms

successful

  • User Authentification exception

image

Music API

Music Adding

POST 127.0.0.1:3005/api/music

{
  "title":"Tp na ame",
    "artist":"SEREGA PIRAT OFFICIAL",
     "releaseDate":"2019-12-05",
     "album":"SomethingSheet"
}

image

Status: 200 OK Size: 24 Bytes Time: 8 ms

[
  {
    "id": 4
  }
]

Music Modifying

PUT 127.0.0.1:3005/api/music/4

{
  "album":"World`s Classical Masterpieces"
}

image

Status: 200 OK Size: 10 Bytes Time: 13 ms

successful

Musics Viewing

GET 127.0.0.1:3005/api/music

image

Status: 200 OK Size: 227 Bytes Time: 10 ms

[
  {
    "album": "World`s Classical Masterpieces",
    "artist": "SEREGA PIRAT OFFICIAL",
    "dt": "2022-12-02 11:08:22",
    "id": 4,
    "listen_amount": 0,
    "release_date": "2019-12-05",
    "title": "Tp na ame"
  }
]

Music Viewing

GET 127.0.0.1:3005/api/music

{
  "id":4
}

image

Status: 200 OK Size: 227 Bytes Time: 5 ms

[
  {
    "album": "World`s Classical Masterpieces",
    "artist": "SEREGA PIRAT OFFICIAL",
    "dt": "2022-12-02 11:08:22",
    "id": 4,
    "listen_amount": 0,
    "release_date": "2019-12-05",
    "title": "Tp na ame"
  }
]

Music Deleting

DELETE 127.0.0.1:3005/api/music/4

image

Status: 200 OK Size: 10 Bytes Time: 13 ms

successful

Musing Listening

POST 127.0.0.1:3005/api/music/listen

{
  "data":"tp%SEREGA"
}

image

Status: 200 OK Size: 18 Bytes Time: 13 ms

Mmm... Sounds nice

Extra

I am Teapot

GET 127.0.0.1:3005/api/iamteapot

image

Status: 418 I'M A TEAPOT Size: 14 Bytes Time: 4 ms

Enjoy your tea

About


Languages

Language:Python 100.0%