justlog/docs/swagger.yaml
2020-01-26 18:30:45 +01:00

298 lines
7.2 KiB
YAML

basePath: /
definitions:
api.ErrorResponse:
properties:
message:
type: string
type: object
api.RandomQuoteJSON:
properties:
channel:
type: string
displayName:
type: string
message:
type: string
timestamp:
$ref: '#/definitions/api.timestamp'
type: object
username:
type: string
type: object
api.timestamp:
type: object
host: logs.ivr.fi
info:
contact:
email: gempir.dev@gmail.com
name: gempir
url: https://gempir.com
description: API for twitch logs
license:
name: MIT
url: https://github.com/gempir/justlog/blob/master/LICENSE
title: justlog API
version: "1.0"
paths:
/channel/{channel}/user/{username}:
get:
parameters:
- description: channelname
in: path
name: channel
required: true
type: string
- description: username
in: path
name: username
required: true
type: string
- description: unix timestamp, limit logs by timestamps from this point
in: query
name: from
type: integer
- description: unix timestamp, limit logs by timestamps to this point
in: query
name: to
type: integer
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200": {}
"303": {}
"404": {}
"500": {}
summary: Redirect to last logs of user
tags:
- user
/channel/{channel}/user/{username}/{year}/{month}:
get:
parameters:
- description: channelname
in: path
name: channel
required: true
type: string
- description: username
in: path
name: username
required: true
type: string
- description: year of logs
in: path
name: year
required: true
type: string
- description: month of logs
in: path
name: month
required: true
type: string
- description: unix timestamp, limit logs by timestamps from this point
in: query
name: from
type: integer
- description: unix timestamp, limit logs by timestamps to this point
in: query
name: to
type: integer
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200": {}
"500": {}
summary: Get logs for user by year and month
tags:
- user
/channel/{channel}/user/{username}/random:
get:
parameters:
- description: channelname
in: path
name: channel
required: true
type: string
- description: username
in: path
name: username
required: true
type: string
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.RandomQuoteJSON'
summary: Get a random chat message from a user
tags:
- user
/channelid/{channelid}/user/{userid}:
get:
parameters:
- description: twitch userid
in: path
name: channelid
required: true
type: string
- description: twitch userid
in: path
name: userid
required: true
type: string
- description: unix timestamp, limit logs by timestamps from this point
in: query
name: from
type: integer
- description: unix timestamp, limit logs by timestamps to this point
in: query
name: to
type: integer
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200": {}
"303": {}
"404": {}
summary: Redirect to last logs of user
tags:
- user
/channelid/{channelid}/userid/{userid}/{year}/{month}:
get:
parameters:
- description: twitch userid
in: path
name: channelid
required: true
type: string
- description: twitch userid
in: path
name: userid
required: true
type: string
- description: year of logs
in: path
name: year
required: true
type: string
- description: month of logs
in: path
name: month
required: true
type: string
- description: unix timestamp, limit logs by timestamps from this point
in: query
name: from
type: integer
- description: unix timestamp, limit logs by timestamps to this point
in: query
name: to
type: integer
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200": {}
"500": {}
summary: Get logs for user by year and month
tags:
- user
/channelid/{channelid}/userid/{userid}/random:
get:
parameters:
- description: twitch userid
in: path
name: channelid
required: true
type: string
- description: twitch userid
in: path
name: userid
required: true
type: string
- description: response as json
in: query
name: json
type: integer
- description: define response type only json supported currently, rest defaults
to plain
in: query
name: type
type: string
produces:
- application/json
- text/plain
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.RandomQuoteJSON'
summary: Get a random chat message from a user
tags:
- user
/channels:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/api.RandomQuoteJSON'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
summary: Get all joined channels
tags:
- bot
swagger: "2.0"