I want to communicate with the Google Assistant SDK via C#, and the SDK website said that for languages other than Python, I need to setup gRPC. Are there any good tutorials on this that I can use to get started? Thanks :)
1 Answers
It should be possible to use assistant API SDK from any language that support gRPC (including C#), but if there is not pre-build assistant SDK available (looks like there is one for python, not sure about other languages), it is a bit more involved to do that. In short: The .proto API definitions for all public Google APIs (including assistant API) live in "googleapis/googleapis" github repo: https://github.com/googleapis/googleapis/tree/master/google/assistant/embedded/v1alpha1 In short, here's what you need to do:
- grab .proto definitions for the API from github
- generate proto messages/stubs in language of your choice (basically the same as in gRPC tutorials on grpc.io).
- authenticate with google using an auth library (http://www.grpc.io/docs/guides/auth.html)
- invoke API calls using a client stub generated in step 2.
Btw, the Google API client libraries are basically a pre-packaged result of these steps, sometimes with a bit of convenience layer on top of it improve the user friendliness of a given API.
Also, usually support for more languages is added to new APIs over time (so at some point there might be and official C# client library).