Class Category

A TTS category. This is a category that TTS models can belong to. Categories can also have subcategories.

Implements

Constructors

  • Parameters

    • client: Client

      The main client.

    • data: {
          can_directly_have_models: boolean;
          can_have_subcategories: boolean;
          can_only_mods_apply: boolean;
          category_token: string;
          created_at: Date;
          deleted_at: null | Date;
          is_mod_approved: null | boolean;
          is_synthetic: boolean;
          maybe_super_category_token: null | string;
          model_type: string;
          name: string;
          name_for_dropdown: string;
          should_be_sorted: boolean;
          updated_at: Date;
      }

      The raw category data from the FakeYou API.

      • can_directly_have_models: boolean
      • can_have_subcategories: boolean
      • can_only_mods_apply: boolean
      • category_token: string
      • created_at: Date
      • deleted_at: null | Date
      • is_mod_approved: null | boolean
      • is_synthetic: boolean
      • maybe_super_category_token: null | string
      • model_type: string
      • name: string
      • name_for_dropdown: string
      • should_be_sorted: boolean
      • updated_at: Date

    Returns Category

Properties

canDirectlyHaveModels: boolean
canHaveSubcategories: boolean
canOnlyModsApply: boolean
client: Client
createdAt: Date
deletedAt: null | Date
isModApproved: null | boolean
isSynthetic: boolean
modelType: string
name: string
nameForDropdown: string
parentToken: null | string
shouldBeSorted: boolean
token: string
updatedAt: Date

Methods

  • Fetch models that belong to this category.

    Returns Promise<TtsModel[]>

    A list of tts models that belong to this category. The array is empty if no models belong to this category.

  • Fetch the parent category of this category.

    Returns Promise<undefined | Category>

    The parent category of this category. Undefined if this category has no parent.

Generated using TypeDoc