updated readme with publish response

This commit is contained in:
bill bittner 2018-08-10 15:13:35 -07:00
parent 855eb38203
commit e8a7dd75d2

View file

@ -60,9 +60,13 @@ check out the [customization guide](https://github.com/lbryio/spee.ch/blob/readm
* This is not necessary, but highly reccomended. It will decode the blocks of the `LBRY` blockchain and add the claims information to your database's tables * This is not necessary, but highly reccomended. It will decode the blocks of the `LBRY` blockchain and add the claims information to your database's tables
## API ## API
* _(post)_ /api/claim/publish #### /api/claim/publish (post)
* example: `curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish` example:
* Parameters: ```
curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish
```
Parameters:
* `name` (required) * `name` (required)
* `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png) * `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png)
* `nsfw` (optional) * `nsfw` (optional)
@ -72,16 +76,55 @@ check out the [customization guide](https://github.com/lbryio/spee.ch/blob/readm
* `thumbnail` url to thumbnail image, for .mp4 uploads only (optional) * `thumbnail` url to thumbnail image, for .mp4 uploads only (optional)
* `channelName` channel to publish too (optional) * `channelName` channel to publish too (optional)
* `channelPassword` password for channel to publish too (optional, but required if `channelName` is provided) * `channelPassword` password for channel to publish too (optional, but required if `channelName` is provided)
* _(get)_ /api/claim/resolve/:name/:claimId
* example: `curl https://spee.ch/api/claim/resolve/doitlive/xyz` response:
* _(get)_ /api/claim/list/:name ```
* example: `curl https://spee.ch/api/claim/list/doitlive` {
* _(get)_ /api/claim/availability/:name "success": <bool>,
* returns the name if it is available "message": <string>,
* example: `curl https://spee.ch/api/claim/availability/doitlive` "data": {
* _(get)_ /api/channel/availability/:name "name": <string>,
* returns the name if it is available "claimId": <string>,
* example: `curl https://spee.ch/api/channel/availability/@CoolChannel` "url": <string>,
"showUrl": <string>,
"serveUrl": <string>,
"lbryTx": {
"claim_address": <string>,
"claim_id": <string>,
"fee": <number>,
"nout": <number>,
"tx": <string>,
"value": <number>
}
}
}
```
#### /api/claim/resolve/:name/:claimId (get)
example:
```
curl https://spee.ch/api/claim/resolve/doitlive/xyz
```
#### /api/claim/list/:name (get)
example:
```
curl https://spee.ch/api/claim/list/doitlive
```
#### /api/claim/availability/:name (get)
example:
```
curl https://spee.ch/api/claim/availability/doitlive
```
returns the name if it is available
#### /api/channel/availability/:name (get)
example:
```
curl https://spee.ch/api/channel/availability/@CoolChannel
```
returns the name if it is available
## Contribute ## Contribute