O'Reilly logo

Rails 4 in Action: Revised Edition of Rails 3 in Action by Ryan Bigg, Yehuda Katz, Steve Klabnik, and Rebecca Skinner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Designing an API

This chapter covers

  • Creating JSON responses using ActiveModel::Serializers
  • Creating an API namespace
  • Request testing and using HTTParty for manually interacting with your API
  • Responding appropriately to common API errors

It’s becoming more and more apparent that if you have an application of any significance, you’re going to need an application programming interface, or API. Some applications are only an API. ProgrammableWeb (www.programmableweb.com/), a blog that keeps track of the API space, has a directory of APIs, and at the time of writing, there are 13,628 being tracked. By the time you read this, there could be over 15,000 listed. That’s a lot of APIs!

In this chapter, we’ll compare a few different ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required