CrunchDAO timeline API

The timeline API from CrunchDAO — 2 operation(s) for timeline.

OpenAPI Specification

crunchdao-timeline-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Tournament activity timeline API
  description: CrunchDAO Tournament Platform API Endpoints
  version: v2
servers:
- url: http://api.hub.crunchdao.com
  description: Generated server url
security: []
tags:
- name: timeline
paths:
  /v2/competitions/{competitionIdentifier}/timeline/events:
    x-service-id: competition-service
    get:
      tags:
      - timeline
      summary: List a timeline events.
      operationId: listCompetitionTimelineEvents
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TimelineEvent'
    post:
      tags:
      - timeline
      summary: Create a timeline event.
      operationId: createCompetitionTimelineEvent
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimelineEventCreateForm'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimelineEvent'
  /v2/competitions/{competitionIdentifier}/timeline/events/{eventId}:
    x-service-id: competition-service
    get:
      tags:
      - timeline
      summary: Show a timeline event.
      operationId: getCompetitionTimelineEvent
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: eventId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimelineEvent'
    delete:
      tags:
      - timeline
      summary: Delete a timeline event.
      operationId: deleteCompetitionTimelineEvent
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: eventId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        '202':
          description: Accepted
    patch:
      tags:
      - timeline
      summary: Update a timeline event.
      operationId: updateCompetitionTimelineEvent
      parameters:
      - name: competitionIdentifier
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      - name: eventId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimelineEventUpdateForm'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimelineEvent'
components:
  schemas:
    TimelineEventCreateForm:
      type: object
      properties:
        type:
          type: string
          enum:
          - GENERIC
          - LEADERBOARD
          - RULES
          - REWARDS
        title:
          type: string
        description:
          type: string
        date:
          type: string
          format: date
        color:
          type: string
        detailed:
          type: boolean
        button:
          $ref: '#/components/schemas/TimelineEventButtonCreateForm'
      required:
      - date
      - detailed
      - title
      - type
    TimelineEventUpdateForm:
      type: object
      properties:
        type:
          type: string
          enum:
          - GENERIC
          - LEADERBOARD
          - RULES
          - REWARDS
        title:
          type: string
        description:
          type: string
        date:
          type: string
          format: date
        color:
          type: string
        detailed:
          type: boolean
        button:
          $ref: '#/components/schemas/TimelineEventButtonPatchForm'
    TimelineEventButton:
      type: object
      properties:
        text:
          type: string
        link:
          type: string
        color:
          type: string
    TimelineEventButtonCreateForm:
      type: object
      properties:
        text:
          type: string
        link:
          type: string
        color:
          type: string
      required:
      - link
      - text
    TimelineEventType:
      type: string
      enum:
      - GENERIC
      - LEADERBOARD
      - RULES
      - REWARDS
    TimelineEventButtonPatchForm:
      type: object
      properties:
        text:
          type: string
        link:
          type: string
        color:
          type: string
    TimelineEvent:
      type: object
      properties:
        id:
          type: integer
          format: int64
        type:
          $ref: '#/components/schemas/TimelineEventType'
        title:
          type: string
        description:
          type: string
        date:
          type: string
          format: date
          description: Date on which the event will occur/has occurred.
        color:
          type: string
        detailed:
          type: boolean
          description: Detailed event should be hidden in a space constrained UI.
        button:
          $ref: '#/components/schemas/TimelineEventButton'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  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