@types/pet-finder-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Installation

npm install --save @types/pet-finder-api

Summary

This package contains type definitions for pet-finder-api (https://github.com/drlukeangel/Pet-Finder-API-Javascript-Library).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pet-finder-api.

index.d.ts

// Type definitions for pet-finder-api 1.0
// Project: https://github.com/drlukeangel/Pet-Finder-API-Javascript-Library
// Definitions by: ncipollina <https://github.com/ncipollina>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function petFinder(api_key: string, api_secret: string, options?: any): petFinder.PetFinder;

declare namespace petFinder {
    interface PetFinder {
        getBreedList(animal: string, callback: (err: any, breedArray: string[]) => void): void;
        getPet(petId: number, options: any, callback: (error: any, pet: Pet) => void): void;
        getRandomPet(options: any, callback: (error: any, pet: Pet) => void): void;
        findPet(options: any, callback: (error: any, pets: Pet[]) => void): void;
        findShelter(location: string, options: any, callback: (error: any, shelters: Shelter[]) => void): void;
        getShelter(shelterId: string, options: any, callback: (error: any, shelter: Shelter) => void): void;
        getPetsInShelter(shelterId: string, options: any, callback: (error: any, pets: Pet[]) => void): void;
        getSheltersWithBreeds(
            animal: string,
            breed: string,
            options: any,
            callback: (error: any, shelters: Shelter[]) => void,
        ): void;
    }

    interface Pet {
        id: number;
        name: string;
        status: string;
        description: string;
        sex: string;
        age: string;
        size: string;
        mix: string;
        animal: string;
        shelterId: string;
        shelterPetId: string;
        contact: Contact;
        options: string[];
        breeds: string[];
        media: any;
    }

    interface Shelter {
        id: string;
        name: string;
        email: string;
        phone: string;
        fax: string;
        address1: string;
        address2: string;
        city: string;
        state: string;
        zip: string;
        country: string;
        longitude: number;
        latitude: number;
    }

    interface Contact {
        email: string;
        phone: string;
        fax: string;
        address1: string;
        address2: string;
        city: string;
        state: string;
        zip: string;
    }
}

export = petFinder;

Additional Details

  • Last updated: Sun, 24 Sep 2023 06:37:28 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by ncipollina.

Keywords

none

Install

DownloadsWeekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

7.14 kB

Total Files

5

Last publish

Collaborators

  • types