Return proper structs on the methods.

Giving the JSON returned by the API we are creating a proper struct in
each case.

In case of error (non 2xx response) we will create an error struct.