Last active
August 29, 2015 13:56
-
-
Save morganney/9080063 to your computer and use it in GitHub Desktop.
Hypertext links example for a restbus API agency resource.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // ... San Francisco Muni agency resource ... | |
| _links: { | |
| self: { | |
| href: "http://localhost:3535/agencies/sf-muni", | |
| type: "application/json", | |
| rel: "self", | |
| rt: "agency", | |
| title: "Transit agency 'sf-muni'." | |
| }, | |
| to: [ | |
| { | |
| href: "http://localhost:3535/agencies/sf-muni/routes", | |
| type: "application/json", | |
| rel: "describedby", | |
| rt: "route", | |
| title: "A collection of routes for transit agency 'sf-muni'." | |
| }, | |
| { | |
| href: "http://localhost:3535/agencies/sf-muni/vehicles", | |
| type: "application/json", | |
| rel: "describedby", | |
| rt: "vehicle", | |
| title: "A collection of vehicles for transit agency 'sf-muni'." | |
| } | |
| ], | |
| from: [ | |
| { | |
| href: "http://localhost:3535/agencies", | |
| type: "application/json", | |
| rel: "bookmark", | |
| rt: "agency", | |
| title: "A collection of transit agencies. This is the API root!" | |
| } | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment