Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.04 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.04 KB

go-planetlab

Build Status

Go client library for accessing the PlanetLab API. Note that this library only provides wrappers for the methods not requiring admin or PI access to the API. Furthermore, no delete methods have been implemented aside from DeleteKey, since deletion may have huge consequences.

Usage

Simply import "github.com/axelniklasson/go-planetlab/planetlab", instantiate an Auth object and start calling methods. Basic example can be found below.

package main

import (
  "fmt"
  "log"

  "github.com/axelniklasson/go-planetlab/planetlab"
)

func main() {
  auth := planetlab.GetClientAuth("username", "password")
  sliceFilter := struct{
    Name string `xmlrpc:"name"`  
  }{"chalmersple_2018_10_29"}

  slices, err := planetlab.GetSlices(auth, sliceFilter)
  if err != nil {
    log.Fatal(err)
  }

  // do something interesting with the found slices
}