Skip to content

Latest commit

 

History

History
63 lines (59 loc) · 1.8 KB

README.md

File metadata and controls

63 lines (59 loc) · 1.8 KB

rescue-groups

Repository for Python Website for the rescue-groups API. You can find the deployed site on https://rescue-groups.onrender.com/

How to start application locally

Use docker-compose commands to build, run, and exec into

docker-compose build
docker-compose up -d
docker-compose exec rescue-groups-app bash
docker-compose down

Once inside the container run, and the website will be at the address localhost:9080:

GOOGLE_CLIENT_ID=<ID> GOOGLE_CLIENT_SECRET=<SECRET> uwsgi uwsgi.ini

Setup local secrets

Create a secrets.json file at the top level of the repository, so we can call the rescue groups API

{
    "rescue_group": {
        "url": "https://api.rescuegroups.org/http/v2.json",
        "api_key": <RESCUE_GROUPS_SECRET>,
        "data": {
            "apikey": <RESCUE_GROUPS_SECRET>,
            "objectType": "animals",
	    "objectAction": "publicSearch",
            "search": {
                "resultStart": 0,
                "resultLimit": 20,
                "fields": [
                    "animalName",
                    "animalThumbnailUrl",
                    "animalSex",
                    "animalGeneralAge",
                    "animalLocation",
                    "locationAddress"
                ],
                "filters": [
                    {
                        "fieldName": "animalSpecies",
                        "operation": "equals",
                        "criteria": "cat"
                    },
                    {
                        "fieldName": "animalLocation",
                        "operation": "equals",
                        "criteria": "48105"
                    }
                ]
            }
        }
    }
}

How to deploy project

Push code to master branch of github

git push heroku master