REST API with Ruby on Rails: The Complete Guide
4.5 (174 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,059 students enrolled

REST API with Ruby on Rails: The Complete Guide

Create complete REST API application using Ruby on Rails and Test Driven Development!
4.5 (174 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
1,059 students enrolled
Created by Sebastian Wilgosz
Last updated 4/2019
English
English
Current price: $48.99 Original price: $69.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 5.5 hours on-demand video
  • 11 articles
  • 2 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Create modern Ruby on Rails API applications with the best practices.
  • Create backend for a LinkLog application, similar to RubyFlow.
  • Be an expert with TDD (Test Driven Development)
  • Authenticate users using their logins and encrypted passwords!
  • Authorise your applications using Social Media as a leverage to get registered users!
  • Integrate application with Github using oAuth!
  • Write micro services that you can hook up anything into!
  • You will be able to get a job on those professions: Ruby on Rails developer, backend developer!
  • Find and Kill any bugs in your Rails applications
  • Test application responses in a very convenient way
  • Authorise requests and manage access
  • Write automatic tests like the best developers do every single day
  • Write REAL applications that actually works
  • Deploy application so it will be publicly available
  • Work with database relationships and manage related objects
  • Master CRUD ( create, read, update, destroy ) with REST API
  • Serialise responses using the most popular format
  • Continue and improve your skills even after the course ends using communication channels and resources!
Course content
Expand all 69 lectures 05:39:21
+ Introduction
3 lectures 06:21

In this video I explain how this course is structured, what are the main points and explain why the API applications are so important. I also talk about Test Driven Development used across the whole course and why we focused on API only here. Hope You'll find it useful and happy learning!


Preview 04:52
A word about: Asking for help and resources.
01:13
Our Students Chat Room
00:15
+ Best Practices: Postman App
8 lectures 30:16

Get familiar with the concept of postman application and why it's so useful for API developers.

Postman: Introduction
02:56

In this video we'll go through the main interface and will create a first request to get a data of article's collection. It's a first real communication with the application serwer we'll write later in the course.

Postman Basics: New request
05:23
Practice creating basic requests to the server by creating two GET requests using the Postman app. One getting details of a single article and the other listing its comments!
Postman Basics: Assigment: Getting data from the server
1 question

In this video we'll learn how to create resources using Postman requests and we'll do it by creating the most important one: a user's registration!

Postman Basics: Post request
05:48
In this challenge I want you to login the user you just registered. We'll need this functionality later so it's really important but not very hard.
Postman Basics: Assignment: Logging In User
1 question

Learn one of the most useful tricks for API developers that can give you a huge productivity boost in all of your projects - an automatic documentation from Postman.

Postman Basics: Automatic Documentation
02:34

In this lesson we're going into more advanced stuff possible with Postman application. In the video I present how to use the access token to authorize requests against our API so it's possible to create and update articles or add article's comments.

Postman Advanced: Authorized Requests
06:06

Postman allows your productivity to be boosted like crazy and in this lesson we'll cover a first tip how to achieve that. I'll show you how to use environment variables and dynamic content in your requests definition. After that You'll be able to switch between production and development environments with no time!

Postman Advanced: Environments & Variables
05:29

Summary of what we learned and a presentation of the complete course endpoints collection and API documentation for application we'll build.

Postman: Section Wrap Up & Rails API Documentation!
01:47

In this document you'll find all information you need make most of the Postman Application, together with the whole documentation for this course's API.

Useful Resources & links
00:13
+ Starting the Project: Environment setup
4 lectures 04:56
A word about my terminal
00:33
A word about my editor
00:23
Installing required software
00:12

In this lesson, you will learn how to set up a scaffold for an API application and add basic gems that will help us through the whole course.

Preview 03:47
+ Introduction to API
1 lecture 05:24

This lesson is a short introduction for API in general and what is our goal in the next few lessons. After you go through it You'll be more familiar with the API concept and possible types of communication between client and server. You also will understand better all future coding lessons, so I strongly encourage you to check it out.

About API
05:24
+ Article Model
2 lectures 08:22

After watching this video you'll be able to create an article model using the model generator with all necessary attributes. Also, you are going to learn how to add new articles and destroy existing ones.

Preview 01:40

Here you'll learn how to create a system that identifies if articles are valid and how to test it out.

Preview 06:42
+ Getting Articles' infromation
10 lectures 35:21

In this lesson you'll learn how to implement rounting to your list of articles by adding routes, creating controllers and using CRUD actions to pass the routing test (which you are also going to learn how to make during this lecture).

Articles collection route
04:54

Here is the explanation for an error from the previous lesson. When you finish this part you'll understand the routing much better. Also you'll acquire knowledge how to render json responses in the browser.

Routing explained
02:29
Routing for article's show action
00:23

In this lesson you'll learn how to receive an empty array using TDD. You'll also see here practical examples of the server requests.

Listing Articles - Empty JSON
05:48

API already returns expected data, but there are returned in the wrong format. Here we'll cover how to make the controller listing articles in a an expected format and which gems could help us with that.

Serializing Articles
06:16

Technology sometimes change faster than it's possible to record videos! In this article I share a reference to a tutorial how to switch from ActiveModelSerializers gem into the newer and faster one!

Using different gem for serialization
00:19

In this lesson you are going to learn how to make the code much shorter, cleaner and overall nicer. We refactor the code to save a lot of time later.

Code improvements
05:06

In this episode you'll learn how to make articles being listed in a correct order automatically (from newest to oldest) to simulate the news feed.

Recent articles
03:54

After completing this lecture you’ll know how to implement an important performance feature for our API - pagination.

Paginating resources
06:00
Code Exercise: Articles#show controller
00:11
+ Authentication Pre-setup
4 lectures 15:09

Here you’ll learn the basics of Oauth flow concept. It’s going to allow you to make a viable authorization method for your application’s users.

Oauth Flow explained
02:53

This short lesson is a quick guide about creating the Github Oauth application which'll be necessary for our authorization system.

Create Github Application
01:01

Here you’ll learn how to integrate the authorization engine with your application using a gem “Octokit”  created by the community. Also there’s a lot of useful information about it, so keep an open mind!

Octokit Gem installation
03:14

In this episode we'll create a fully functional user object that'll be used in our authentication system, articles and comments later on. 

Create User object
08:01
+ Authentication - Oauth Flow
11 lectures 01:00:45

Here you’ll learn about basics of the final authentication service. We handled here the case when user is not authorized. Here also you'll going to improve your TDD skills a lot.

Authentication service - failure
06:52

In this lesson we continue with authorization service by covering successed case. To do it we'll “mock” the gem's methods to behave the way we expected. It's a pretty important, so stay tuned!

Authentication service - success
10:32

Here you’ll learn how to implement a feature responsible for completing user’s logging in and registration by reusing the existing users. The lesson’s title kind of speaks for itself.

Reuse existing users
02:46

In this lesson we prepare the token to finish our authentication system using TDD and allowing frontend to send the authorized requests.

Token preparation
04:54

Now it's time to add endpoints for the purpose of managing sessions to finally authenticate our users and implement routing. Note: Routing won't be fully operational yet, so it’s going to need some improvements, which will be covered in the next lesson.

Login User Endpoint - Routing
01:50

In this lesson we add controller tests for unauthorized requests. Before we handle the success request, it's essentional to take care of all inappropriate requests user can sent to us.

Login User Endpoint - Unauthorized
06:28

Refactoring time! To keep our management and productivity being the best as possible, we'll take care of moving some of the duplicated code into more manageable snippets, that we can reuse in the future. This lesson'll save a lot of time for us in the future.

Shared Examples
03:36

After completing this lesson you’ll be able to correctly finish the registration and logging in processes by using TDD and fix some glitches that come with it. Also there’s a handy example of “mocking” the gem included that will help you fully understand it.

Create session - success
07:20

In this lesson we'll start implementing a very important feature - logging out. This time, again we start from unauthorized requests, and from this we'll cover the success ones next.

Authorization error handler
04:35

As we introduced the authorization, some of our already written tests started to fail. Here are solutions to errors from the previous lesson that make the code a lot more viable.

Refactoring error tests
03:41

This is the last lesson about authorization and authentication. We’ll do the rest of the major work with logging out feature and add finishing touches to our code now. All of that in Test Driven Development of course!

Logout and authorize!
08:11
+ Articles management
6 lectures 33:32

The first part of implementing the endpoint to create new articles. We'll cover here unauthorized requests together with testing them here.

Create Articles - unauthorized request
04:39

In this lesson you’ll mainly learn how to handle validation errors from your API endpoints. So there won't be any invalid articles saved in our database.

Handle validation errors
06:56

Here we’ll cover the final parts of article creation when everything is authorized and valid. Also, you're going to improve your skills in TDD with other examples.

Create Articles - success call
07:35

Name speaks for itself. In this short lesson you're going to see my approach for the exercise I gave you before. I cover here the complete functionality for updating articles in our database. There are some improvements yet to be done which are covered in the next episode.

Article's Update showcase
03:25

In this lecture you’ll learn how to prevent users from changing or even deleting other users’ articles to prevent griefing and make our application private.

Updating articles tweaks
06:25

In this lecture I show you how to make a possibility of destroying (deleting) articles by your users. Of course - users'll be able to delete only their articles and that's because of what we’ve done in our previous lesson.

I strongly suggest you to see this episode AFTER you try to implement this feature on your own.

Article's removal showcase
04:32
+ Comments management
4 lectures 39:29

In this lesson we starts comments system for our application. We choose different approach this time, using rails' built in "scaffold" generators.

In this first part we need to do some cleanup and refactoring to make all automatically generated tests related to listing articles being nice and green. It's quite a lot of work to do, but I'm sure you’ll succeed! 

Listing comments - scaffolds cleanup
10:01

Here improve the code related to the comment's creation to make all test passing. We clean up a lot, but there're still a lot of things to improve in the next lessons.

Creating comments - scaffold cleanup
12:03

In this lesson you are going to learn how to finish implementing comment listing, fix some errors that come with automatic scaffold generators and make it overall nice and clean.

Listing comments improvements
10:10

Here are final improvements and fixes for problems in comment creating feature. After finishing this lecture you’ll complete the first version of your application, ready for release, so congratulations for doing so well!

Creating comments improverments
07:15
Requirements
  • You should have basic Ruby on Rails experience
Description

Build an API application that you can use EVERYWHERE and hook up ANYTHING into it!

Check out!

  • SUPER productive videos with a total focus on what is important!

  • CODE SNIPPETS for each coding lesson!

  • Comprehensive resources and articles!

  • Learn Test Driven Development like a PRO

  • Get familiar with best Practices for API development!


In this course, you'll know how to create professional API application in Ruby on Rails with TDD!


You probably heard about a popular trend to create web applications with a split API and frontend parts. Having a pure API application allows you to hook up ANY frontend you will ever wish. 


Knowledge about creating pure API applications is necessary for modern microservice architectures for REALLY BIG projects!


-------------------------------------------------


What Will You Build?


All of my courses are 'learn-by-doing': I'll create a real-life application and you can follow each step to make similar one for yourself.  In this course we'll build one complete API application, that can work as a link-log, similar to RubyFlow project. We'll do all this using Test Driven Development, the way the best developers in the world develop their applications every day.


This mega app will include the full set of features, including everything from authentication to managing comments.  You'll learn how to create an app that allows multiple users to log in, publicize articles and list them as a newsfeed.  It's my goal to ensure you understand each feature we build into this app so you can apply them to your own personal or professional projects in the future.


I can always help in case of any troubles so if you'll encounter some, just write through one of our communication channels.


----------------------------------------------------------------


Here is what we'll learn:


Basic/Intermediate API

  • Create modern Ruby on Rails API applications with the best practices.

  • Create backend for a LinkLog application, similar to RubyFlow.

  • Authenticate users using their logins and encrypted passwords!

  • Authorize your applications using Social Media as leverage to get registered users!

  • Register new users!

  • Integrate application with Github using oAuth!

  • Write microservices that you can hook up anything into!

  • You will be able to get a job on those professions: Ruby on Rails developer, backend developer!

  • Find and Kill any bugs in your Rails applications

  • Test application responses in a very convenient way

  • Write REAL applications that actually works

  • Deploy application so it will be publicly available

  • Work with database relationships and manage related objects

  • Master CRUD ( create, read, update, destroy ) with REST API

  • Serialize responses using the most popular format


Professional API topics

  • Be an expert with TDD (Test Driven Development)

  • Authorize requests and manage access

  • Write automatic tests like the best developers do every single day

  • Advanced API Error Handling!

  • Continue and improve your skills even after the course ends using our communication channels and external resources!


I've built the course that I would have wanted to take when I was learning to build RESTful API for my applications. A course that explains the concepts and how they're implemented in the best order for you to learn and understand them.


I know your time is expensive, so I prepared really compressed videos, including only what's important!


Feel free to check it out!

Who this course is for:
  • This course is for any web developer that want to create modern web applications using API and frontend split apart.
  • It's perfect for a junior Ruby developer who want to learn creating modern API applications.
  • It's also a choice of intermediate developer that want to be even better.