code: func (client *Client) GetPackages(query ...Query) ([]Package, Warnings, error) {
  	request, err := client.newHTTPRequest(requestOptions{
  		RequestName: internal.GetPackagesRequest,
  		Query:       query,
  	})
  	if err != nil {
  		return nil, nil, err
  	}
  
  	var fullPackagesList []Package
  	warnings, err := client.paginate(request, Package{}, func(item interface{}) error {
  		if pkg, ok := item.(Package); ok {
  			fullPackagesList = append(fullPackagesList, pkg)
  		} else {
  			return ccerror.UnknownObjectInListError{
  				Expected:   Package{},
  				Unexpected: item,
  			}
  		}
  		return nil
  	})
  
  	return fullPackagesList, warnings, err
  }
docs: // GetPackages returns the list of packages.