The information revolution is enabled by an abundance of APIs – or Application Program Interfaces
IntroductionIt is truly a great time to be a programmer. Thanks to the Internet, people who understand how to program computers have nearly unprecedented access to information. In the 21st century, the world truly is at our fingertips.
The information revolution is enabled by an abundance of APIs – or Application Program Interfaces. APIs are software layers that allow developers to share data between services in a common format. For web applications – which are what drive most everything nowadays, including mobile apps – the most common type of API uses what is called a RESTful interface. Understanding how to communicate with RESTful APIs will give you the power to make modern and compelling software that can use data from services such as Facebook and Twitter, and then do amazing things with that data.
Which is why, for your course project, you are going to create a Python application that gets data from a web API and displays it to the program user.
For this project, your program must meet the following requirements:
Use a graphical interface to prompt user for text to be sent to the Yoda Speak API
Understand the constraints of the Yoda Speak API and check the text to ensure that it meets those restraints before sending it. If it does not, tell the user what is wrong with it
Send the user’s text to the API and then display the result. If there is an error of any kind, inform the user of that error and ask them if they would like to try again
Once the result is successfully returned, give the user the option to save the result to a file on their computer.
The result file must contain the following:
Name of your program
The date and time the data was fetched
The user’s input text
The server’s result