Skip to content

Unofficial Samsung ARTIK Cloud Golang library support

License

Notifications You must be signed in to change notification settings

projekt86/goartik-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goartik-Cloud

Goartik-Cloud is Golang library for Samsung ARTIK Cloud.

Todo

  • Trails API
  • Docs
  • More example projects

Installation

go get -u github.com/projekt86/goartik-cloud

Examples

Set AccessToken to default APIClient

client.DefaultAPIClient.AccessToken = "ACCESS_TOKEN"

Create New APIClient

apiClient := &client.APIClient{
	AccessToken: "",
}

Create new Device API instance with default APIClient

devicesAPIClient := api.NewDevicesAPI()

Create new Device API instance with custom APIClient

apiClient := &client.APIClient{
	AccessToken: "ACCESS_TOKEN",
}
devicesAPIClient := api.NewDevicesAPIWithClient(apiClient)

Sample get request

r, err := devicesAPIClient.GetDeviceStatus("8b40bdd25aac47a29bc67f866c3928d8", true, true)
if err != nil {
	fmt.Println(err.Error())
}
if err := r11.Error; err != nil {
	fmt.Println(*err)
} else {
	fmt.Println(*r11.Data)
}

License

MIT licensed. See the LICENSE file for details.

About

Unofficial Samsung ARTIK Cloud Golang library support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages