Hitting Twitter’s API every time the app needs Twitter data is slow and can result in Twitter blocking our application. In this video, we will learn how to store Twitter’s data in our database to minimize the use of Twitter’s API.
- [Instructor] Hello.…This is the last video of this section.…In the previous video we looked at resources…and cursors collections in Twitters API…and learned how to use them with Async.js.…In this video we are going to take a look…at turning our code to resemble our sample application.…This involves modifying routes…and adding views and static files.…Then we will access MongoDB…using the official Node.js module.…Let's open the code files for this video.…We can see that there are two new folders and one new file.…
Storage.js has the code for accessing the database.…Public has our static files,…we can find two style sheets and an image.…Views has the two views…for the main page and the login page.…The login view is just static HTML.…The main page, on the other hand,…takes in an array of friends and their interests in a list.…To turn our code form the last video…to one that resembles our Twitter notes application…we have to make a few changes.…First we deleted the alt handlers for slash tweet,…slash search, slash friends, and slash old friends.…
This Node.js training course gives you an overview of a RESTful API and the logical steps of building one. It explores three different APIs, focusing on their similarities and differences to effectively implement one. Author Saleh Hamadeh starts off by defining APIs, showing how they can be built on top of HTTP and listing the properties that make an API RESTful. Then learn how to develop Twitter Notes, a sample web application that lets its users leave notes for their Twitter friends. You'll use Twitter's API to implement a login flow and then design a web API. In addition, you'll get a closer look at two other real-world APIs—Facebook API and GitHub API. Finally, learn some best practices to keep APIs secure, maintainable, and efficient.
- Identifying REST resources
- Setting up the development environment
- Consuming a RESTful API
- Creating an OAuth login request
- Getting an access token
- Saving data in MongoDB
- Building a RESTful API
- Looking at APIs in the real world
- Best practices for building RESTful APIs