Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule story #352

Open
wants to merge 6 commits into
base: internal
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5985,6 +5985,125 @@ paths:
$ref: './global/error.yaml#/UnProcessableError'
'500':
$ref: './global/error.yaml#/UnexpectedError'
/admin/v1/stories/schedule:
post:
summary: 'schedule a story'
tags:
- 'Admin'
security:
- BearerAuth: []
description: "Schedule a story at specific date/time but the scheduled time need to be within next 1 hour and next 30 days\n"
requestBody:
content:
application/json:
schema:
$ref: './v4/story/request.yaml#/CreateStoryRequestPayload'
responses:
'200':
description: 'ok'
content:
application/json:
schema:
$ref: './v1/admin/schedule_post.yaml#/postRespBody'
'400':
$ref: './global/error.yaml#/BadRequestError'
'422':
$ref: './global/error.yaml#/UnProcessableError'
'500':
$ref: './global/error.yaml#/UnexpectedError'
delete:
summary: 'delete scheduled story'
tags:
- 'Admin'
security:
- BearerAuth: []
description: "Delete scheduled story"
parameters:
- in: query
name: id
required: true
schema:
type: string
description: 'to specify which scheduled story to delete'
responses:
'200':
description: 'ok, not returning any data'
'404':
$ref: './global/error.yaml#/NotFoundError'
'422':
$ref: './global/error.yaml#/UnProcessableError'
'500':
$ref: './global/error.yaml#/UnexpectedError'
get:
summary: 'get scheduled stories'
tags:
- 'Admin'
security:
- BearerAuth: []
description: "Get scheduled stories"
parameters:
- name: 'isPending'
in: 'query'
schema:
type: 'boolean'
default: false
description: 'to get only scheduled stories that not posted yet'
- name: 'sortBy'
in: 'query'
schema:
type: 'string'
enum:
- 'lastCreated'
- 'firstCreated'
default: 'lastCreated'
- name: 'options'
in: 'query'
style: 'deepObject'
schema:
type: 'object'
properties:
limit:
type: 'integer'
minimum: 1
maximum: 100
default: 10
token:
type: 'string'
maxLength: 1000
before:
type: 'string'
maxLength: 24
after:
type: 'string'
maxLength: 24
updatedAt:
type: 'string'
maxLength: 30
- name: 'targetType'
in: 'query'
schema:
type: 'string'
enum:
- 'content'
- 'community'
- 'user'
description: 'target type of scheduled story'
- name: 'targetId'
in: 'query'
schema:
type: 'string'
description: 'target id of scheduled story'
responses:
'200':
description: 'Return all scheduled post informations or only scheduled post that not posted yet'
content:
application/json:
schema:
$ref: './v1/admin/schedule_post.yaml#/getRespBody'
'422':
$ref: './global/error.yaml#/UnProcessableError'
'500':
$ref: './global/error.yaml#/UnexpectedError'
/admin/v1/channels/count:
get:
summary: 'Get channel count'
Expand Down
Loading