This video deals with viewing Twitter’s IDs, designing asynchronous request handlers, and implementing them.
- [Instructor] In the previous video,…we explored Twitter's rest API.…In this video we will look at Twitter's IDs…and look up endpoints for getting friends.…We will design an asynchronous request handler…for these endpoints,…and finally, we will use async.js to implement our handler.…In some cases, we won't be able to get…all the data we need in one request.…For example, if you want to get a list of all friends,…you will need to traverse the cursors collection…by making multiple API calls.…
Async.js is a great module that helps us do that.…If it is not installed already,…make sure to install it using MPM install.…We will be hitting two different resources…to get the users friends.…First we will hit the friends/IDs resource.…This resource is a cursors collection of IDs.…It returns up to 5,000 IDs in one call.…Then we need to hit the users/lookup endpoint.…
This resource takes a list of up to 100 IDs…and returns an array of users.…If there are more than 100 friends,…we will be hitting the lookup endpoint more than once.…
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