Install your specific service package with the following go get command.
You can install the entire SDK by installing the root package:
$ go get github.com/XiaoMi/galaxy-sdk-go
Configuring Credential
Before using the SDK, ensure that you’ve configured credential.
You can get the necessary credential by registering on http://dev.xiaomi.com/.
To configure credential, you may use codes like:
Installing
Install your specific service package with the following go get command. You can install the entire SDK by installing the root package:
$ go get github.com/XiaoMi/galaxy-sdk-goConfiguring Credential
Before using the SDK, ensure that you’ve configured credential. You can get the necessary credential by registering on http://dev.xiaomi.com/. To configure credential, you may use codes like:
Usage
To use SDK, you can import like:
We have an example in examples/basic.go, users can run this example after credential configured: