GithubHelp home page GithubHelp logo

cs361_individual_project's Introduction

CS361 Individual Project - Pet Finder

Hosting TBD: I have not deployed this yet... but you can go ahead an run it locally, if you're so inclined.

Getting started (steps if you want to run this on your own):

  • clone repo
  • create a virtual environment: python -m venv venv
  • activate the virtual environment: source venv/bin/activate
  • install dependencies: pip install -r requirements.txt
  • create a file at the root of the project called: "google_api_key" and copy and paste your google "places" api key into the file
  • startup flask: flask run

Making requests; this services exposes two API services: places_api and place_detail_api ... accessible through http GET requests:

  1. /places_api ... takes three parameters:
[{
    business_status: "OPERATIONAL",
    distance_miles: 3.4,
    geometry: {
        location: {
            lat: 45.6183988,
            lng: -123.1146567
        },
        viewport: {
            northeast: {
                lat: 45.61974842989272,
                lng: -123.1132174701073
            },
            southwest: {
                lat: 45.61704877010727,
                lng: -123.1159171298928
            }
        }
    },
    icon: "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/generic_business-71.png",
    icon_background_color: "#7B9EB0",
    icon_mask_base_uri: "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet",
    name: "Banks Veterinary Service",
    opening_hours: {
        open_now: false
    },
    photos: [{
        height: 5312,
        html_attributions: [
            "<a href="
            https: //maps.google.com/maps/contrib/113637864926839469960">James Griffith</a>"
        ],
        photo_reference: "AfLeUgM_oulB--FH2gA9LPMwGMrSNX2GX9xkAgrAxyoha0Oyj-BWuLHTxM_MFptZfqQS5WJvBT75a72Hd3uv2zTjS0mHL9dn7AkW14NZ9PAvmnghOWrI62SJDdJRRQF9gF-2B3i1apV9VC-rImls5gW0vX0gVCK-6XSv6ITeR4v3bzFdraTy",
        width: 2988
    }],
    place_id: "ChIJVVVVVUAdlVQRnZRoyaPTbQc",
    plus_code: {
        compound_code: "JV9P+94 Banks, Oregon",
        global_code: "84QRJV9P+94"
    },
    rating: 4.7,
    reference: "ChIJVVVVVUAdlVQRnZRoyaPTbQc",
    scope: "GOOGLE",
    types: [
        "veterinary_care",
        "point_of_interest",
        "establishment"
    ],
    user_ratings_total: 283,
    vicinity: "13541 NW Main St, Banks"
}]
  1. /place_detail_api ... takes a single parameter NOTE: Careful with the place_detail_api as it does charge per request $0.003 per call (adds up)... which is why this is a separate endpoint (prefer user interaction) and I have not included my google_api_key ;)
{
    formatted_address: "2625 Pacific Ave, Forest Grove, OR 97116, USA",
    formatted_phone_number: "(503) 357-8880",
    name: "Pacific Avenue Veterinary Clinic",
    place_id: "ChIJ-z9MCdUblVQRu4KBPhaDBlk",
    url: "https://maps.google.com/?cid=6414958850797044411",
    website: "https://www.pacificavenuevetclinic.com/"
}

Basic UML:

alt text

cs361_individual_project's People

Contributors

pederjas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.