Scott Zhu
Scott Zhu

Reputation: 8441

GitHub API returned Url meaning

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

Answers (1)

VonC
VonC

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.

Upvotes: 1

Related Questions