Using gRPC API in go

Hi guys,

I’m back here! I have compiled every sources (bridge + server + app-server) for my gentoo distib.
And i havent any web interface on this distrib, so i was trying to use the grpc Api to add node, application and get their status something like “connected, unconnected”.

I was reading the @brocaar example :
https://www.loraserver.io/lora-app-server/integrate/grpc/

And i am quitte lost, in the example you are using api.NewNodeClient or nodeAPI.Create, and i can’t find any documentation about those functions in https://godoc.org/github.com/brocaar/lora-app-server/api.
So i am not so sure about which functions using. :confused:

Thanks guys!! :smiley:

Good catch, that was renamed some releases ago from Node to Device to make everything consistent.

Ok thanks,

so can i asked for some help?
If i got nothing configured on my app-server and i a want to add some device can i code something like this? (

But i don’t really understand what i have to use for OrganizationId or for the Payloads

Thanks

Please see the Organization.Create response and Application.Create response, in both cases an ID is returned :wink: So instead of _, err =, use resp, err = and inspect the content of the resp struct.