learn-co-curriculum / dsc-http-request-response-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
https://learning.flatironschool.com/courses/5315/assignments/176478?module_item_id=388592
The Lab for HTTP Request/Cycle still references the API Overhead Pass Predictions for the International Space Station but according to the http://open-notify.org website, that API has been removed.
## Level Up (Optional) - Investigating other API endpoints
### Next pass of International space station for a given location
Let's repeat the exercise for another endpoint `iss-pass.json`. This endpoint is used to query the next pass of the space station on a given location.
The Open Notify website states that the Next Pass api is no longer available. When I am attempting to run through the level up it is returning a 404 error that it cannot be found.
http://open-notify.org/Open-Notify-API/ISS-Pass-Times/
https://learning.flatironschool.com/courses/5874/assignments/217968?module_item_id=507955
Thought I had the solution to the last problem but it still gave me an error so I looked at the solution.
The solution looked almost the same so I copied it to see if I miss something but gave a similar error.
# Set up the parameters we want to pass to the API.
# This is the latitude and longitude of New York City.
parameters = {"lat": 40.71, "lon": -74}
# Make a get request with the parameters.
response = requests.get("http://api.open-notify.org/iss-pass.json", params=parameters)
print(response.status_code)
# Print the content of the response (the data the server returned)
print(dict(response.headers))
print(response.text)
200
{'Server': 'nginx/1.10.3', 'Date': 'Thu, 31 Mar 2022 18:54:40 GMT', 'Content-Type': 'application/json', 'Content-Length': '519', 'Connection': 'keep-alive', 'Via': '1.1 vegur'}
{
"message": "success",
"request": {
"altitude": 100,
"datetime": 1648752200,
"latitude": 40.71,
"longitude": -74.0,
"passes": 5
},
"response": [
{
"duration": 647,
"risetime": 1648755267
},
{
"duration": 580,
"risetime": 1648761143
},
{
"duration": 570,
"risetime": 1648767017
},
{
"duration": 639,
"risetime": 1648772833
},
{
"duration": 627,
"risetime": 1648778642
}
]
}
It may just need to be updated but unsure
The error resulted in 404 which the wiki says its not available rather than not found.
https://learning.flatironschool.com/courses/5329/assignments/187442?module_item_id=417471
Level Up (Optional) - Investigating other API endpoints
Next pass of International space station for a given location
Let's repeat the exercise for another endpoint iss-pass.json. This endpoint is used to query the next pass of the space station on a given location.
The iss-pass api has been removed
http://open-notify.org/Open-Notify-API/ISS-Pass-Times/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.