Set API

This part of the API focuses on providing robust and detailed information about each card set in the Lorcana Trading Card Game. Through the /sets endpoint, users can access comprehensive lists of all card sets, including standard and promotional releases, each uniquely identified and rich with data like release dates and set codes.

For more targeted queries, the /sets/:code and /sets/:id endpoints allow retrieval of specific set details by either their code or unique identifier.

Whether integrating Lorcana data into third-party applications or creating tools for managing card collections, these endpoints serve as critical resources for developers and users alike, ensuring access to current and accurate set information.

Set Model

The Set model represents a collection of Lorcana cards grouped under a specific theme or release. Each set is uniquely identified by an id and has distinct attributes.

Properties

GET /sets

The /sets endpoint provides a comprehensive list of all card sets available in the Lorcana Trading Card Game, including both standard and promotional sets. By accessing this endpoint, developers and users can retrieve detailed information about each set, which is crucial for tracking game expansions and managing collections.

Endpoint:

GET https://api.lorcast.com/v0/sets

This API always return an object that contains a results key. Within this key is the set data. In the future, additional keys will provide more information on the results.

Currently, the /sets endpoint does not support pagination, which may affect performance when handling large amounts of data. Considering the low number of sets, this is not currently a problem. However, pagination is planned for future updates to enhance usability and efficiency.

Example Request

curl https://api.lorcast.com/v0/sets
{
  "results": [
    {
      "id": "set_7ecb0e0c71af496a9e0110e23824e0a5",
      "name": "The First Chapter",
      "code": "1",
      "released_at": "2023-08-18",
      "prereleased_at": "2023-08-18"
    },
    {
      "id": "set_142d2dfb5d4b4b739a1017dc4bb0fcd2",
      "name": "Rise of the Floodborn",
      "code": "2",
      "released_at": "2023-11-17",
      "prereleased_at": "2023-11-17"
    },
    {
      "id": "set_934a6eeaf96149caaa349b08dbeb0545",
      "name": "Disney 100",
      "code": "D100",
      "released_at": "2023-12-01",
      "prereleased_at": "2023-12-01"
    }
  ]
}

GET /sets/:id

This endpoint allows you to retrieve detailed information about a specific Lorcana card set by using either the set's code or its unique identifier (ID). This flexibility enables developers and users to access set data conveniently based on the available information.

Set Code: GET https://api.lorcast.com/v0/sets/:code

Use a set code, such as 1 or D100, to fetch information about a specific set.

Set ID: GET https://api.lorcast.com/v0/sets/:id

Use a set ID, which always begins with set_ followed by a uuid (e.g., set_7ecb0e0c71af496a9e0110e23824e0a5). Set IDs can be retrieved from the /sets endpoint and provide a unique way to reference each set.

Example Request

curl https://api.lorcast.com/v0/sets/1
{
  "id": "set_7ecb0e0c71af496a9e0110e23824e0a5",
  "name": "The First Chapter",
  "code": "1",
  "released_at": "2023-08-18T00:00:00.000Z",
  "prereleased_at": "2023-08-18T00:00:00.000Z"
}