Skip to content

Commit ee07e30

Browse files
authored
📝 update API docs (#3015)
1 parent fa586b0 commit ee07e30

File tree

1 file changed

+50
-16
lines changed

1 file changed

+50
-16
lines changed

storage/api-docs/api-docs.json

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"Auth"
106106
],
107107
"summary": "Refresh Bearer Token",
108-
"description": "This request issues a new Bearer-Token with a new expiration date while also revoking the old\r\n * token.",
108+
"description": "This request issues a new Bearer-Token with a new expiration date while also revoking the old\n * token.",
109109
"operationId": "refreshToken",
110110
"responses": {
111111
"200": {
@@ -828,7 +828,7 @@
828828
"Likes"
829829
],
830830
"summary": "[Auth optional] Get likes for status",
831-
"description": "Returns array of users that liked the status. Can return an empty dataset when the status\r\n * author or the requesting user has deactivated likes",
831+
"description": "Returns array of users that liked the status. Can return an empty dataset when the status\n * author or the requesting user has deactivated likes",
832832
"operationId": "getLikesForStatus",
833833
"parameters": [
834834
{
@@ -1572,7 +1572,7 @@
15721572
"Checkin"
15731573
],
15741574
"summary": "Search for stations",
1575-
"description": "UNSTABLE: This request returns an array of max. 20 station objects matching the query. **CAUTION:** All\r\n * slashes (as well as encoded to %2F) in {query} need to be replaced, preferrably by a space (%20)",
1575+
"description": "UNSTABLE: This request returns an array of max. 20 station objects matching the query. **CAUTION:** All\n * slashes (as well as encoded to %2F) in {query} need to be replaced, preferrably by a space (%20)",
15761576
"operationId": "indexStation",
15771577
"parameters": [
15781578
{
@@ -1854,7 +1854,7 @@
18541854
"example": 11
18551855
},
18561856
"duration": {
1857-
"description": "Duration in\r\n * minutes",
1857+
"description": "Duration in\n * minutes",
18581858
"type": "integer",
18591859
"example": 425
18601860
}
@@ -1985,7 +1985,7 @@
19851985
{
19861986
"name": "withPolylines",
19871987
"in": "query",
1988-
"description": "If this parameter is set, the polylines will be returned as well. Otherwise attribute is\r\n * null.",
1988+
"description": "If this parameter is set, the polylines will be returned as well. Otherwise attribute is\n * null.",
19891989
"schema": {
19901990
"type": "boolean"
19911991
}
@@ -2251,7 +2251,7 @@
22512251
"Dashboard"
22522252
],
22532253
"summary": "Get paginated future statuses of current user",
2254-
"description": "Returns paginated statuses of the authenticated user, that are more than 20 minutes in the\r\n * future",
2254+
"description": "Returns paginated statuses of the authenticated user, that are more than 20 minutes in the\n * future",
22552255
"operationId": "getFutureDashboard",
22562256
"parameters": [
22572257
{
@@ -2862,7 +2862,7 @@
28622862
"Status"
28632863
],
28642864
"summary": "Create a StatusTag",
2865-
"description": "Creates a single StatusTag Object, if user is authorized to. <br><br>The key of a tag is free\r\n * text. You can choose it as you need it. However, <b>please use a namespace for tags</b>\r\n * (<i>namespace:xxx</i>) that only affect your own application.<br><br>For tags related to standard actions\r\n * we recommend the following tags in the trwl namespace:<br>\r\n * <ul>\r\n * <li>trwl:seat (i.e. 61)</li>\r\n * <li>trwl:wagon (i.e. 25)</li>\r\n * <li>trwl:ticket (i.e. BahnCard 100 first))</li>\r\n * <li>trwl:travel_class (i.e. 1, 2, business, economy, ...)</li>\r\n * <li>trwl:locomotive_class (BR424, BR450)</li>\r\n * <li>trwl:wagon_class (i.e. Bpmz)</li>\r\n * <li>trwl:role (i.e. Tf, Zf, Gf, Lokführer, conducteur de train, ...)</li>\r\n * <li>trwl:vehicle_number (i.e. 425 001, Tz9001, 123, ...)</li>\r\n * <li>trwl:passenger_rights (i.e. yes / no / ID of claim)</li>\r\n * </ul>",
2865+
"description": "Creates a single StatusTag Object, if user is authorized to. <br><br>The key of a tag is free\n * text. You can choose it as you need it. However, <b>please use a namespace for tags</b>\n * (<i>namespace:xxx</i>) that only affect your own application.<br><br>For tags related to standard actions\n * we recommend the following tags in the trwl namespace:<br>\n * <ul>\n * <li>trwl:seat (i.e. 61)</li>\n * <li>trwl:wagon (i.e. 25)</li>\n * <li>trwl:ticket (i.e. BahnCard 100 first))</li>\n * <li>trwl:travel_class (i.e. 1, 2, business, economy, ...)</li>\n * <li>trwl:locomotive_class (BR424, BR450)</li>\n * <li>trwl:wagon_class (i.e. Bpmz)</li>\n * <li>trwl:role (i.e. Tf, Zf, Gf, Lokführer, conducteur de train, ...)</li>\n * <li>trwl:vehicle_number (i.e. 425 001, Tz9001, 123, ...)</li>\n * <li>trwl:passenger_rights (i.e. yes / no / ID of claim)</li>\n * </ul>",
28662866
"operationId": "createSingleStatusTag",
28672867
"parameters": [
28682868
{
@@ -3626,7 +3626,7 @@
36263626
"Checkin"
36273627
],
36283628
"summary": "Autocomplete for stations",
3629-
"description": "This request returns an array of max. 10 station objects matching the query. **CAUTION:** All\r\n * slashes (as well as encoded to %2F) in {query} need to be replaced, preferrably by a space (%20)",
3629+
"description": "This request returns an array of max. 10 station objects matching the query. **CAUTION:** All\n * slashes (as well as encoded to %2F) in {query} need to be replaced, preferrably by a space (%20)",
36303630
"operationId": "trainStationAutocomplete",
36313631
"parameters": [
36323632
{
@@ -3680,7 +3680,7 @@
36803680
"Checkin"
36813681
],
36823682
"summary": "History for stations",
3683-
"description": "This request returns an array of max. 10 most recent station objects that the user has arrived\r\n * at.",
3683+
"description": "This request returns an array of max. 10 most recent station objects that the user has arrived\n * at.",
36843684
"operationId": "trainStationHistory",
36853685
"responses": {
36863686
"200": {
@@ -3932,7 +3932,7 @@
39323932
"properties": {
39333933
"confirmation": {
39343934
"title": "confirmation",
3935-
"description": "Username of the to be deleted account (needs to match the currently logged in\r\n * user)",
3935+
"description": "Username of the to be deleted account (needs to match the currently logged in\n * user)",
39363936
"example": "Gertrud123"
39373937
}
39383938
},
@@ -4109,7 +4109,7 @@
41094109
"User/Hide and Block"
41104110
],
41114111
"summary": "Block a user",
4112-
"description": "Block a specific user. That user will not be able to see your statuses or profile information,\r\n * and cannot send you follow requests. Public statuses are still visible through the incognito mode.",
4112+
"description": "Block a specific user. That user will not be able to see your statuses or profile information,\n * and cannot send you follow requests. Public statuses are still visible through the incognito mode.",
41134113
"operationId": "createBlock",
41144114
"requestBody": {
41154115
"required": true,
@@ -4177,7 +4177,7 @@
41774177
"User/Hide and Block"
41784178
],
41794179
"summary": "Unmute a user",
4180-
"description": "Unblock a specific user. They are now able to see your statuses and profile information again,\r\n * and send you follow requests.",
4180+
"description": "Unblock a specific user. They are now able to see your statuses and profile information again,\n * and send you follow requests.",
41814181
"operationId": "destroyBlock",
41824182
"requestBody": {
41834183
"required": true,
@@ -4247,7 +4247,7 @@
42474247
"User/Hide and Block"
42484248
],
42494249
"summary": "Mute a user",
4250-
"description": "Mute a specific user. That way they will not be shown on your dashboard and in the active\r\n * journeys tab",
4250+
"description": "Mute a specific user. That way they will not be shown on your dashboard and in the active\n * journeys tab",
42514251
"operationId": "createMute",
42524252
"parameters": [
42534253
{
@@ -4305,7 +4305,7 @@
43054305
"User/Hide and Block"
43064306
],
43074307
"summary": "Unmute a user",
4308-
"description": "Unmute a specific user. That way they will be shown on your dashboard and in the active\r\n * journeys tab again",
4308+
"description": "Unmute a specific user. That way they will be shown on your dashboard and in the active\n * journeys tab again",
43094309
"operationId": "destroyMute",
43104310
"parameters": [
43114311
{
@@ -4565,6 +4565,40 @@
45654565
}
45664566
]
45674567
}
4568+
},
4569+
"/year-in-review": {
4570+
"get": {
4571+
"tags": [
4572+
"Statistics"
4573+
],
4574+
"summary": "Returns the year in review for the given year and authenticated user",
4575+
"description": "Please note: This endpoint is only available when the year in review feature is enabled in the backend configuration. There is no full documentation - this endpoint may change every year.",
4576+
"operationId": "getYearInReview",
4577+
"responses": {
4578+
"200": {
4579+
"description": "JSON object with the year in review data. The structure of the object may change every year. There is no full documentation at this point."
4580+
},
4581+
"400": {
4582+
"description": "Bad request"
4583+
},
4584+
"401": {
4585+
"description": "Unauthorized"
4586+
},
4587+
"403": {
4588+
"description": "Year in review is not active"
4589+
}
4590+
},
4591+
"security": [
4592+
{
4593+
"passport": [
4594+
"create-statuses"
4595+
]
4596+
},
4597+
{
4598+
"token": []
4599+
}
4600+
]
4601+
}
45684602
}
45694603
},
45704604
"components": {
@@ -4785,7 +4819,7 @@
47854819
},
47864820
"MastodonVisibility": {
47874821
"title": "visibility",
4788-
"description": "What type of visibility (0=public, 1=unlisted, 2=followers, 3=private) did the user specify for\r\n * future posts to Mastodon? Some instances such as chaos.social discourage bot posts on public timelines.",
4822+
"description": "What type of visibility (0=public, 1=unlisted, 2=followers, 3=private) did the user specify for\n * future posts to Mastodon? Some instances such as chaos.social discourage bot posts on public timelines.",
47894823
"type": "integer",
47904824
"enum": [
47914825
0,
@@ -4811,7 +4845,7 @@
48114845
},
48124846
"StatusVisibility": {
48134847
"title": "visibility",
4814-
"description": "What type of visibility (0=public, 1=unlisted, 2=followers, 3=private, 4=authenticated) did the\r\n * user specify?",
4848+
"description": "What type of visibility (0=public, 1=unlisted, 2=followers, 3=private, 4=authenticated) did the\n * user specify?",
48154849
"type": "integer",
48164850
"enum": [
48174851
0,

0 commit comments

Comments
 (0)