Documentation ¶
Overview ¶
Package smugmug uses the SmugMug API to manipulate photo albums stored on smugmug.com.
Index ¶
- type Album
- type AlbumInfo
- type Category
- type Conn
- func (c *Conn) AddImage(name string, data []byte, a *Album) (*Image, error)
- func (c *Conn) AlbumInfo(album *Album) (*AlbumInfo, error)
- func (c *Conn) Albums(nick string) ([]*Album, error)
- func (c *Conn) Categories(nick string) ([]*Category, error)
- func (c *Conn) ChangeAlbum(album *Album, args ...string) error
- func (c *Conn) ChangeImage(image *Image, args ...string) error
- func (c *Conn) CreateAlbum(title string) (*Album, error)
- func (c *Conn) CreateCategory(name string) (*Category, error)
- func (c *Conn) DeleteAlbum(album *Album) error
- func (c *Conn) DeleteCategory(cat *Category) error
- func (c *Conn) DeleteImage(image *Image) error
- func (c *Conn) ImageEXIF(image *Image) (*ImageEXIF, error)
- func (c *Conn) ImageInfo(image *Image) (*ImageInfo, error)
- func (c *Conn) Images(album *Album) ([]*Image, error)
- func (c *Conn) ReplaceImage(name string, data []byte, image *Image) (*Image, error)
- type Image
- type ImageEXIF
- type ImageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumInfo ¶
type AlbumInfo struct { ID int `json:"id"` Key string Title string Backprinting string BoutiquePackaging int CanRank bool Category *Category Clean bool ColorCorrection int Comments bool Community struct { ID int `json:"id"` Name string } Description string EXIF bool External bool FamilyEdit bool Filenames bool FriendEdit bool Geography bool Header bool HideOwner bool Highlight struct { ID int `json:"id"` Key string Type string } ImageCount int InterceptShipping int Keywords string Larges bool LastUpdated string NiceName string Originals bool PackagingBranding bool Password string PasswordHint string Passworded bool Position int Printable bool Printmark struct { ID int `json:"id"` Name string } ProofDays int Protected bool Public bool SmugSearchable bool SortDirection bool SortMethod string SquareThumbs bool SubCategory *Category Template struct { ID int `json:"id"` } Theme struct { ID int `json:"id"` Key string Type string } URL string UnsharpAmount float64 UnsharpRadius float64 UnsharpSigma float64 Watermark struct { ID int `json:"id"` Name string } Watermarking bool WorldSearchable bool X2Larges bool X3Larges bool XLarges bool }
An AlbumInfo lists the metadata for an album.
type Conn ¶
type Conn struct { NickName string // contains filtered or unexported fields }
A Conn represents an authenticated connection to the SmugMug server.
func Login ¶
Login logs into the SmugMug server with the given email address and password. The apikey argument is the API Key for your application. To obtain an API Key, see http://www.smugmug.com/hack/apikeys.
func (*Conn) AddImage ¶
AddImage uploads a new image to an album. The name is the file name that will be displayed on SmugMug. The data is the raw image data.
func (*Conn) Albums ¶
Albums returns the albums for the user identified by the nick name. Use c.NickName for the logged-in user.
func (*Conn) Categories ¶
Categories returns the album categories for the user identified by the nick name.
func (*Conn) ChangeAlbum ¶
ChangeAlbum changes an album's settings. The argument list is a sequence of key, value pairs. The keys are the names of AlbumInfo struct fields, and the values are string values. For a boolean field, use "0" for false and "1" for true.
Example:
c.ChangeAlbum(a, "Larges", "1", "Title", "My Album")
func (*Conn) ChangeImage ¶
ChangeImage changes an image's settings. The argument list is a sequence of key, value pairs. The keys are the names of ImageInfo struct fields, and the values are string values. For a boolean field, use "0" for false and "1" for true.
Example:
c.ChangeImage(a, "Caption", "me!", "Hidden", "0")
func (*Conn) CreateAlbum ¶
CreateAlbum creates a new album.
func (*Conn) CreateCategory ¶
CreateCategory creates a category with the given name.
func (*Conn) DeleteAlbum ¶
DeleteAlbum deletes an album.
func (*Conn) DeleteCategory ¶
DeleteCategory deletes the category.
func (*Conn) DeleteImage ¶
DeleteImage deletes an image.
type ImageEXIF ¶
type ImageEXIF struct { ID int `json:"id"` Key string Aperture string Brightness string CCDWidth string ColorSpace int CompressedBitsPerPixel string Contrast int DateTime string DateTimeDigitized string DateTimeOriginal string DigitalZoomRatio string ExposureBiasValue string ExposureMode int ExposureProgram int ExposureTime string Flash int FocalLength string FocalLengthIn35mmFilm string ISO int LightSource int Make string Metering int Model string Saturation int SensingMethod int Sharpness int SubjectDistance string SubjectDistanceRange int WhiteBalance int }
An ImageEXIF lists the EXIF data associated with an image.
type ImageInfo ¶
type ImageInfo struct { ID int `json:"id"` Key string Album *Album Altitude int Caption string Date string FileName string Duration int Format string Height int Hidden bool Keywords string LargeURL string LastUpdated string Latitude float64 LightboxURL string Longitude float64 MD5Sum string MediumURL string OriginalURL string Position int Serial int Size int SmallURL string ThumbURL string TinyURL string Video320URL string Video640URL string Video960URL string Video1280URL string Video1920URL string Width int X2LargeURL string X3LargeURL string XLargeURL string }
An ImageInfo lists the metadata for an image.