Documentation
¶
Index ¶
Constants ¶
const ( FieldName = "name" FieldURL = "url" FieldHash = "hash" FieldBundleIds = "bundleIds" FieldDescription = "description" FieldVersion = "version" FieldCreatedDateTime = "createdDateTime" FieldUpdatedDateTime = "updatedDateTime" )
Field constants for fields[packages] query parameter.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Package ¶
type Package struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes *PackageAttributes `json:"attributes,omitempty"`
Links *ResourceLinks `json:"links,omitempty"`
}
Package represents a package resource.
type PackageAttributes ¶
type PackageAttributes struct {
Name string `json:"name,omitempty"`
URL string `json:"url,omitempty"`
Hash string `json:"hash,omitempty"`
BundleIds []string `json:"bundleIds,omitempty"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
UpdatedDateTime *time.Time `json:"updatedDateTime,omitempty"`
}
PackageAttributes contains the attributes of a package.
type PackageResponse ¶
PackageResponse is the response for a single package.
type Packages ¶
type Packages struct {
// contains filtered or unexported fields
}
Packages handles communication with the packages related methods of the Apple Business Manager API.
Apple Business Manager API docs: https://developer.apple.com/documentation/applebusinessapi/get-packages
func NewService ¶
NewService creates a new packages service.
func (*Packages) GetByPackageIDV1 ¶
func (s *Packages) GetByPackageIDV1(ctx context.Context, packageID string, opts *RequestQueryOptions) (*PackageResponse, *resty.Response, error)
GetByPackageIDV1 retrieves information about a specific package in an organization. URL: GET https://api-business.apple.com/v1/packages/{id} https://developer.apple.com/documentation/applebusinessapi/get-package-information
func (*Packages) GetV1 ¶
func (s *Packages) GetV1(ctx context.Context, opts *RequestQueryOptions) (*PackagesResponse, *resty.Response, error)
GetV1 retrieves a list of packages available in an organization. URL: GET https://api-business.apple.com/v1/packages https://developer.apple.com/documentation/applebusinessapi/get-packages
type PackagesResponse ¶
type PackagesResponse struct {
Data []Package `json:"data"`
Links *Links `json:"links,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
PackagesResponse is the response for a list of packages.
type RequestQueryOptions ¶
type RequestQueryOptions struct {
// Fields specifies which fields to return. Use Field* constants.
Fields []string
// Limit is the number of resources to return (max 1000).
Limit int
}
RequestQueryOptions represents query parameters for package endpoints.
type ResourceLinks ¶
type ResourceLinks struct {
Self string `json:"self,omitempty"`
}