-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathswagger.yaml
178 lines (178 loc) · 4.9 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
basePath: /v1
definitions:
response.Error:
properties:
code:
type: integer
message:
type: string
type: object
response.InitResponse:
properties:
data:
properties:
settings:
properties:
refreshInterval:
type: integer
type: object
ticker:
properties:
createdAt:
type: string
description:
type: string
domain:
type: string
id:
type: integer
information:
properties:
author:
type: string
email:
type: string
facebook:
type: string
telegram:
type: string
twitter:
type: string
url:
type: string
mastodon:
type: string
status:
type: string
error:
$ref: "#/definitions/response.Error"
response.TimelineResponse:
properties:
data:
properties:
messages:
items:
properties:
id:
type: integer
createdAt:
type: string
text:
type: string
geoInformation:
type: string
attachments:
items:
properties:
url:
type: string
contentType:
type: string
type: array
type: array
status:
type: string
error:
$ref: "#/definitions/response.Error"
response.ErrorResponse:
properties:
data:
type: string
error:
$ref: "#/definitions/response.Error"
status:
type: string
type: object
host: localhost:8080
info:
contact:
email: [email protected]
name: Systemli Admin Team
url: https://www.systemli.org/en/contact/
description:
Service to distribute short messages in support of events, demonstrations,
or other time-sensitive events.
license:
name: GPLv3
url: https://www.gnu.org/licenses/gpl-3.0.html
title: Ticker API
version: "2.0"
paths:
/init:
get:
consumes:
- application/json
description: |-
The first request for retrieving information about the ticker. It is mandatory that the browser sends
the origin as a header. This can be overwritten with a query parameter.
parameters:
- description: Origin from the ticker, e.g. demoticker.org
in: query
name: origin
type: string
- description: Origin from the ticker, e.g. http://demoticker.org
in: header
name: origin
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: "#/definitions/response.InitResponse"
"500":
description: Internal Server Error
schema:
$ref: "#/definitions/response.ErrorResponse"
summary: Retrieves the initial ticker configuration
tags:
- public
/timeline:
get:
consumes:
- application/json
description: |-
Endpoint to retrieve the messages from a ticker. The endpoint has a pagination to fetch newer or older
messages. It is mandatory that the browser sends the origin as a header. This can be overwritten with
a query parameter.
parameters:
- description: Origin from the ticker, e.g. demoticker.org
in: query
name: origin
type: string
- description: Origin from the ticker, e.g. http://demoticker.org
in: header
name: origin
type: string
- description: "Limit for fetched messages, default: 10"
in: query
name: limit
type: integer
- description: ID of the message we look for older entries
in: query
name: before
type: integer
- description: ID of the message we look for newer entries
in: query
name: after
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: "#/definitions/response.TimelineResponse"
"400":
description: Bad Request
schema:
$ref: "#/definitions/response.ErrorResponse"
"500":
description: Internal Server Error
schema:
$ref: "#/definitions/response.ErrorResponse"
summary: Fetch the messages for a ticker.
tags:
- public
swagger: "2.0"