GET /events
List of events

Supported Formats

json

Errors

Code Description
404 Not Found
500 Internal Server error

Examples

Request
{
  per_page: 10,
  page: 1
}

Response
{
  "data": [
    {
      "id": 1,
      "name": "LFA 1",
      "location": "Clive, Iowa",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-15",
      "matches": [
        {
          "id": 3,
          "title": "Title Match",
          "time": "14:00",
          "featured": true,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    },
    {
      "id": 2,
      "name": "LFA 2",
      "location": "Prior Lake, Minnesota",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-22",
      "matches": [
        {
          "id": 4,
          "title": "150 lbs.",
          "time": "14:00",
          "featured": false,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
      "per_page": 10,
      "page": 1,
      "total_pages": 1,
      "total": 2
  }
}

Params

Param name Description
per_page
optional

Number of records per page

Validations:

  • Must be a Integer

page
optional

Page number

Validations:

  • Must be a Integer


GET /events/upcoming
List of upcoming events

Supported Formats

json

Errors

Code Description
404 Not Found
500 Internal Server error

Examples

Request
{
  per_page: 10,
  page: 1
}

Response
{
  "data": [
    {
      "id": 1,
      "name": "LFA 1",
      "location": "Clive, Iowa",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-15",
      "matches": [
        {
          "id": 3,
          "title": "Title Match",
          "time": "14:00",
          "featured": true,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    },
    {
      "id": 2,
      "name": "LFA 2",
      "location": "Prior Lake, Minnesota",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-22",
      "matches": [
        {
          "id": 4,
          "title": "150 lbs.",
          "time": "14:00",
          "featured": false,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
      "per_page": 10,
      "page": 1,
      "total_pages": 1,
      "total": 2
  }
}

Params

Param name Description
per_page
optional

Number of records per page

Validations:

  • Must be a Integer

page
optional

Page number

Validations:

  • Must be a Integer


GET /events/past
List of past events

Supported Formats

json

Errors

Code Description
404 Not Found
500 Internal Server error

Examples

Request
{
  per_page: 10,
  page: 1
}

Response
{
  "data": [
    {
      "id": 1,
      "name": "LFA 1",
      "location": "Clive, Iowa",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-15",
      "matches": [
        {
          "id": 3,
          "title": "Title Match",
          "time": "14:00",
          "featured": true,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    },
    {
      "id": 2,
      "name": "LFA 2",
      "location": "Prior Lake, Minnesota",
      "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
      "link": "https://nitrotickets.com/lfa",
      "date": "2019-02-22",
      "matches": [
        {
          "id": 4,
          "title": "150 lbs.",
          "time": "14:00",
          "featured": false,
          "fighters": [
            {
              "id": 1,
              "tag": "champion",
              "name": "John Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            },
            {
              "id": 2,
              "tag": "fighter",
              "name": "Jack Doe",
              "nickname": "Doe",
              "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
            }
          ]
        }
      ]
    }
  ],
  "pagination": {
      "per_page": 10,
      "page": 1,
      "total_pages": 1,
      "total": 2
  }
}

Params

Param name Description
per_page
optional

Number of records per page

Validations:

  • Must be a Integer

page
optional

Page number

Validations:

  • Must be a Integer


GET /events/:id/results
List of results for a particular event

Supported Formats

json

Errors

Code Description
404 Not Found
500 Internal Server error

Examples

Request
{
  per_page: 10,
  page: 1
}

Response
{
  "data": [
    {
      "id": 1,
      "name": "John Doe vs Jack Doe",
      "method": "TKO",
      "round": 1,
      "duration": "04:04",
      "draw": false,
      "winner": {
        "id": 1,
        "tag": "fighter",
        "name": "John Doe",
        "nickname": "Doe",
        "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
      },
      "loser": {
        "id": 2,
        "tag": "fighter",
        "name": "Jack Doe",
        "nickname": "Doe",
        "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
      }
    }
  ],
  "pagination": {
    "per_page": 100,
    "page": 1,
    "total_pages": 1,
    "total": 1
  }
}

Params

Param name Description
per_page
optional

Number of records per page

Validations:

  • Must be a Integer

page
optional

Page number

Validations:

  • Must be a Integer


GET /events/:id
Single event

Supported Formats

json

Errors

Code Description
404 Not Found
500 Internal Server error

Examples

Request
{
  id: 1
}

Response
{
  "id": 1,
  "name": "LFA 1",
  "location": "Clive, Iowa",
  "details": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
  "link": "https://nitrotickets.com/lfa",
  "date": "2019-02-15",
  "matches": [
    {
      "id": 3,
      "title": "Title Match",
      "time": "14:00",
      "featured": true,
      "fighters": [
        {
          "id": 1,
          "tag": "champion",
          "name": "John Doe",
          "nickname": "Doe",
          "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
        },
        {
          "id": 2,
          "tag": "fighter",
          "name": "Jack Doe",
          "nickname": "Doe",
          "small_avatar": "https://api.lfa.com/rails/active_storage/representations/small_avatar.jpg"
        }
      ]
    }
  ]
}

Params

Param name Description
id
required

ID of the event

Validations:

  • Must be a Integer