openapi: 3.1.0 info: title: Tournament activity API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: activity paths: /v2/users/{userLogin}/activities/weekly/{week}: x-service-id: activity-service get: tags: - activity summary: Show a user activities at a week. operationId: listAtDate parameters: - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: week in: path required: true style: simple explode: false schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: oneOf: - $ref: '#/components/schemas/CompetitionPush' - $ref: '#/components/schemas/CompetitionRun' - $ref: '#/components/schemas/DiscordJoinActivity' - $ref: '#/components/schemas/DiscordMessageActivity' /v2/users/{userLogin}/activities/weekly/summary: x-service-id: activity-service get: tags: - activity summary: Show a weekly user activity summary. operationId: ShowWeeklySummary parameters: - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: start in: query required: false style: form explode: true schema: type: string - name: end in: query required: false style: form explode: true schema: type: string - name: ignoreZeros in: query required: false style: form explode: true schema: type: boolean responses: '200': description: OK content: application/json: schema: type: object additionalProperties: type: integer format: int64 /v2/users/{userLogin}/activities/daily/{date}: x-service-id: activity-service get: tags: - activity summary: Show a user activities at a date. operationId: listAtDate_1 parameters: - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: date in: path required: true style: simple explode: false schema: type: string format: date responses: '200': description: OK content: application/json: schema: type: array items: oneOf: - $ref: '#/components/schemas/CompetitionPush' - $ref: '#/components/schemas/CompetitionRun' - $ref: '#/components/schemas/DiscordJoinActivity' - $ref: '#/components/schemas/DiscordMessageActivity' /v2/users/{userLogin}/activities/daily/summary: x-service-id: activity-service get: tags: - activity summary: Show a daily user activity summary. operationId: showDailySummary parameters: - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: start in: query required: false style: form explode: true schema: type: string format: date - name: end in: query required: false style: form explode: true schema: type: string format: date - name: ignoreZeros in: query required: false style: form explode: true schema: type: boolean responses: '200': description: OK content: application/json: schema: type: object additionalProperties: type: integer format: int64 components: schemas: DiscordJoinActivity: allOf: - $ref: '#/components/schemas/Activity' - type: object properties: id: type: integer format: int64 guildId: type: string guildName: type: string properties: type: type: string enum: - DISCORD_JOIN CompetitionPush: allOf: - $ref: '#/components/schemas/Activity' - type: object properties: id: type: integer format: int64 competitionId: type: integer format: int64 competitionName: type: string projectId: type: integer format: int64 projectName: type: string submissionId: type: integer format: int64 properties: type: type: string enum: - COMPETITION_PUSH CompetitionRun: allOf: - $ref: '#/components/schemas/Activity' - type: object properties: id: type: integer format: int64 competitionId: type: integer format: int64 competitionName: type: string projectId: type: integer format: int64 projectName: type: string runId: type: integer format: int64 properties: type: type: string enum: - COMPETITION_RUN Activity: type: object discriminator: propertyName: type mapping: COMPETITION_PUSH: '#/components/schemas/CompetitionPush' COMPETITION_RUN: '#/components/schemas/CompetitionRun' DISCORD_JOIN: '#/components/schemas/DiscordJoinActivity' DISCORD_MESSAGE: '#/components/schemas/DiscordMessageActivity' properties: type: type: string required: - type DiscordMessageActivity: allOf: - $ref: '#/components/schemas/Activity' - type: object properties: id: type: integer format: int64 guildId: type: string guildName: type: string channelId: type: string channelName: type: string messageId: type: string properties: type: type: string enum: - DISCORD_MESSAGE securitySchemes: apiKey: type: apiKey name: apiKey in: query scheme: token accessToken: type: http in: header scheme: Bearer externalDocs: description: docs.crunchdao.com url: https://docs.crunchdao.com