libdevice42

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 0 Imported by: 0

README

libdevice42

This is a code-generated library for the device42 REST api. It uses go-swagger to generate the associated structures.

Getting started

package main

import (
	"fmt"
	"github.com/poroping/libdevice42/client"
	"github.com/poroping/libdevice42/client/devices"
	"log"
)

func main() {
	d42 := client.NewHTTPClientWithConfig(nil, &client.TransportConfig{
		Host: "api.device42.com",
		BasePath: "/",
		Schemes: []string{"https"},
	})

	results, err := d42.Devices.GetDevices(&devices.GetDevicesParams{}, nil)

	if err != nil {
		log.Fatal(err.Error())
	}

	for _, device := range results.GetPayload().Devices {
		fmt.Println(fmt.Sprintf("%v", device))
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL