GET /contests/most_liked_routine/leaderboard/:week_number

GET /contests/most_liked_routine/leaderboard/{week_number}

Fetch top ranked most liked routines for contest by week number

Responses

  • 200

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • contest_week_number integer
      • contest_started_at string(DateTime)
      • leaderboard array[object]
        Hide leaderboard attributes Show leaderboard attributes array[object]
        • rank integer
        • score integer
        • routine object
          Hide routine attributes Show routine attributes object
          • id integer
          • user_id integer
          • title string
          • routine_type string
          • status string
          • created_at string(DateTime)
          • updated_at string(DateTime)
          • routine_step_ids array[integer]
          • routine_step_order array[integer]
          • favorite_count integer
          • routine_steps array[object]
            Hide routine_steps attributes Show routine_steps attributes array[object]
            • id integer
            • routine_id integer
            • product_id integer
            • product_tutorial_id integer
            • product_category_id integer
            • product_pitch_id integer
            • status string
            • created_at string(DateTime)
            • updated_at string(DateTime)
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 500

    Server Error

GET /contests/most_liked_routine/leaderboard/{week_number}
curl \
 -X GET https://api.cosmily.com/api/v1/contests/most_liked_routine/leaderboard/{week_number} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "contest_week_number": 42,
    "contest_started_at": "string",
    "leaderboard": [
      {
        "rank": 42,
        "score": 42,
        "routine": {
          "id": 42,
          "user_id": 42,
          "title": "string",
          "routine_type": "string",
          "status": "string",
          "created_at": "string",
          "updated_at": "string",
          "routine_step_ids": [
            42
          ],
          "routine_step_order": [
            42
          ],
          "favorite_count": 42,
          "routine_steps": [
            {
              "id": 42,
              "routine_id": 42,
              "product_id": 42,
              "product_tutorial_id": 42,
              "product_category_id": 42,
              "product_pitch_id": 42,
              "status": "string",
              "created_at": "string",
              "updated_at": "string"
            }
          ]
        }
      }
    ]
  }
}
Response examples (200)
{
  "data": {
    "contest_week_number": 42,
    "contest_started_at": "string",
    "leaderboard": [
      {
        "rank": 42,
        "score": 42,
        "routine": {
          "id": 42,
          "user_id": 42,
          "title": "string",
          "routine_type": "string",
          "status": "string",
          "created_at": "string",
          "updated_at": "string",
          "routine_step_ids": [
            42
          ],
          "routine_step_order": [
            42
          ],
          "favorite_count": 42,
          "routine_steps": [
            {
              "id": 42,
              "routine_id": 42,
              "product_id": 42,
              "product_tutorial_id": 42,
              "product_category_id": 42,
              "product_pitch_id": 42,
              "status": "string",
              "created_at": "string",
              "updated_at": "string"
            }
          ]
        }
      }
    ]
  }
}