{"id":16995674,"url":"https://github.com/lynnaloo/adopt-a-pet","last_synced_at":"2025-04-12T05:41:10.035Z","repository":{"id":14752676,"uuid":"77009539","full_name":"lynnaloo/adopt-a-pet","owner":"lynnaloo","description":":cat2: :dog2: Adopt-a-Pet API Client for Node.js","archived":false,"fork":false,"pushed_at":"2022-12-30T18:23:59.000Z","size":292,"stargazers_count":7,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-14T12:37:45.403Z","etag":null,"topics":["adopt-a-pet","adoption","animal","api","api-client","hacktoberfest","hacktoberfest2020","nodejs","npm","pets","rescue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lynnaloo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-21T02:44:04.000Z","updated_at":"2023-03-09T04:28:10.000Z","dependencies_parsed_at":"2023-01-13T18:06:15.268Z","dependency_job_id":null,"html_url":"https://github.com/lynnaloo/adopt-a-pet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynnaloo%2Fadopt-a-pet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynnaloo%2Fadopt-a-pet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynnaloo%2Fadopt-a-pet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lynnaloo%2Fadopt-a-pet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lynnaloo","download_url":"https://codeload.github.com/lynnaloo/adopt-a-pet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525162,"owners_count":21118617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adopt-a-pet","adoption","animal","api","api-client","hacktoberfest","hacktoberfest2020","nodejs","npm","pets","rescue"],"created_at":"2024-10-14T03:49:29.922Z","updated_at":"2025-04-12T05:41:10.011Z","avatar_url":"https://github.com/lynnaloo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adopt-a-Pet\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/lynnaloo/adopt-a-pet.svg)](https://greenkeeper.io/)\n[![Build Status](https://dev.azure.com/lynnaloo/adopt-a-pet/_apis/build/status/lynnaloo.adopt-a-pet?branchName=master)](https://dev.azure.com/lynnaloo/adopt-a-pet/_build/latest?definitionId=2\u0026branchName=master)\n\nAdopt-a-Pet API Client for Node\n\n## Installation\n\n*   Install [Node LTS](https://nodejs.org/)\n\n```\nnpm i adopt-a-pet\n```\n\n## Setup\n\n*   [Get API keys](http://www.adoptapet.com/shelter/portable_pet_list_api) for your shelter\n*   Set API key and ShelterId to environment variables: (optional)\n\n```\n  export ADOPT_API_KEY=xxx\n  export SHELTER_ID=90641\n```\n\n## Usage:\n\n```javascript\nconst AdoptPet = require('adopt-a-pet')\n\n// Instantiate the adopt-a-pet API Client\n// Parameters are not required if environment variables are set\nconst adoptPet = new AdoptPet(shelterId, apiKey)\n\n//\n// Get all pets for current shelter\n//\nadoptPet.getPets()\n.then((pets) =\u003e {\n  // returns an array of pet objects\n  return pets;\n});\n\n//\n// Get a random pet from the list of current shelter pets\n//\nadoptPet.getRandomPet()\n.then((pet) =\u003e {\n  // return the random pet object\n  return pet;\n})\n\n//\n// Get pet details using a petId and boolean to limit details\n//\nadoptPet.getPetDetails(petId, true)\n.then((pet) =\u003e {\n  // returns detailed pet object\n  return pet;\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynnaloo%2Fadopt-a-pet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flynnaloo%2Fadopt-a-pet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flynnaloo%2Fadopt-a-pet/lists"}