Versions in this module Expand all Collapse all v1 v1.69.1 Feb 15, 2025 Changes in this version + func ConstructDriveID(id string, zone string, t string) string + func DeconstructDriveID(id string) (docType, zone, docid string) + func GetCommonHeaders(overwrite map[string]string) map[string]string + func GetContentTypeForFile(name string) string + func GetCookiesForDomain(url *url.URL, cookies []*http.Cookie) ([]*http.Cookie, error) + func GetDocIDFromDriveID(id string) string + func IntoReader(values any) (*bytes.Reader, error) + func MergeCookies(left []*http.Cookie, right []*http.Cookie) ([]*http.Cookie, error) + type AccountInfo struct + Apps map[string]*ValidateDataApp + AppsOrder []string + ConfigBag struct{ ... } + DsInfo *ValidateDataDsInfo + HasMinimumDeviceForPhotosWeb bool + HsaChallengeRequired bool + HsaTrustedBrowser bool + ICDPEnabled bool + ICloudInfo struct{ ... } + IsExtendedLogin bool + IsRepairNeeded bool + PcsDeleted bool + PcsEnabled bool + PcsServiceIdentitiesIncluded bool + RequestInfo struct{ ... } + TermsUpdateNeeded bool + Version int + Webservices map[string]*webService + type Client struct + Session *Session + func New(appleID, password, trustToken string, clientID string, cookies []*http.Cookie, ...) (*Client, error) + func (c *Client) Authenticate(ctx context.Context) error + func (c *Client) DriveService() (*DriveService, error) + func (c *Client) Request(ctx context.Context, opts rest.Opts, request interface{}, response interface{}) (resp *http.Response, err error) + func (c *Client) RequestNoReAuth(ctx context.Context, opts rest.Opts, request interface{}, response interface{}) (resp *http.Response, err error) + func (c *Client) SignIn(ctx context.Context) error + type CreateFoldersResponse struct + Folders []*DriveItem + type Document struct + Btime int64 + Data DocumentData + Deleted bool + DocumentID string + Etag string + FileFlags struct{ ... } + HasChainedParent bool + ItemID string + LastEditorName string + LastOpenedTime int64 + Mtime int64 + Name string + ParentID string + RestorePath interface{} + Size int64 + Status struct{ ... } + Type string + Urls struct{ ... } + Zone string + func (d *Document) DriveID() string + type DocumentData struct + Owner string + PcsInfo string + ReferenceSignature string + Signature string + Size int64 + WrappingKey string + type DocumentUpdateResponse struct + Results []struct{ ... } + Status struct{ ... } + type DriveItem struct + AssetQuota int64 + DateChanged time.Time + DateCreated time.Time + DateModified time.Time + DirectChildrenCount int64 + Docwsid string + Drivewsid string + Etag string + Extension string + FileCount int64 + Hierarchy []DriveItem + Itemid string + Items []*DriveItem + LastOpenTime time.Time + Name string + NumberOfItems int64 + ParentID string + ShareAliasCount int64 + ShareCount int64 + Size int64 + Status string + Type string + Urls struct{ ... } + Zone string + func (d *DriveItem) DownloadURL() string + func (d *DriveItem) FullName() string + func (d *DriveItem) IsFolder() bool + type DriveItemRaw struct + ItemID string + ItemInfo *DriveItemRawInfo + func (d *DriveItemRaw) CreatedTime() time.Time + func (d *DriveItemRaw) IntoDriveItem() *DriveItem + func (d *DriveItemRaw) ModTime() time.Time + func (d *DriveItemRaw) SplitName() (string, string) + type DriveItemRawInfo struct + CreatedAt string + Extension string + ModifiedAt string + Name string + Size int64 + Type string + Urls struct{ ... } + Version string + type DriveService struct + RootID string + func NewDriveService(icloud *Client) (*DriveService, error) + func (d *DriveService) CopyDocByItemID(ctx context.Context, itemID string) (*DriveItemRaw, *http.Response, error) + func (d *DriveService) CreateNewFolderByDriveID(ctx context.Context, drivewsid, name string) (*DriveItem, *http.Response, error) + func (d *DriveService) CreateNewFolderByItemID(ctx context.Context, id, name string) (*DriveItem, *http.Response, error) + func (d *DriveService) CreateUpload(ctx context.Context, size int64, name string) (*UploadResponse, *http.Response, error) + func (d *DriveService) DownloadFile(ctx context.Context, url string, opt []fs.OpenOption) (*http.Response, error) + func (d *DriveService) GetDocByItemID(ctx context.Context, id string) (*Document, *http.Response, error) + func (d *DriveService) GetDocByPath(ctx context.Context, path string) (*Document, *http.Response, error) + func (d *DriveService) GetDownloadURLByDriveID(ctx context.Context, id string) (string, *http.Response, error) + func (d *DriveService) GetItemByDriveID(ctx context.Context, id string, includeChildren bool) (*DriveItem, *http.Response, error) + func (d *DriveService) GetItemByPath(ctx context.Context, path string) (*DriveItem, *http.Response, error) + func (d *DriveService) GetItemRawByItemID(ctx context.Context, id string) (*DriveItemRaw, *http.Response, error) + func (d *DriveService) GetItemsByDriveID(ctx context.Context, ids []string, includeChildren bool) ([]*DriveItem, *http.Response, error) + func (d *DriveService) GetItemsInFolder(ctx context.Context, id string, limit int64) ([]*DriveItemRaw, *http.Response, error) + func (d *DriveService) MoveItemByDriveID(ctx context.Context, id, etag, dstID string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) MoveItemByItemID(ctx context.Context, id, etag, dstID string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) MoveItemToTrashByID(ctx context.Context, drivewsid, etag string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) MoveItemToTrashByItemID(ctx context.Context, id, etag string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) RenameItemByDriveID(ctx context.Context, id, etag, name string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) RenameItemByItemID(ctx context.Context, id, etag, name string, force bool) (*DriveItem, *http.Response, error) + func (d *DriveService) UpdateFile(ctx context.Context, r *UpdateFileInfo) (*DriveItem, *http.Response, error) + func (d *DriveService) Upload(ctx context.Context, in io.Reader, size int64, name, uploadURL string) (*SingleFileResponse, *http.Response, error) + type FileFlags struct + IsExecutable bool + IsHidden bool + IsWritable bool + type FileRequest struct + DataToken *FileRequestToken + DocumentID string + DoubleEtag string + ItemID string + OwnerDsid int64 + PackageToken *FileRequestToken + type FileRequestToken struct + ReferenceSignature string + Signature string + Token string + URL string + WrappingKey string + type RequestError struct + Status string + Text string + func (e *RequestError) Error() string + type Session struct + AccountCountry string + AccountInfo AccountInfo + ClientID string + Cookies []*http.Cookie + Scnt string + SessionID string + SessionToken string + TrustToken string + func NewSession() *Session + func (s *Session) AuthWithToken(ctx context.Context) error + func (s *Session) GetAuthHeaders(overwrite map[string]string) map[string]string + func (s *Session) GetCookieString() string + func (s *Session) GetHeaders(overwrite map[string]string) map[string]string + func (s *Session) Request(ctx context.Context, opts rest.Opts, request interface{}, response interface{}) (*http.Response, error) + func (s *Session) Requires2FA() bool + func (s *Session) SignIn(ctx context.Context, appleID, password string) error + func (s *Session) TrustSession(ctx context.Context) error + func (s *Session) Validate2FACode(ctx context.Context, code string) error + func (s *Session) ValidateSession(ctx context.Context) error + type SingleFileInfo struct + Receipt string + ReferenceSignature string + Signature string + Size int64 + WrappingKey string + type SingleFileResponse struct + SingleFile *SingleFileInfo + type UpdateFileInfo struct + AllowConflict bool + Btime int64 + Command string + CreateShortGUID bool + Data struct{ ... } + DocumentID string + FileFlags FileFlags + Mtime int64 + Path struct{ ... } + func NewUpdateFileInfo() UpdateFileInfo + type UploadResponse struct + DocumentID string + URL string + type ValidateDataApp struct + CanLaunchWithOneFactor bool + IsQualifiedForBeta bool + type ValidateDataDsInfo struct + ADsID string + AnalyticsOptInStatus bool + AppleID string + AppleIDAlias string + AppleIDAliases []interface{} + AppleIDEntries []struct{ ... } + BeneficiaryInfo struct{ ... } + BrMigrated bool + BrZoneConsolidated bool + ContinueOnDeviceEligibleDeviceInfo []string + CountryCode string + Dsid string + FamilyEligible bool + FirstName string + FullName string + GilliganEnabled bool + Gilligvited bool + HasICloudQualifyingDevice bool + HasPaymentInfo bool + HasUnreleasedOS bool + HsaEnabled bool + HsaVersion int + ICDPEnabled bool + ICDRSCapableDeviceCount int + ICDRSCapableDeviceList string + ICloudAppleIDAlias string + IroncadeMigrated bool + IsCustomDomainsFeatureAvailable bool + IsHideMyEmailFeatureAvailable bool + IsHideMyEmailSubscriptionActive bool + IsManagedAppleID bool + IsPaidDeveloper bool + IsWebAccessAllowed bool + LanguageCode string + LastName string + Locale string + Locked bool + MailFlags struct{ ... } + NotesMigrated bool + NotificationID string + PcsDelet bool + PrimaryEmail string + PrimaryEmailVerified bool + StatusCode int + TantorMigrated bool + UbiquityEOLEnabled bool