Public
Documentation Settings

Restaurants

Introduction

A little test with aiohttp, aiopg, and postgresql

GETRetrieve all restaurants

http://127.0.0.1:8080/restaurants

GETRetrieve restaurant by name

http://127.0.0.1:8080/restaurants/:name
PATH VARIABLES
name

test_one

Name of target restaurant.

GETRetrieve random restaurant

http://127.0.0.1:8080/restaurants?random=true
PARAMS
random

true

Setting random to "true", allows retrieving a random restaurant amongst existing ones.

POSTCreate restaurant

http://127.0.0.1:8080/restaurants
JSON Variables

name
test_one
Created restaurant name.
HEADERS
Content-Type

application/json

Bodyraw
{
	"name": "test_one"
}

PATCHUpdate restaurant

http://127.0.0.1:8080/restaurants/:name
JSON Variables

name
test_one
New restaurant name.
HEADERS
Content-Type

application/json

PATH VARIABLES
name

test_one

Name of target restaurant.

Bodyraw
{
	"name": "new_test_one"
}
Loading