You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an endpoint that retrieves the number of each objects by type:
In api/v1/views/index.py
Route: /api/v1/stats
You must use the newly added count() method from storage
guillaume@ubuntu:/AirBnB_v3$ curl -X GET http://0.0.0.0:5000/api/v1/stats
{
"amenities": 47,
"cities": 36,
"places": 154,
"reviews": 718,
"states": 27,
"users": 31
}
guillaume@ubuntu:/AirBnB_v3$
(No need to have a pretty rendered output, it’s a JSON, only the structure is important)
The text was updated successfully, but these errors were encountered:
Create an endpoint that retrieves the number of each objects by type:
In api/v1/views/index.py
Route: /api/v1/stats
You must use the newly added count() method from storage
guillaume@ubuntu:
/AirBnB_v3$ curl -X GET http://0.0.0.0:5000/api/v1/stats/AirBnB_v3${
"amenities": 47,
"cities": 36,
"places": 154,
"reviews": 718,
"states": 27,
"users": 31
}
guillaume@ubuntu:
(No need to have a pretty rendered output, it’s a JSON, only the structure is important)
The text was updated successfully, but these errors were encountered: