Slide 14
Slide 14 text
SERVICES
CONSUMING THE API
▸ That’s it!
▸ Go to the url
http://localhost:8000/api/v1/posts/?format=json
▸ And you will see this:
{
"meta":{
"limit":20,
"next":null,
"offset":0,
"previous":null,
"total_count":2
},
"objects":
[
{
"id":1,
“title”:”Django is great",
“text”:”Paddy Sucks”,
“author_id”:1,
"resource_uri":"/api/v1/post/1/"
},
{
"id":2,
“name":"Rails is alright",
“text”:”Paddy still sucks”,
“author_id”:1,
"resource_uri":"/api/v1/post/2/"
},
]
}