Documentation ¶
Overview ¶
Package photostream impliments a client capable of reading all the data from a photostream publicly shared from an iCloud account
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetItem ¶
type AssetItem struct { Expires string `mapstructure:"url_expiry"` Location string `mapstructure:"url_location"` Path string `mapstructure:"url_path"` // contains filtered or unexported fields }
AssetItem represents the information about a single media item
type AssetLocation ¶
type AssetLocation struct { Hosts []string `mapstructure:"hosts"` Scheme string `mapstructure:"scheme"` Assets *Assets }
AssetLocation describes a particular place against which asset GET requests can be made
type Assets ¶
type Assets struct { Items map[string]*AssetItem `mapstructure:"items"` Locations map[string]*AssetLocation `mapstructure:"locations"` }
Assets represents the total data returned by a request for asset information
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the base from which all your use of this api will normally stem. You should not create your own Client, and instead should use the New() function
func New ¶
New returns a new Client struct with the necessary information embedded into it to preform the agreed upon duties.
func (*Client) Assets ¶
func (c *Client) Assets(items []WebStreamItem) (*Assets, error)
Assets if used to retrieve the asset information for a slice of WebStreamItem structs, or error if something went wrong. It's likely very rare that you would use this directly unless you're doing something more advanced than normal.
type WebStream ¶
type WebStream struct { Items interface{} `mapstructure:"items"` ItemsReturned int `mapstructure:"itemsReturned"` Media []WebStreamItem `mapstructure:"photos"` Ctag string `mapstructure:"streamCtag"` Name string `mapstructure:"streamName"` FirstName string `mapstructure:"userFirstName"` LastName string `mapstructure:"userLastName"` // contains filtered or unexported fields }
WebStream represents the total information returned in an initial request to a photostream.
func (*WebStream) GetAssets ¶
GetAssets makes a request to get all of the asset formation associated with this webstream data. These assets are cacheable for a certain period of time, and so this function will give you a cached version upon calling the function again. When the data is about to expire (in the next 5 minutes) it will make a new request for fresh information. WebStreamItemDerivative.GetURLs() uses this internally
type WebStreamItem ¶
type WebStreamItem struct { BatchDateCreated string `mapstructure:"batchDateCreated"` BatchGuid string `mapstructure:"batchGuid"` Caption string `mapstructure:"caption"` FullName string `mapstructure:"contributorFullName"` FirstName string `mapstructure:"contributorFirstName"` LastName string `mapstructure:"contributorLastName"` Created string `mapstructure:"dateCreated"` Derivatives map[string]*WebStreamItemDerivative `mapstructure:"derivatives"` Type string `mapstructure:"mediaAssetType"` GUID string `mapstructure:"photoGuid"` // contains filtered or unexported fields }
WebStreamItem represents the data for a single media item in the photostream
type WebStreamItemDerivative ¶
type WebStreamItemDerivative struct { Checksum string `mapstructure:"checksum"` Size int `mapstructure:"fileSize"` Height int `mapstructure:"height"` State string `mapstructure:"state"` Width int `mapstructure:"width"` // contains filtered or unexported fields }
WebStreamItemDerivative represents the one of the sizes (derivatives) available for this particular media item
func (*WebStreamItemDerivative) GetURLs ¶
func (w *WebStreamItemDerivative) GetURLs() ([]string, error)
GetURLs returns all of the possible urls against which a GET request can be made to fetch the particular derivitive representation (that is, it gives you URLs to fetch this particular size with)