7. APIドキュメントは書くことが多い ● Host ● Path ● HTTPメソッド(GET, POST, PUT, DELETE, ...) ● Request Header, Body ● Query Parameter ● Response Status Code ● Respose Header, Body ● Authrozation, Authentication ● etc...
API(とそれに携わる開発者)の規模が拡大してくると、ドキュメントの整備や、仕様と実装の一貫性の維持、 クライアントとの知識の共有など、考慮すべき問題が沢山出てくる。 これらの問題に対する現実的な解決策を探るため、 ApiaryというAPI開発支援用のサービスを簡単に俯瞰することにした。 ここでは紹介しないが、他に RAML、 JSON Schema、 Swagger、 WADL、 Autodoc などが関連するものとして挙げられる。 Apiary http://apiary.io/ Apiaryは、API Blueprintと呼ばれる言語でAPIのインターフェース仕様書を記述する、という開発方法を提唱している。 API BlueprintはMarkdownを拡張した言語で、特殊な記述を用いて幾つかのメタ情報を付与出来る形になっている。 Markdownを採用することで人間にとって読み書き
markdownといえば各種言語に実装されていますが、GitHubがWeb API形式で変換ツールを出しているようなので遊んでみました。このAPIを通すと、markdownテキストがHTMLに変換されます。 JSONPで使える奴と、RESTっぽくmarkdownなテキスト自体をPOSTするとHTMLの断片が返ってくるraw APIの2つがあります。 利用上限は一時間あたり5000回と太っ腹。 とりあえず、PHP版:http://tojiru.net/markdown.php <?php if (isset($_POST['markdown'])) { $origin = $_POST['markdown']; $ch = curl_init('https://api.github.com/markdown/raw'); curl_setopt($ch, CURLOPT_RETURNTRAN
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く