Suppose there are resource like
user - users registered
book - books available in the library
favourite books - users favourite books.
What is the RESTful way to construct the URL for favourite books of a user?
I have confusion on hierarchy of resources in URL. How can I form correct URLs?
The following are the URLs that comes into my mind when there is request to find out favourite books of a user.
users/:user_id/favourites/books
users/:user_id/books/favourites
users/:user_id/favourite_books
What is the correct way of constructing the URLs?