Reputation: 8441
Take this very simple API as example,
https://api.github.com/users/zhuhuihuihui
In the JSON formatted response, you'll find something like following,
"following_url":"https://api.github.com/users/zhuhuihuihui/following
{/other_user}
",
"gists_url": "https://api.github.com/users/zhuhuihuihui/gists
{/gist_id}
",
"starred_url": "https://api.github.com/users/zhuhuihuihui/starred
{/owner}{/repo}"
,
Ok, I know like the following_url
, starred_url
is something like a sub API which you can call to fetch who that user are following, or what repos that user has starred.
But, what does those braces mean? The one I've made it Bold. How do I use them?
Upvotes: 1
Views: 329
Reputation: 1323773
Those are placeholders value, that you would need to replace by an actual value in order to use those links.
It serves to remind a user how to access, for instance, the following_url for another user.
without {/other_user}
, that url https://api.github.com/users/zhuhuihuihui/following would list all users followed.
with {/other_user}
, that url https://api.github.com/users/zhuhuihuihui/following/xxx would check if you follow user xxx
.
Upvotes: 1