GithubHelp home page GithubHelp logo

00-00-00-11 / sbhacksvii-api-requests-collection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbhacks-org/sbhacksvii-api-requests-collection

0.0 1.0 0.0 20 KB

SB Hacks VII API Workshop Request Collection. Plug and Play these for your apps!

JavaScript 32.61% Python 44.17% HTML 23.22%

sbhacksvii-api-requests-collection's Introduction

SB Hacks VII API Requests Collection

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!)

How to run the examples

Node.js

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

JavaScript

Open 'index.html' file in the browser of your choice. You can do this by right-clicking on the file and clicking "Open with" Open with browser

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. You should see something like this

Python

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

How to run the Demos

Flask Demo

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

HTML/CSS/JavaScript Demo

Open it the same way you would open the JavaScript request-example.

sbhacksvii-api-requests-collection's People

Contributors

d-guo avatar jayleenli 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.