Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Repository files navigation

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/mjpitz/libdevice42/client"
	"github.com/mjpitz/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))
	}
}

About

A code-generated Golang client library to the device42's REST API.

Topics

Resources

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages