Skip to content

Commit f1aaa4d

Browse files
alecsavvyraymondjacobson
authored andcommitted
SWAG
1 parent 6a3f0b6 commit f1aaa4d

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

api/swagger/swagger-v1.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ tags:
2828
description: Events related operations
2929
- name: explore
3030
description: Explore related operations
31+
- name: rewards
32+
description: Rewards related operations
3133
paths:
3234
/challenges/undisbursed:
3335
get:
@@ -3573,6 +3575,31 @@ paths:
35733575
application/json:
35743576
schema:
35753577
$ref: '#/components/schemas/coin_members_response'
3578+
/rewards/claim:
3579+
post:
3580+
tags:
3581+
- rewards
3582+
description: Claims all the filtered undisbursed rewards for a user
3583+
operationId: Claim Rewards
3584+
requestBody:
3585+
required: true
3586+
content:
3587+
application/json:
3588+
schema:
3589+
$ref: '#/components/schemas/claim_rewards_request'
3590+
responses:
3591+
"200":
3592+
description: Success
3593+
content:
3594+
application/json:
3595+
schema:
3596+
$ref: '#/components/schemas/claim_rewards_response'
3597+
"400":
3598+
description: Bad request - No rewards to claim or invalid parameters
3599+
content: {}
3600+
"500":
3601+
description: Server error
3602+
content: {}
35763603

35773604
components:
35783605
schemas:
@@ -5460,6 +5487,55 @@ components:
54605487
properties:
54615488
data:
54625489
$ref: '#/components/schemas/user_coin_with_accounts'
5490+
claim_rewards_response:
5491+
type: object
5492+
required:
5493+
- data
5494+
properties:
5495+
data:
5496+
type: array
5497+
items:
5498+
type: object
5499+
properties:
5500+
challengeId:
5501+
type: string
5502+
description: The challenge ID
5503+
example: "u"
5504+
specifier:
5505+
type: string
5506+
description: The challenge specifier
5507+
example: "7eP5n"
5508+
amount:
5509+
type: string
5510+
description: The reward amount
5511+
example: "1000000000"
5512+
signatures:
5513+
type: array
5514+
items:
5515+
type: string
5516+
description: Transaction signatures
5517+
example: ["5j7s1QjmRKFuDbCWMRVRNibSV2VAAEcNKP6HWU7GwPdXkBZvhz8n4vQl7bBq8tN4Rz9x1Kj3mP5wQ8rT2Y6zA"]
5518+
error:
5519+
type: string
5520+
description: Error message if claim failed
5521+
example: "Insufficient balance"
5522+
claim_rewards_request:
5523+
type: object
5524+
required:
5525+
- userId
5526+
properties:
5527+
challengeId:
5528+
type: string
5529+
description: The challenge ID to filter rewards (optional)
5530+
example: "u"
5531+
specifier:
5532+
type: string
5533+
description: The specifier to filter rewards (optional)
5534+
example: "7eP5n"
5535+
userId:
5536+
type: string
5537+
description: The user ID to claim rewards for
5538+
example: "7eP5n"
54635539
responses:
54645540
ParseError:
54655541
description: When a mask can't be parsed

0 commit comments

Comments
 (0)