This video deals with the data sources, directory structure, and code.
- [Narrator] In the previous video we looked at…an overview of OAuth.…In this video, we will look at a sample…application called architecture.…We will start by looking at the…application's data sources.…Then, we will look at the source…called directory structure and finally,…we will look at the server code architecture…and the client code architecture.…Let's start by looking at our data sources.…We have two data sources, Twitter's API…and the Application Database.…
We use Twitter's API to get the user's friends…and we access it using the…authenticator.js module and we use the…Application Database to get the user's…friends and notes and we access it using…the storage.js module.…We store the user's friends in our database…because calling Twitter's API is costly,…both in terms of money and performance.…Let's look at the process of getting…a user's friends.…First, we query our database.…
If the friends are in the database…we return them.…If not, we query Twitter's API, get the user's friends,…save them in our database and return them.…
This Node.js course gives you an overview of a RESTful API and the logical steps of creating one. It explores three different APIs, focusing on their similarities and differences and how to effectively implement one. Instructor 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. Learn how to develop Twitter Notes, a sample web application that lets users leave notes for their Twitter friends. Use Twitter's API to implement a login flow and then design a web API. Additionally, get a closer look at several other real-world APIs, and 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
- Testing user-perceived performance
- Looking at APIs in the real world
- Best practices for building RESTful APIs