brendanhay / gogol

A comprehensive Google Services SDK for Haskell.
Other
282 stars 105 forks source link

Do not know how to use some endpoints - cannot find corresponding *Response definitions for those #65

Closed ababkin closed 7 years ago

ababkin commented 7 years ago

Hi

I successfully used endpoints like Network.Google.Resource.Container.Projects.Zones.Clusters.List for instance.

But i cannot seem to figure out where the corresponding *Response definition is for this call: https://hackage.haskell.org/package/gogol-compute-0.2.0/docs/Network-Google-Resource-Compute-Networks-List.html

Or perhaps it does not exist in the json definition and someone is supposed to add it? I wouldn't mind extending the json spec if needed. Is there some guide that explains how to do this?

Thanks

brendanhay commented 7 years ago

Hi @ababkin, the request name is NetworksList and the response is NetworkList. This is because the NetworkList type is 'shared', and also returned by other methods/operations. The naming is unfortunate, but it corresponds to both the types and operations in the JSON spec.

We can see this in the servant method signature, where Get [JSON] NetworkList is the response.

ababkin commented 7 years ago

thanks Brendan for being super-helpful as always!