Install following CLI tools:
-
$ npm install apiary-blueprint-parser
Install following CLI tools:
$ npm install apiary-blueprint-parser
$ git config --global core.editor "subl -n -w"
Question: Affordances or web link relations for modeling your API?
I have been pondering this question a lot lately. Given a resource and its attributes (semantic descriptors), would you model the API using the link / relations or resource affordances? May one relation as defined by RFC5988 Web Linking imply multiple affordances? For example does the edit
relation represents three affordances (retrieve, update, and delete)?
Is (should?) the perspective affordances vs. relations differ based on the point of view (API design, client, server).
Most of the hypermedia media types such as HAL, Collection+JSON and JSON API are built around link relations. Seems that on
express = require 'express' | |
app = express() | |
PORT = 1234 | |
app.get '/machines', (req, res) -> | |
res.setHeader 'Content-Type', 'application/json' | |
machine = | |
type: 'bulldozer' | |
name: 'willy' |
#include <string> | |
#include <vector> | |
#include <regex> | |
enum MarkdownNodeType { | |
RootMarkdownNodeType = 0, | |
HeaderMarkdownNodeType, | |
ListItemMarkdownNodeType, | |
ParagraphMarkdownNodeType, | |
UndefinedMarkdownNodeType = -1 |
FORMAT: 1A | |
# Gist Fox API | |
Gist Fox API is a **pastes service** similar to [GitHub's Gist](http://gist.github.com). | |
## Authentication | |
*Gist Fox API* uses OAuth Authorization. First you create a new (or acquire existing) OAuth token using Basic Authentication. After you have acquired your token you can use it to access other resources within token' scope. | |
## Media Types | |
Where applicable this API uses the [HAL+JSON](https://github.com/mikekelly/hal_specification/blob/master/hal_specification.md) media-type to represent resources states and affordances. |
#!/bin/bash | |
echo -n "GitHub User: " | |
read USER | |
echo -n "GitHub Password: " | |
read -s PASS | |
echo "" | |
echo -n "GitHub Repo (e.g. foo/bar): " |