Designing the API for the example
As we described in the first chapter, General Overview of the Example, we need to set the definition for the different interfaces that we will be working on in the example. Remember that the example is a microblogging application that will allow users to write their own text microposts so that they are available for others to read.
There are two main interfaces in the example:
- An HTML interface for allowing users to interact with the service using a browser
- A RESTful interface for allowing the creation of other clients like a smartphone app
In this chapter, we will describe the design of the second interface. We will start with a description of the different basic definitions and resources that we will use:
- User: A representation of the user of the application. It will be defined by a username and a password to be able to login.
- Micropost: A small text of up to 255 characters posted by a User. A Micropost...