-
Notifications
You must be signed in to change notification settings - Fork 0
Gunucco API
GET /api/v1/server/version
Returns ApiMessage object. Server version is returned as message
property in that object.
Column | Description |
---|---|
Authentication | Not need. |
Scope | - |
Server version | since 0.1.0 |
GET /api/v1/auth/list
Returns array of UserSessionData objects.
Column | Description |
---|---|
Authentication | Requested. |
Scope | ReadUserIdentity |
Server version | since 0.2.0 |
DELETE /api/v1/auth/delete
Parameter | Description |
---|---|
id_hash |
Deleting session hash id |
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | WriteUserDangerousIdentity |
Server version | since 0.2.0 |
POST /api/v1/user/create
Parameter | Description |
---|---|
id |
User text id |
password |
User password |
Returns User object.
This call is enabled in Debug mode only.
Column | Description |
---|---|
Authentication | Not need. |
Scope | - |
Server version | since 0.1.0 |
GET /api/v1/user/{id}
Parameter | Description |
---|---|
id |
User id |
Returns User object.
Column | Description |
---|---|
Authentication | Optional. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/user/{id}/text
Parameter | Description |
---|---|
id |
User text id |
Returns User object.
Column | Description |
---|---|
Authentication | Optional. |
Scope | Read |
Server version | since 0.1.0 |
DELETE /api/v1/user/delete
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | WriteUserDangerousIdentity |
Server version | since 0.1.0 |
POST /api/v1/user/login/idandpassword
Parameter | Description |
---|---|
id |
User text id |
password |
User password |
Returns AuthorizationToken object.
Column | Description |
---|---|
Authentication | Not need. |
Scope | - |
Server version | since 0.1.0 |
GET /api/v1/user/login/oauthcode/create
Parameter | Description |
---|---|
scope |
[[Scope |
Returns OauthCode object.
Column | Description |
---|---|
Authentication | Not need. |
Scope | - |
Server version | since 0.2.0 |
POST /api/v1/user/login/oauthcode
Parameter | Description |
---|---|
code |
Oauth code which user authorized with web client. |
Returns AuthorizationToken object.
Column | Description |
---|---|
Authentication | Not need. |
Scope | - |
Server version | since 0.2.0 |
GET /api/v1/user/{id}/books
Parameter | Description |
---|---|
id |
User id |
Returns array of Book objects.
Column | Description |
---|---|
Authentication | Optional. |
Scope | Read |
Server version | since 0.1.0 |
POST /api/v1/book/create
Parameter | Description |
---|---|
name |
Book name |
Returns Book object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
GET /api/v1/book/{id}
Parameter | Description |
---|---|
id |
Book id |
Returns Book object.
Column | Description |
---|---|
Authentication | Optional. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/book/{id}/chapters
Parameter | Description |
---|---|
id |
Book id |
Returns array of Chapter objects contains not only children but grandson or younger chapters.
Results are sorted, but parent-child relationships are ignored and executed by only with order numbers. To account for parent-child relationships, client has to sort the results.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, list contains user-only or private items. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/book/{id}/chapters/root
Parameter | Description |
---|---|
id |
Book id |
Returns array of Chapter objects contains root chapters only. Results are sorted.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, list contains user-only or private items. |
Scope | Read |
Server version | since 0.1.0 |
DELETE /api/v1/book/delete
Parameter | Description |
---|---|
id |
Book id |
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
POST /api/v1/chapter/create
Parameter | Description |
---|---|
name |
Chapter name |
book_id |
Book id |
parent_chapter_id |
Parent chapter id (optional) |
Returns Chapter object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
GET /api/v1/chapter/{id}
Parameter | Description |
---|---|
id |
Chapter id |
Returns Chapter object.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, you can get user-only or private chapter. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/chapter/{id}/children
Parameter | Description |
---|---|
id |
Parent Chapter id |
Returns array of Chapter objects. Results are sorted.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, list contains user-only or private items. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/chapter/{id}/contents
Parameter | Description |
---|---|
id |
Chapter id |
Returns array of ContentMediaPair objects. Results are sorted.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, you can get contents in private or user-only chapters. |
Scope | Read |
Server version | since 0.1.0 |
PUT /api/v1/chapter/update
Parameter | Description |
---|---|
chapter |
Json string of [[Chapter |
Returns Chapter object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
DELETE /api/v1/chapter/delete
Parameter | Description |
---|---|
id |
Chapter id |
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
POST /api/v1/content/create/text
Parameter | Description |
---|---|
chapter_id |
Parent Chapter id |
text |
Content text |
Returns ContentMediaPair object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
POST /api/v1/content/create/html
Parameter | Description |
---|---|
chapter_id |
Parent Chapter id |
html |
Content html |
Returns ContentMediaPair object.
If IsAllowHtmlContent
property in appsettings.json
is false
, this operation will return an error. The property is false
by default.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.2.0 |
POST /api/v1/content/create/image
Parameter | Description |
---|---|
chapter_id |
Parent Chapter id |
source |
Number of [[MediaSource |
extension |
Which png , jpeg , jpg or gif
|
data |
Media file. If source is self, this parameter is needed |
data_uri |
Media uri. If source is outside, this parameter is needed |
Returns ContentMediaPair object.
If uploading file, need to use multipart/form-data
.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
GET /api/v1/content/{id}
Parameter | Description |
---|---|
id |
Content id |
Returns ContentMediaPair object.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, you can get contents in private or user-only chapters. |
Scope | Read |
Server version | since 0.1.0 |
PUT /api/v1/content/update
Parameter | Description |
---|---|
content |
Json string of [[Content |
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
DELETE /api/v1/content/delete
Parameter | Description |
---|---|
id |
Content id |
Returns ApiMessage object.
Column | Description |
---|---|
Authentication | Requested. |
Scope | Write |
Server version | since 0.1.0 |
GET /api/v1/download/media/{path}
Parameter | Description |
---|---|
path |
Media path |
Returns Media corresponding to its format. Apis to get contents return this uri.
Column | Description |
---|---|
Authentication | Optional. If authenticated and you have permissions, you can get media in private or user-only chapters. |
Scope | Read |
Server version | since 0.1.0 |
GET /api/v1/download/media/{path}/token?token={token}
Parameter | Description |
---|---|
path |
Media path |
token |
Access token |
Returns Media corresponding to its format.
Authenticated apis which getting contents return this uri.
Column | Description |
---|---|
Authentication | - |
Scope | Read |
Server version | since 0.1.0 |