Download the PHP package albawebstudio/petfinder-api without Composer

On this page you can find all versions of the php package albawebstudio/petfinder-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package petfinder-api

Petfinder API helper for New Leash Rescue website

These library will help you with the usage of Petfinder API.

Latest Version on Packagist Total Downloads Packagist PHP Version

Installation

Require this package with composer. It is recommended to only require the package for development.

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

You can also set in your config with Petfinder API key, API secret and organization ID with .env vars.

Copy the package config to your local config with the publish command:

Using in Laravel Project

You can implement the requests using the following instructions.

Update .env

Append the following to the end of your .env file. You can find the API access information in the Developer Settings of your Petfinder account.

You can fetch your organization ID in several ways. Look at the animal shelter and rescue page and search for your organization. In the "shelter search results", hover over the search icon in the "Pet List" column. Your organization ID is the value after shelter_id=.

For example, if you hover over and see the following URL https://www.petfinder.com/pet-search?shelter_id=MN452, your organization ID is MN452.

Create a new controller for making the API requests. Our example we have created a controller PetfinderApiController.

The next step is to generate a new controller for fetching the animals data. We created a controller AnimalController.

*Note: The controller will extend the PetfinderApiController.

The AnimalController has the methods necessary to find all the animal information currently available through the Petfinder API. Be sure to check out all the query parameters available.

You have the option to generate a new controller for fetching the organizations data. We created a controller OrganizationController.

*Note: The controller will extend the PetfinderApiController.

The OrganizationController has the methods necessary to find all the organizations currently available through the Petfinder API. Be sure to check out all the query parameters available.

API Routes

Here is an example of how to set up the API routes. Added the following to routes/api.php


All versions of petfinder-api with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.2
illuminate/support Version ^9|^10
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package albawebstudio/petfinder-api contains the following files

Loading the files please wait ....