Dostępne endpointy - 22-04-80/bai-daily-expense-organiser GitHub Wiki
Adres: https://my.api.mockaroo.com
Wymagany header: "X-API-Key: <api_key>"
Przykład dla CURLa
: curl -H "X-API-Key: <api_key>" https://my.api.mockaroo.com/categories
Jak lokalnie dodać klucz API Mockaroo?
Żaden GET
nie wymaga przesłania żadnych dodatkowych danych (nie licząc klucza do API). Metody POST
powinny zawierać określone ciało zapytania ale nie jest to w żaden sposób walidowane czyli jak wykonamy zapytanie bez określonego ciała to zapytanie i tak się powiedzie.
-
GET /"categories"
Zwraca:
["fish", "drink", "alcohol", "dairy", "meat", "vegetables", "syrup", "sweets"]
-
GET /"products"
Zwraca:
[
{
"name": "Wine - Red, Pelee Island Merlot",
"price": 15.72,
"category": "alcohol"
},
{
"name": "Cod - Fillets",
"price": 2.49,
"category": "fish"
},
{
"name": "Tea - Darjeeling, Azzura",
"price": 8.56,
"category": "drink"
},
{
"name": "Wine - Bourgogne 2002, La",
"price": 11.89,
"category": "alcohol"
},
{
"name": "Grenadine",
"price": 7.55,
"category": "syrup"
},
{
"name": "Wine - Tio Pepe Sherry Fino",
"price": 2.37,
"category": "alcohol"
},
{
"name": "Wine - Cotes Du Rhone",
"price": 5.9,
"category": "alcohol"
},
{
"name": "Cheese - Mascarpone",
"price": 13.66,
"category": "dairy"
},
{
"name": "Seaweed Green Sheets",
"price": 15.08,
"category": "vegetables"
},
{
"name": "Edible Flower",
"price": 6.31,
"category": "fish"
}
]
-
GET /shopping_lists
Zwraca:
[
{
"list_name": "Casual",
"created_at": 1617991710,
"products":
[
{
"name": "Wine - Red, Pelee Island Merlot",
"price": 15.72,
"category": "alcohol",
"quantity": 4
},
{
"name": "Cod - Fillets",
"price": 2.49,
"category": "fish",
"quantity": 2
}
]
},
{
"list_name": "Party",
"created_at": 1618078944,
"products":
[
{
"name": "Cheese - Mascarpone",
"price": 13.66,
"category": "dairy",
"quantity": 1
},
{
"name": "Edible Flower",
"price": 6.31,
"category": "fish",
"quantity": 2
}
]
},
{
"list_name": "Everyday",
"created_at": 1618165344,
"products":
[
{
"name": "Tea - Darjeeling, Azzura",
"price": 8.56,
"category": "drink",
"quantity": 1
},
{
"name": "Grenadine",
"price": 7.55,
"category": "syrup",
"quantity": 2
}
]
}
]
-
GET /shops
Zwraca:
[
{
"name": "Ernser LLC",
"address": "1 Dexter Terrace",
"category": "sweets"
},
{
"name": "Sporer-Kub",
"address": "4342 Hanover Court",
"category": "alcohol"
},
{
"name": "Frami Group",
"address": "1 Manley Way",
"category": "sweets"
},
{
"name": "Boyer, Heathcote and Durgan",
"address": "809 Maple Wood Alley",
"category": "sweets"
},
{
"name": "Pacocha, Braun and Deckow",
"address": "89102 Arizona Avenue",
"category": "alcohol"
},
{
"name": "Fay, Kemmer and Schimmel",
"address": "942 Graceland Avenue",
"category": "fish"
},
{
"name": "Morar-Hickle",
"address": "88 Alpine Center",
"category": "sweets"
},
{
"name": "Miller Inc",
"address": "52211 Milwaukee Alley",
"category": "alcohol"
},
{
"name": "Kshlerin LLC",
"address": "1128 Stone Corner Crossing",
"category": "alcohol"
},
{
"name": "Hoeger-Tromp",
"address": "0784 Milwaukee Drive",
"category": "vegetables"
},
{
"name": "Waelchi and Sons",
"address": "6 Fair Oaks Hill",
"category": "dairy"
},
{
"name": "Gulgowski Group",
"address": "6702 Texas Street",
"category": "dairy"
},
{
"name": "Halvorson-Grant",
"address": "2693 Service Plaza",
"category": "vegetables"
},
{
"name": "Bauch, Hilpert and Kshlerin",
"address": "6901 Iowa Plaza",
"category": "drink"
},
{
"name": "Rosenbaum-Schinner",
"address": "9123 Lakewood Junction",
"category": "vegetables"
},
{
"name": "Kiehn-Kris",
"address": "52577 Charing Cross Street",
"category": "meat"
},
{
"name": "Zboncak, Rath and Murazik",
"address": "3 Nelson Road",
"category": "vegetables"
},
{
"name": "Kozey, Breitenberg and Schinner",
"address": "033 Magdeline Parkway",
"category": "alcohol"
},
{
"name": "Keebler, Jacobs and Koepp",
"address": "041 Fair Oaks Drive",
"category": "dairy"
},
{
"name": "Macejkovic, Parker and Pfeffer",
"address": "8 Clove Parkway",
"category": "alcohol"
},
{
"name": "Barrows-Stamm",
"address": "2 Thierer Center",
"category": "drink"
},
{
"name": "Cronin-Hilpert",
"address": "2 Packers Pass",
"category": "syrup"
},
{
"name": "Hackett and Sons",
"address": "90937 Aberg Center",
"category": "drink"
},
{
"name": "Sporer, Heidenreich and Douglas",
"address": "3783 Mariners Cove Avenue",
"category": "alcohol"
},
{
"name": "Johnston, Treutel and Leannon",
"address": "5 Carey Circle",
"category": "drink"
},
{
"name": "Sauer, Dickinson and Balistreri",
"address": "890 Straubel Road",
"category": "alcohol"
},
{
"name": "Metz-Pfannerstill",
"address": "74130 Village Green Point",
"category": "fish"
},
{
"name": "Shields and Sons",
"address": "2828 Iowa Crossing",
"category": "dairy"
},
{
"name": "Robel-Lakin",
"address": "522 Union Trail",
"category": "fish"
},
{
"name": "Rice, Morissette and Weissnat",
"address": "474 Carey Park",
"category": "sweets"
}
]
-
POST /product
Oczekuje ciała:
{
"name": string,
"price": float,
"category": string
}
-
POST /shopping_list
Oczekuje ciała:
{
"list_name": string,
"created_at": int,
"products":
[
{
"name": string,
"price": float,
"category": string,
"quantity": int
}
]
}