go-itg/README.md

27 lines
860 B
Markdown
Raw Normal View History

2018-06-26 22:36:40 +00:00
# go-itg
IT Glue API Structs + Receivers 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
```
go get github.com/StevenPolley/go-itg
```
2018-06-30 05:56:03 +00:00
# Usage
```
package main
import (
"fmt"
"github.com/StevenPolley/go-itg/itglue"
)
func main() {
itgAPI := itglue.NewITGAPI("ITG.XXXXXXXXXXXXX555555YOURAPIDKEYHERE2222222222222222XXXXXX")
fmt.Println((*itgAPI).GetOrganizationByID(1234242).Data.Attributes.Name) //Returns the name of the Organization with ID 1234242
fmt.Println((*itgAPI).GetOrganizationByName("test Org Inc.").Data[0].Attributes.Description) //Returns the description of the Organization with Name "Test Org Inc."
}
```