Workshop date: January 16th, 2020 @ 3pm PST
Hosted by: Jayleen Li and Daniel Guo from SB Hacks
This repo is meant to serve as a easy plug-n-play for API requests in popular hackathon languages like Python, JavaScript, and Node.js. Take the examples you see and copy paste them as you see fit!
Workshop description: Join SB Hacks for a introductory workshop on APIs and what they are, as well how to incorporate them into your hackathon projects quickly! Although there are so many ways to incorporate APIs, in the workshop we will show how call the Yelp API in a Flask app and a non authorized API in a pure front end (HTML/CSS/JavaScript) project.
This workshop is intended for those with some coding knowledge and some understanding of basic web development.
Link to Workshop Slides Link to Recording (will be available after the workshop!)
cd into the folder where the file is and do this in your terminal:
You may need to npm install axios
node node-js-req.js
Open 'index.html' file in the browser of your choice. You can do this by right-clicking on the file and clicking "Open with"
You should see your code in the browser now. Right-click and click "Inspect". Then click the "Console" tab in the dev tools. This screenshot is in a chrome browser, and may look different for other browsers.
cd into the folder where the file is and do this in your terminal:
You may need to pip install requests
python python-req.py
cd into the folder where the file is and do this in your terminal:
You may need to pip install requests
and pip install flask
export FLASK_APP=app.py
flask run
Open it the same way you would open the JavaScript request-example.