go-itg/README.md

34 lines
819 B
Markdown
Raw Permalink Normal View History

2018-06-26 22:36:40 +00:00
# go-itg
2018-07-22 08:15:24 +00:00
IT Glue API Structs + Methods for the Go
2018-06-26 22:38:46 +00:00
This is nowhere near complete, and at least for now, I will only be adding support the functionality required for use within my organization. Feel free to send a pull request if you'd like to contribute anything that's missing.
2018-06-30 05:56:03 +00:00
# Installation
```
2018-07-02 22:16:49 +00:00
go get deadbeef.codes/steven/go-itg
```
2018-06-30 05:56:03 +00:00
# Usage
```
package main
import (
"fmt"
2018-07-22 08:15:24 +00:00
"log"
2018-07-02 22:16:49 +00:00
"deadbeef.codes/steven/go-itg/itglue"
)
func main() {
2018-07-22 08:15:24 +00:00
fmt.Println("Example IT Glue Application")
itg := itglue.NewITGAPI("ITG.XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXX")
nd, err := itg.GetOrganizationByName("Next Digital Inc.") //Returns an organization list
if err != nil {
log.Fatalf("could not get nd: %s", err)
}
log.Printf("%s - %s\n", nd.Data[0].ID, nd.Data[0].Attributes.Name)
}
2018-07-22 08:15:24 +00:00
```