@bachman-dev/wanikani-api-types - v1.8.0
    Preparing search index...

    Interface WKSubjectCollection

    A collection of subjects of mixed or unknown types returned from the WaniKani API.

    interface WKSubjectCollection {
        data: WKSubject[];
        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 Summary)

    Index

    Properties

    data: WKSubject[]

    An array of returned subjects of mixed or unknown 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.