library-rpc
Create a new author.
RPC
authors.createCreates an author with no books linked yet. Books are linked to it via books.create.
Servers
•
mock: https://mock.api.selfdochub.com/rpcParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | params | string | yes | The author's full name. Must not be blank. |
| bio | params | string | A short biography of the author. Optional. |
Responses
result The author that was created.
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| bio | string | yes | A short biography of the author. |
| bookIds | array of string | yes | Ids of the books this author has written. |
| id | string | yes | Unique identifier assigned by the server, prefixed with au_. |
| name | string | yes | The author's full name. |
Errors
| Code | Message | Description |
|---|---|---|
| -32602 | Invalid params |
Request example
{
"id": 1,
"jsonrpc": "2.0",
"method": "authors.create",
"params": {
"bio": "bio_209",
"name": "name_258"
}
}Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"bio": "bio_571",
"bookIds": [
"bookIds_234"
],
"id": "id_625",
"name": "name_223"
}
}