匹配符号的 API 样式是什么意思?

What's mean of the API style that matching symbols?

API url中的特殊匹配符号 eg: {?name} , {/other_user}

如何与客户打交道?

为什么要用它?

参考:

https://api.github.com/repos/boot2docker/boot2docker/releases

示例:

{
"upload_url": "https://uploads.github.com/repos/boot2docker/boot2docker/releases/1161957/assets{?name}", 
"id": 1161957,
"tag_name": "v1.6.0",
"author": {
    "following_url": "https://api.github.com/users/tianon/following{/other_user}",
    "gists_url": "https://api.github.com/users/tianon/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/tianon/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/tianon/subscriptions",
    "organizations_url": "https://api.github.com/users/tianon/orgs",
    "repos_url": "https://api.github.com/users/tianon/repos",
    "events_url": "https://api.github.com/users/tianon/events{/privacy}",
}
}

它们 URI templates. The GitHub API documentation 包括展示使用这些模板的好处的示例。

GitHub API 文档使用 Ruby uri_template library in its examples. While uri_template is a Ruby gem, you can find URI template libraries for most popular programming languages. This wiki(或快速 Google 搜索)可能会帮助您找到一个 URI 模板库您选择的语言。