UNPKG

sleeper-api-tsclient

Version:

Typescript client for the sleeper api

156 lines (148 loc) 4.33 kB
/** * Sleeper API * The Sleeper API is a read-only HTTP API that is free to use and allows access to a users leagues, drafts, and rosters. No API Token is necessary, as you cannot modify contents via this API. Be mindful of the frequency of calls. A general rule is to stay under 1000 API calls per minute, otherwise, you risk being IP-blocked. * * OpenAPI spec version: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { DraftMetadata } from './DraftMetadata'; import { DraftSettings } from './DraftSettings'; import { HttpFile } from '../http/http'; export class Draft { 'type': string; 'status': string; 'startTime': number; 'sport': string; 'settings': DraftSettings; 'seasonType': string; 'season': string; 'metadata': DraftMetadata; 'leagueId': string; 'lastPicked': number; 'lastMessageTime': number; 'lastMessageId': string; /** * this is the user_id to draft slot mapping */ 'draftOrder': { [key: string]: number; }; /** * this is the draft slot to roster_id mapping. leagues have rosters, which have roster_ids. this means draft slot 1 (column 1) will go to roster 10, slot 2 will go to roster_id 3, etc */ 'slotToRosterId'?: { [key: string]: number; }; 'draftId': string; 'creators': Array<string>; 'created': number; static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { "name": "type", "baseName": "type", "type": "string", "format": "" }, { "name": "status", "baseName": "status", "type": "string", "format": "" }, { "name": "startTime", "baseName": "start_time", "type": "number", "format": "" }, { "name": "sport", "baseName": "sport", "type": "string", "format": "" }, { "name": "settings", "baseName": "settings", "type": "DraftSettings", "format": "" }, { "name": "seasonType", "baseName": "season_type", "type": "string", "format": "" }, { "name": "season", "baseName": "season", "type": "string", "format": "" }, { "name": "metadata", "baseName": "metadata", "type": "DraftMetadata", "format": "" }, { "name": "leagueId", "baseName": "league_id", "type": "string", "format": "" }, { "name": "lastPicked", "baseName": "last_picked", "type": "number", "format": "" }, { "name": "lastMessageTime", "baseName": "last_message_time", "type": "number", "format": "" }, { "name": "lastMessageId", "baseName": "last_message_id", "type": "string", "format": "" }, { "name": "draftOrder", "baseName": "draft_order", "type": "{ [key: string]: number; }", "format": "" }, { "name": "slotToRosterId", "baseName": "slot_to_roster_id", "type": "{ [key: string]: number; }", "format": "" }, { "name": "draftId", "baseName": "draft_id", "type": "string", "format": "" }, { "name": "creators", "baseName": "creators", "type": "Array<string>", "format": "" }, { "name": "created", "baseName": "created", "type": "number", "format": "" } ]; static getAttributeTypeMap() { return Draft.attributeTypeMap; } public constructor() { } }