Lesson 11: Web Services and API's

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Introduction to Web Services and Web API’s Richard Holowczak Baruch College December, 2014.
CIS101 Introduction to Computing Week 05. Agenda Your questions Exam next week - Excel Introduction to the Internet & HTML Online HTML Resources Using.
More APIs: Web Services CMPT 281. Announcements Project milestone Lab: – Web services examples.
Computer Concepts 2014 Chapter 7 The Web and .
 Mary Jane Heider ◦ Director, Academic Computing ◦  Judie Littlejohn ◦ Online Learning ◦
JavaScript & jQuery the missing manual Chapter 11
© 2011 Autodesk Automating Autodesk® Revit® Server Rod Howarth Software Development Manager – Bornhorst + Ward.
Server-side Scripting Powering the webs favourite services.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
JavaScript – Quiz #9 Lecture Code:
Overview Web Session 3 Matakuliah: Web Database Tahun: 2008.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Advanced Web Technologies Lecture #4 By: Faraz Ahmed.
Web Server.
Website design and structure. A Website is a collection of webpages that are linked together. Webpages contain text, graphics, sound and video clips.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
The Internet What is the Internet? The Internet is a lot of computers over the whole world connected together so that they can share information. It.
IN THIS LESSON WE WILL REVIEW THE STRUCTURE OF THE INTERNET AND HOW BROWSERS ASSEMBLE WEBSITES BASED ON INSTRUCTIONS THEY RECEIVE FROM SERVERS. Internet.
HTML PROJECT #1 Project 1 Introduction to HTML. HTML Project 1: Introduction to HTML 2 Project Objectives 1.Describe the Internet and its associated key.
The World Wide Web.
Lesson 06: Functions Class Participation: Class Chat:
Android Application Web 1.
Introduction to gathering and analyzing data via APIs Gus Cavanaugh
HTTP and Abstraction on the Internet
HTTP AND ABSTRACTION ON THE INTERNET
Lesson 08: Files Class Participation: Class Chat: Attendance Code 
API (Application Program Interface)
Lesson 10: Dictionaries Topic: Introduction to Programming, Zybook Ch 9, P4E Ch 9. Slides on website.
Lesson 14: Web Scraping TopHat Attendance
Networking CS 3470, Section 1 Sarah Diesburg
REST: Web Services Abel Sanchez.
Data Virtualization Community Edition
Data Virtualization Tutorial… CORS and CIS
Node.js Express Web Services
Top Tips to Monitor & Manage Your Online Reputation Leveraging Social Media
Tracking and Booking Taxi
Project 1 Introduction to HTML.
Lesson 11: Web Services & API's
Data Virtualization Tutorial: JSON_TABLE Queries
Applied Cyber Infrastructure Concepts Fall 2017
IST256 : Applications Programming for Information Systems
Using Python to Interact with the EPA WATERS Web Services (part 2)
How to register and use ODMAP for Fire/EMS and other partners
IST256 : Applications Programming for Information Systems
MVC Framework, in general.
WEB API.
Navigating The World Wide Web
AJAX Robin Burke ECT 360.
Web scraping tools, an introduction
CMP Creating Your Personal and Small Business Web Sites
Lesson 06: Functions Class Chat: Attendance: Participation
Lesson 09: Lists Class Chat: Attendance: Participation
Hyper Text Transfer Protocol
API DOCUMENTATION Swetha Mohandas Microsoft Connect 2016
Sending a text message (and more)
Lesson 11: Web Services and API's
MIS JavaScript and API Workshop (Part 3)
Lesson 10: Dictionaries Class Chat: Attendance: Participation
REST APIs Maxwell Furman Department of MIS Fox School of Business
IST346: Web Services and API’s
Python and REST Kevin Hibma.
Bryan Burlingame 24 April 2019
Introduction to AJAX and JSON
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Sending a text message (and more)
Ajax and JSON Jeremy Shafer Department of MIS Fox School of Business
Consuming Web Services with 2E Generated Objects
Q/ Compare between HTTP & HTTPS? HTTP HTTPS
Intro to Web Services Consuming the Web.
Presentation transcript:

Lesson 11: Web Services and API's Class Participation: http://ist256.syr.edu/cp/11.html Class Chat: https://gitter.im/IST256/Fudge Attendance Code 

Questions? Ask in Our Course Chat! Agenda You’ve Read: Assigned Readings From http://ist256.syr.edu/ content/toc/#lesson- 11-web-services-and- apis How the Web Works Making HTTP requests using the Python requests module Parsing json responses into Python objects Procedure for calling API's How to read API documentation https://gitter.im/IST256/Fudge Questions? Ask in Our Course Chat!

Connect Activity Question: The Python module to consume Web API's is called: api requests http urllibrary

HTTP: The Protocol of The Web When you type a URL into your browser you’re making a request. The site processing your request sends a response. Part of the response is the status code. This indicates “what happened” The other part of the response is content (this is usually HTML) which is rendered by the browser. HTTP is a text based protocol. It is stateless meaning each request in independent of the other.

Watch Me Code 1 A Non-Python Demo of HTTP Request Verbs GET POST PUT DELETE A Non-Python Demo of HTTP What happens when you request a site? Like http://www.syr.edu ? Chrome Developer tools Now using requests. Response Status Codes Short and sweet demo

Check Yourself: Response Codes The HTTP Response code for success is 404 501 200 301

The Web Has Evolved…. From User-Consumption To Device-Consumption Check the news / weather in your browser Search the web for "George Washington's birthday" Internet is for people. Get news/ weather alerts on your Phone Ask Alexa “When is George Washingon's Birthday?" "Internet of Things"

Web API: The Programmable Web! An API is short for Application Programming Interface. A Web API uses the HTTP Protocol to communicate with your program. Web API’s can return data in many formats. We’ll focus on the JSON (JavaScript Object Notation) format which we've seen can be converted easily to Python objects. Thanks to APIs' we can write programs to interact with a variety of services.

Watch Me Code 2 Google’s Geocoding API Get a GPS coordinate (Latitude and Longitude) for a City or Street Address Parameters What you do with the response data is up to you! http://maps.googleapis.com/maps/api/geocode/json?address=addr Short and sweet demo

Check Yourself: Line of Code? Click on the line number which connects to the url.

The only limitation is your imagination! API’s R Awesum! The only limitation is your imagination! Leverage the power of the Internet to do almost anything! If you can USE it on a web page or mobile phone It probably has an API! Whether or not you can access the API is up to the provider. Not all API’s are free. Some require registration + authentication

Finding API's requires research… Start googling… "foreign exchange rate api" Then start reading the documentation on fixer.io …

API Registries http://www.programmableweb.com/ https://market.mashape.com/ 1,000's of APIs to search through Examples of how to use them and where to find documentation. Again: Not all are free.

API Research… No Magic Bullet Here. Expect to spend hours doing research Expect to read a lot of documentation Expect to write a lot of "throw away code" just to learn how to use the API. Expect to hit a lot of dead ends Expect to get frustrated in the process Sounds a lot like everything we do in this course… … do you see the pattern? Start Small. Start Simple.

Web API: Weather Forecasting https://darksky.net/dev Darksky.net / Forecast IO You must sign up for an API key 1000 free requests per day

End-To-End Example: Today's Weather Understand how to use Dark Sky API Let's write a program to input a city / state combination like "Syracuse, NY" Then outputs the weather forecast at that location!

Conclusion Activity "Cleared Up" What confused you in the assigned readings but now after lecture has been cleared up?