Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VctorAHernndez committed Feb 2, 2020
0 parents commit b8b539c
Show file tree
Hide file tree
Showing 22 changed files with 21,186 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
client/node_modules
server/node_modules
client/.pnp
client/.pnp.js
client/npm-debug.log*

# testing
client/coverage

# production
client/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
78 changes: 78 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Food in PR

## Description

This is a small project I built after searching for places to eat in Puerto Rico via Yelp. At the time, not many restaurants I knew of were in their databases, so I decided on using a local website (www.sal.pr, which was more up-to-date), to scrape from and build an API where I could fetch the data easily in the form of JSON. My approach fetches up to __30 restaurants__ at a time with the given specifications.

Along with the small API, I built a basic frontend on React to interact with.

## Endpoints

* `GET /api/restaurants/` – gets restaurants with specifics in the parameters

## Parameters

* `keyword` – any word that may describe the restaurant
* `category` – any of the following:
* Asiática
* Árabe
* Argentina
* Bebidas
* Café
* Cervezas
* Vinos
* Brunch
* Burguers
* `area` – any of the following:
* Centro
* Este
* Metro
* Norte
* Oeste
* Sur
* `environment` – any of the following:
* Bistro
* Casual
* Familiar
* Fine Dining
* Fonda
* Guagüita
* Lounge
* Mesón Gastronómico
* `sortField` – any of the following:
* title
* rating
* precio
* `descending` – true or false

## Response Body

* `id` – id of the restaurant (according to SAL!)
* `name` – name of the restaurant
* `city` – city of the restaurant
* `price` – price of the restaurant ($, $\$, $\$\$, etc.)
* `description` – description of the restaurant (given by restaurant owner)
* `thumbnailURL` – thumbnailURL of the restaurant
* `imageURL` – imageURL of the restaurant
* `address` – address of the restaurant
* `rating` – rating of the restaurant (number from 1 to 5, one decimal precision)
* `url` – url of the restaurant's profile in SAL!'s website
* `coordinates` – coordinates of the restaurant (latitude first, longitude second)
* `area` – area of the restaurant (Metro, West, South, etc.)


## Plausible Future Updates

* Filter by price
* Cache previous results in browser for faster performance


## Sample Web Page

This repo contains a sample web page taken from SAL! (i.e. test.html) which is the result from making the following request at the time of development https://www.sal.pr/restaurantes/Asi%C3%A1tica/?s=+&area=Metro&ambiente=Casual&include=*


**DISCLAIMER: RESTAURANT DETAILS ARE GIVEN IN SPANISH**


Made by [Víctor Hernández](https://www.github.com/vctorahernndez)
Loading

0 comments on commit b8b539c

Please sign in to comment.