API

Best Practices

JSON item import schema

When making a list, you may submit new items as a JSON list following the below schema:

interface Item {
  /** Always present */
  name: string;

  /** Optional extras */
  nameRef?: string;                 // url slug, unique preferred, generated if not provided
  subtitle?: string;                // short caption e.g. the artist name for a song item
  imageUrl?: string;                // image URL available for hotlinking. Will be downloaded and stored by Unduel
  description?: string;             
  tags?: string[];                  // labels used for filtering
  properties?: Record<string,string>; // free-form key/value pairs
  pixelated?: boolean;              // should the image be rendered with css pixelated?
  wikiUrl?: string;                 // wiki url where more info is available / where the info for this item comes from
  isArchived?: boolean;             // won't appear in voting and new rankings
  imageWidth?: number;              // will be automatically extracted from provided image url
  imageHeight?: number;             // will be automatically extracted from provided image url
	id?: string;                      // automatically generated, use this when editing existing items, but ignore when adding new items
  
}