packages

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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 Links struct {
	Self  string `json:"self,omitempty"`
	First string `json:"first,omitempty"`
	Next  string `json:"next,omitempty"`
	Prev  string `json:"prev,omitempty"`
	Last  string `json:"last,omitempty"`
}

type Meta

type Meta struct {
	Paging *Paging `json:"paging,omitempty"`
}

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

type PackageResponse struct {
	Data  Package `json:"data"`
	Links *Links  `json:"links,omitempty"`
}

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

func NewService(c client.Client) *Packages

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

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 Paging

type Paging struct {
	Total      int    `json:"total,omitempty"`
	Limit      int    `json:"limit,omitempty"`
	NextCursor string `json:"nextCursor,omitempty"`
}

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 struct {
	Self string `json:"self,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL