DEPRECATION NOTICE: This module has been deprecated in favor of servicenow-sdk-go
- Remove need for "resource"
- Build out Tables API
GoSnow is a Golang wrapper for the Service Now API.
go get github.com/michaeldcanady/gosnow
import "github.com/michaeldcanady/gosnow/v6/gosnow"
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Get(query, 0, 0, true, nil)
fmt.Println(respose.First())
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
// map of values to update
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Update(query, 1, 0, true, nil)
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Delete(query)
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
query := map[string]interface{}{}
respose, _ := CSTable.Create(query)
See CONTRIBUTORS.md
for details.
Michael Canady