Update API.md

This commit is contained in:
AJ ONeal 2017-08-02 17:43:28 -06:00
parent f697878040
commit 25df88e297
1 changed files with 15 additions and 4 deletions

19
API.md
View File

@ -45,8 +45,13 @@ This file tells us where example.com publishes packages that adhere to the `waln
or if walnut were not protected by trademark and another company were to create a similar, but incompatible package or if walnut were not protected by trademark and another company were to create a similar, but incompatible package
system for it, it would be `walnut.go@acme.co` or some such) system for it, it would be `walnut.go@acme.co` or some such)
For publishers with a long list of packages you might find a URL using the template variable `:package_name` to describe For publishers with a long list of packages you might find a URL to describe
where more information about a package can be found: where more information about a package can be found.
Template variables
```
:package_name
```
```json ```json
{ "package_url": "https://packages.example.com/indexes/:package_name.json" { "package_url": "https://packages.example.com/indexes/:package_name.json"
@ -54,8 +59,14 @@ where more information about a package can be found:
} }
``` ```
For publishers with a short list of packages you might find that all of the packages are listed directly, For publishers with a short list of packages you might find that all of the packages are listed directly.
using the template variables `:package_name`, `:package_version`, `:payment_token`.
Template variables
```
:package_name
:package_version
:payment_token
```
```json ```json
{ "package_url": null { "package_url": null