The common properties across all Collection items from the WaniKani API.

interface WKCollection {
    data:
        | WKAssignment[]
        | WKKanaVocabulary[]
        | WKKanji[]
        | WKLevelProgression[]
        | WKRadical[]
        | WKReset[]
        | WKReview[]
        | WKReviewStatistic[]
        | WKSpacedRepetitionSystem[]
        | WKStudyMaterial[]
        | WKSubject[]
        | WKVocabulary[]
        | WKVoiceActor[];
    data_updated_at: null | WKDatableString;
    object: "collection";
    pages: {
        next_url: null | string;
        per_page: number;
        previous_url: null | string;
    };
    total_count: number;
    url: string;
    code?: undefined;
    error?: undefined;
}

Hierarchy (view full)

Properties

data:
    | WKAssignment[]
    | WKKanaVocabulary[]
    | WKKanji[]
    | WKLevelProgression[]
    | WKRadical[]
    | WKReset[]
    | WKReview[]
    | WKReviewStatistic[]
    | WKSpacedRepetitionSystem[]
    | WKStudyMaterial[]
    | WKSubject[]
    | WKVocabulary[]
    | WKVoiceActor[]

The resource's data, dependent on the collection's resource type.

data_updated_at: null | WKDatableString

For collections, this is the timestamp of the most recently updated resource in the specified scope and is not limited by pagination. If no items were returned for the specified scope, then this will be null.

object: "collection"

The kind of object returned.

pages: {
    next_url: null | string;
    per_page: number;
    previous_url: null | string;
}

Pagination Info for the collection.

Type declaration

  • next_url: null | string

    The URL of the next page of results. If there are no more results, the value is null.

  • per_page: number

    Maximum number of items delivered per page for this collection.

  • previous_url: null | string

    The URL of the previous page of results. If there are no results at all or no previous page to go to, the value is null.

total_count: number

The total number of items in the collection.

url: string

The URL of the request. For collections, that will contain all the filters and options you've passed to the API.

code?: undefined

A collection will never have a code property.

error?: undefined

A collection will never have an error property.