library-rpc

Create a new author.

RPCauthors.create

Creates an author with no books linked yet. Books are linked to it via books.create.

Servers

•mock: https://mock.api.selfdochub.com/rpc

Parameters

NameInTypeRequiredDescription
nameparamsstringyesThe author's full name. Must not be blank.
bioparamsstringA short biography of the author. Optional.

Responses

result The author that was created.

application/json

FieldTypeRequiredDescription
biostringyesA short biography of the author.
bookIdsarray of stringyesIds of the books this author has written.
idstringyesUnique identifier assigned by the server, prefixed with au_.
namestringyesThe author's full name.

Errors

CodeMessageDescription
-32602Invalid 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"
  }
}