# Skyscape Developer Documentation Welcome to the Skyscape developer docs! These docs are still a work in progress, but it gives a basic rundown of the current API as it stands. ## API Versions Skyscape exposes different versions of our API. You should specify which version to use by including it in the request path like `https://skyscape.cc/v{version_number}/endpoint`. Omitting the version number from the route will fail and assume you are fetching the actual website. | Version | Status | |---------|------------| | v2 | Available | | v1 | Deprecated | ## Objects ### Player | Field | Type | Description | |---------------|------------------|-----------------------------------------------------------------| | uuid | string | The player's uuid. | | name | string | The player's username. | | display_name | string | The player's display name. | | rank | integer | The player's rank. See [Ranks](#ranks). | | subscription | integer | The player's subscription. See [Subscriptions](#subscriptions). | | is_og? | boolean | Whether the user is an early user. Omitted if `false`. | #### Ranks | Type | ID | Description | |-----------|----|---------------------| | DEFAULT | 0 | Player rank. | | IRON | 1 | Iron rank. | | DIAMOND | 2 | Diamond rank. | | EMERALD | 3 | Emerald rank. | | MEDIA | 4 | Media rank. | | MOD | 6 | Mod rank. | | TEAM | 7 | Team rank. | | ADMIN | 8 | Admin rank. | #### Subscriptions | Type | ID | Description | |-------------|----|----------------------------------------| | NONE | 0 | No subscription. | | IRON | 1 | Iron subscription. **(Deprecated)** | | DIAMOND | 2 | Diamond subscription. **(Deprecated)** | | EMERALD | 3 | Emerald subscription. **(Deprecated)** | | BETA_PASS\* | 4 | Alpha pass. | \* If the player has disabled advanced API access for their account, this will be returned as `NONE`. #### Time | Field | Type | Description | |--------|---------|--------------------------------------------------------------------------------| | day | integer | The current day on the server. Can be any integer between 0 and 29. | | hour | integer | The current hour on the server. Can be any integer between 0 and 23. | | minute | integer | The current minute on the server. Can be any integer between 0 and 59. | | month | integer | The current month on the server. Can be any integer between 0 and 11. | | second | integer | The current second on the server. Can be any integer between 0 and 29. | | year | integer | The current year on the server. Can be any integer greater than or equal to 0. | #### Item Definition | Field | Type | Description | |------------|--------|--------------------------------------------------------------------------------------------------------------| | base_item | string | The vanilla item this item is based upon. Can be any valid namespaced item id | | components | map | An array of item components. See [Item format](https://minecraft.wiki/w/Item_format) on the Minecraft Wiki\* | \* `minecraft:custom_data` component contains a [Skyscape Data](#skyscape-data) object under the `skyscape_data` field. #### Skyscape Data | Field | Type | Description | |---------|---------|------------------------------------------------------------------------------------------------------------------------| | id | string | Namespaced Skyscape item id. This is different from `base_item`'s id | | version | integer | Used internally for updating old items in-game. This is incremented by one each time this item's definition is updated | ## Endpoints These are all the current API endpoints that can be accessed. ### Fetch Latest Spoiler GET/header Fetches the latest spoiler from #spoilers in the Discord server. This is used on the website home page and does not require authentication. ### Fetch Player Profile GET/profile/{player.uuid} Fetches a player's profile by their uuid. Returns a [player](#player) object. Currently does not require authentication, but this is subject to change in the future. ### Fetch Time GET/time Fetches the current date on the server. Return value depends on query string. This does not require authentication. #### Query String Params | Field | Type | Description | |-------|--------|----------------------------------------------------------------------------------------------------------------------| | raw | string | If `true`, returns Skyscape's epoch as `text/plain`. Otherwise, a [time](#time) object is sent. Defaults to `false`. | ### Fetch Item Schema GET/item-schema Fetches the current version of the item schema. Returns an array of [item definitions](#item-definition) objects. This does not require authentication.