From 90d5652100f419f00585528753f30ece517c1d42 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 20 Jun 2022 12:44:49 +0300 Subject: [PATCH] update docs with new APIs --- docs/member-api.postman_collection.json | 65 +++++++-------- docs/swagger.yaml | 101 ++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 32 deletions(-) diff --git a/docs/member-api.postman_collection.json b/docs/member-api.postman_collection.json index a6b2912..627f4f0 100644 --- a/docs/member-api.postman_collection.json +++ b/docs/member-api.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "2e554101-d99e-4522-8ce5-39ff8e6cca0e", + "_postman_id": "9f8d8103-0043-4959-b0cf-8e833845cc57", "name": "member-api", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "10740" }, "item": [ { @@ -1223,12 +1224,7 @@ "type": "file", "src": "/Users/at397596/Documents/Workspace/Topcoder/member-api-repository/member-api/docs/member_photo.png" } - ], - "options": { - "raw": { - "language": "json" - } - } + ] }, "url": { "raw": "{{URL}}/members/upbeat/photo", @@ -1281,12 +1277,7 @@ ], "body": { "mode": "formdata", - "formdata": [], - "options": { - "raw": { - "language": "json" - } - } + "formdata": [] }, "url": { "raw": "{{URL}}/members/upbeat/photo", @@ -1340,12 +1331,7 @@ "type": "file", "src": "/Users/at397596/Documents/Workspace/Topcoder/member-api-repository/member-api/docs/member_photo.png" } - ], - "options": { - "raw": { - "language": "json" - } - } + ] }, "url": { "raw": "{{URL}}/members/upbeat/photo", @@ -1404,12 +1390,7 @@ "type": "file", "src": "/Users/at397596/Documents/Workspace/Topcoder/member-api-repository/member-api/docs/member_photo.png" } - ], - "options": { - "raw": { - "language": "json" - } - } + ] }, "url": { "raw": "{{URL}}/members/invalid/photo", @@ -1468,12 +1449,7 @@ "type": "file", "src": "/Users/at397596/Documents/Workspace/Topcoder/member-api-repository/member-api/docs/member_photo.png" } - ], - "options": { - "raw": { - "language": "json" - } - } + ] }, "url": { "raw": "{{URL}}/members/upbeat/photo", @@ -7237,6 +7213,31 @@ } } ] + }, + { + "name": "Gamification", + "item": [ + { + "name": "Get member rewards", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{URL}}/members/tourist/gamification/rewards", + "host": [ + "{{URL}}" + ], + "path": [ + "members", + "tourist", + "gamification", + "rewards" + ] + } + }, + "response": [] + } + ] } ], "event": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index cad7944..64c15ca 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1212,6 +1212,68 @@ paths: description: Internal server error schema: $ref: '#/definitions/ErrorModel' + '/members/{handle}/gamification/rewards': + get: + tags: + - Gamification + description: Get member gamification rewards + security: + - bearer: [] + parameters: + - in: path + name: handle + required: true + type: string + - name: site + in: query + required: false + type: string + description: The site for which to make the request. Defaults to `topcoder` if not specified. + - name: tags + in: query + required: false + type: string + description: > + tags=tag1,tag2,...,tagN + + The tags by which to filter the activities retrieved. Leave empty for no tag filtering. + - name: tagsJoin + in: query + required: false + type: string + description: > + Whether the tags should be found using hasAnyOf / hasAllOf. + + + hasAnyOf + + + hasAllOf + responses: + '200': + description: OK + schema: + type: array + items: + $ref: '#/definitions/MemberRewards' + '400': + description: Bad request data + schema: + $ref: '#/definitions/ErrorModel' + '401': + description: Miss or wrong authentication credentials + schema: + $ref: '#/definitions/ErrorModel' + '403': + description: No permission + schema: + $ref: '#/definitions/ErrorModel' + '404': + description: Not found + schema: + $ref: '#/definitions/ErrorModel' + '500': + description: Internal server error + schema: + $ref: '#/definitions/ErrorModel' @@ -2226,6 +2288,45 @@ definitions: type: string updatedBy: type: string + MemberRewards: + type: object + properties: + awardedOn: + type: string + expiryOn: + type: string + isExpired: + type: boolean + id: + type: string + awarded: + type: object + properties: + awardedType: + type: string + message: + type: string + name: + type: string + type: + type: string + reward: + type: object + properties: + active: + type: boolean + attrs: + type: object + id: + type: string + imageUrl: + type: string + mimeType: + type: string + message: + type: string + hint: + type: string ErrorModel: type: object properties: