mirror of
https://github.com/go-shiori/shiori.git
synced 2025-09-09 06:26:31 +08:00
248 lines
5.4 KiB
YAML
248 lines
5.4 KiB
YAML
definitions:
|
|
api_v1.loginRequestPayload:
|
|
properties:
|
|
password:
|
|
type: string
|
|
remember_me:
|
|
type: boolean
|
|
username:
|
|
type: string
|
|
required:
|
|
- password
|
|
- username
|
|
type: object
|
|
api_v1.loginResponseMessage:
|
|
properties:
|
|
expires:
|
|
description: Deprecated, used only for legacy APIs
|
|
type: integer
|
|
session:
|
|
description: Deprecated, used only for legacy APIs
|
|
type: string
|
|
token:
|
|
type: string
|
|
type: object
|
|
api_v1.settingRequestPayload:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/model.UserConfig'
|
|
type: object
|
|
api_v1.updateCachePayload:
|
|
properties:
|
|
create_archive:
|
|
type: boolean
|
|
create_ebook:
|
|
type: boolean
|
|
ids:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
keep_metadata:
|
|
type: boolean
|
|
skip_exist:
|
|
type: boolean
|
|
required:
|
|
- ids
|
|
type: object
|
|
model.Account:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/model.UserConfig'
|
|
id:
|
|
type: integer
|
|
owner:
|
|
type: boolean
|
|
password:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
model.Bookmark:
|
|
properties:
|
|
author:
|
|
type: string
|
|
create_archive:
|
|
type: boolean
|
|
create_ebook:
|
|
type: boolean
|
|
excerpt:
|
|
type: string
|
|
hasArchive:
|
|
type: boolean
|
|
hasContent:
|
|
type: boolean
|
|
hasEbook:
|
|
type: boolean
|
|
html:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
imageURL:
|
|
type: string
|
|
modified:
|
|
type: string
|
|
public:
|
|
type: integer
|
|
tags:
|
|
items:
|
|
$ref: '#/definitions/model.Tag'
|
|
type: array
|
|
title:
|
|
type: string
|
|
url:
|
|
type: string
|
|
type: object
|
|
model.Tag:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
nBookmarks:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
type: object
|
|
model.UserConfig:
|
|
properties:
|
|
CreateEbook:
|
|
type: boolean
|
|
HideExcerpt:
|
|
type: boolean
|
|
HideThumbnail:
|
|
type: boolean
|
|
KeepMetadata:
|
|
type: boolean
|
|
ListMode:
|
|
type: boolean
|
|
MakePublic:
|
|
type: boolean
|
|
NightMode:
|
|
type: boolean
|
|
ShowId:
|
|
type: boolean
|
|
UseArchive:
|
|
type: boolean
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
paths:
|
|
/api/v1/auth/account:
|
|
patch:
|
|
parameters:
|
|
- description: Config data
|
|
in: body
|
|
name: payload
|
|
schema:
|
|
$ref: '#/definitions/api_v1.settingRequestPayload'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/model.Account'
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: Perform actions on the currently logged-in user.
|
|
tags:
|
|
- Auth
|
|
/api/v1/auth/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Login data
|
|
in: body
|
|
name: payload
|
|
schema:
|
|
$ref: '#/definitions/api_v1.loginRequestPayload'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Login successful
|
|
schema:
|
|
$ref: '#/definitions/api_v1.loginResponseMessage'
|
|
"400":
|
|
description: Invalid login data
|
|
summary: Login to an account using username and password
|
|
tags:
|
|
- Auth
|
|
/api/v1/auth/me:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/model.Account'
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: Get information for the current logged in user
|
|
tags:
|
|
- Auth
|
|
/api/v1/auth/refresh:
|
|
post:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Refresh successful
|
|
schema:
|
|
$ref: '#/definitions/api_v1.loginResponseMessage'
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: Refresh a token for an account
|
|
tags:
|
|
- Auth
|
|
/api/v1/bookmarks/cache:
|
|
put:
|
|
parameters:
|
|
- description: Update Cache Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/api_v1.updateCachePayload'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/model.Bookmark'
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: Update Cache and Ebook on server.
|
|
tags:
|
|
- Auth
|
|
/api/v1/tags:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: List of tags
|
|
schema:
|
|
$ref: '#/definitions/model.Tag'
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: List tags
|
|
tags:
|
|
- Tags
|
|
post:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Created tag
|
|
schema:
|
|
$ref: '#/definitions/model.Tag'
|
|
"400":
|
|
description: Token not provided/invalid
|
|
"403":
|
|
description: Token not provided/invalid
|
|
summary: Create tag
|
|
tags:
|
|
- Tags
|
|
swagger: "2.0"
|