edgio-go-sdk

edgio/org

This package groups Edgio Organization specific funcs.

org.NewClient(params common.ClientParams) (ClientStruct, error)

credentials := common.Creds{
  Key:    "some-api-key",
  Secret: "some-api-secret",
}

client, _ := org.NewClient(common.ClientParams{Credentials: credentials})

This func returns a new client with the provided parameters, with an access token already set, and the default edgio params values for service, scope and API version (which can be overwritten if needed) to interact with your application’s orgs.

org.NewClient Mandatory Params

org.NewClient Optional Params & Default Values

org.Get(params common.URLParams) (getResultType, error)

credentials := common.Creds{
  Key:    "some-api-key",
  Secret: "some-api-secret",
}

client, _ := org.NewClient(common.ClientParams{Credentials: credentials})

client.Get(common.URLParams{Path: "some-org-id"}) // { "ID": "org-id", "Name": "org-name" }

This func returns the relevant organization details (name and id).

org.Get Mandatory Params

org.Get Optional Params & Default Values

There is no optional parameters for that function

org.Patch(params common.URLParams, body PatchBody) (common.Org, error)

credentials := common.Creds{
  Key:    "some-api-key",
  Secret: "some-api-secret",
}

client, _ := org.NewClient(common.ClientParams{Credentials: credentials})

client.Patch(common.URLParams{Path: "some-org-id"}, org.PatchBody{Name: "Some New Org Name"}) // { "ID": "org-id", "Name": "Some New Org Name" }

This func updates the relevant Org’s name and return the Org object with the new data.

org.Patch Mandatory Params

org.Patch Optional Params & Default Values

There is no optional parameters for that function

back to the main README