Open uris77 opened 3 years ago
That is a good idea. We are using our in house RPC project to generate clients https://github.com/pacedotdev/oto If you are proficient with Dart maybe you can help us to create a template here https://github.com/pacedotdev/oto/tree/master/otohttp/templates
I can give it a shot, but I don't really understand oto
. I notice there is a templates file in oto
, and there is a client
directory in firesearch-sdk
that has templates also. I don't understand the difference between them. Does a template file in firesearch-sdk
require a corresponding template in oto
?
No, they are independent, you can do one or another, and we could reuse it, there are minimal differences like authentication. But to generate the client you need oto (the binary) installed, in local, have a look to the Makefile
The language of the template is https://github.com/gobuffalo/plush, but you can basically copy from other template and adapt it
I can't seem to install oto. I get this error:
go install github.com/pacedotdev/oto
cannot find package "github.com/pacedotdev/oto" in any of:
/Users/robertoguerra/.asdf/installs/golang/1.15.3/go/src/github.com/pacedotdev/oto (from $GOROOT)
/Users/robertoguerra/.asdf/installs/golang/1.15.3/packages/src/github.com/pacedotdev/oto (from $GOPATH)
I compiled oto
locally, but there were still some significant gaps when I tried to generate the templates (e.g. I do not know what (or where) the definitions are).
So I went ahead and used the existing generated sdks to create one for Dart: https://github.com/uris77/firesearch_sdk
I still need to add tests before I publish it. The entire motivation for me to use it is to replace Algolia on some of my mobile side projects, since Algolia is starting to get too expensive for me now, and Firesearch looks more affordable.
Glad you solved the go install
error, we can review that on oto
.
No worries, we could use your client to build a template, so if we make changes on the API, we could keep it in sync. It gives a really good baseline to work on the template. Thank you!
You can write us to hello@pace.dev and tell us what you are building or planing to use it, we can give you a license for the effort of the Dart client :)
Flutter is becoming a popular framework for writing cross-platform Mobile and Desktop apps. And Firebase is a popular database used in mobile app development. It would be nice to have a Dart client.