people

package
v0.0.0-...-0e47a65 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentType

type ContentType int
const (
	NoContentTypeSpecified ContentType = iota
	PhotosOnly
	ScreenShotsOnly
	OtherOnly
	PhotosAndScreenshots
	ScreenShotsAndOther
	PhotosAndOther
	All
)

type GetPhotosOptionalArgs

type GetPhotosOptionalArgs struct {
	SafeSearch    SafetyLevel       // optional, set to NoneSpecified to ignore
	MinUploadDate string            // optional, set to "" to ignore. mysql datetime
	MaxUploadDate string            // optional, set to "" to ignore. mysql datetime
	MinTakenDate  string            // optional, set to "" to ignore. mysql datetime
	MaxTakenDate  string            // optional, set to "" to ignore. mysql datetime
	ContentType   ContentType       // optional, set to NoneSpecified to ignore
	PrivacyFilter PrivacyFilterType // optional, set to NoneSpecified to ignore
	Extras        string            // optional, set to "" to ignore. comma separated string.
	PerPage       int               // 0 to ignore
	Page          int               // 0 to ignore
}

type PhotoList

type PhotoList struct {
	Page    int `xml:"page,attr"`
	Pages   int `xml:"pages,attr"`
	PerPage int `xml:"perpage,attr"`
	Total   int `xml:"total,attr"`
	Photo   struct {
		Id       string `xml:"id,attr"`
		Owner    string `xml:"owner,attr"`
		Secret   string `xml:"secret,attr"`
		Server   string `xml:"server,attr"`
		Farm     string `xml:"farm,attr"`
		Title    string `xml:"title,attr"`
		IsPublic bool   `xml:"ispublic,attr"`
		IsFriend bool   `xml:"isfriend,attr"`
		IsFamily bool   `xml:"isfamily,attr"`

		// if extras contains "url_o" these are populated
		UrlO    string `xml:"url_o,attr"`
		HeightO int    `xml:"height_o,attr"`
		WidthO  int    `xml:"width_o,attr"`

		Description    string `xml:"description,attr"`
		License        string `xml:"license,attr"`
		DateUpload     string `xml:"date_upload,attr"`
		DateTaken      string `xml:"date_taken,attr"`
		OwnerName      string `xml:"owner_name,attr"`
		IconServer     string `xml:"icon_server,attr"`
		OriginalFormat string `xml:"original_format",attr`
		LastUpdate     string `xml:"last_udpate",attr`

		// Geo - these attributes are provided when extras contains "geo"
		Latitude  string `xml:"latitude,attr"`
		Longitude string `xml:"longitude,attr"`
		Accuracy  string `xml:"accuracy,attr"`
		Context   string `xml:"context,attr"`

		// Tags - contains space-separated lists
		Tags        string `xml:"tags,attr"`
		MachineTags string `xml:"machine_tags,attr"`

		// Original Dimensions - these attributes are provided
		// when extras contains "o_dims"
		OWidth  int `xml:"o_width,attr"`
		OHeight int `xml:"o_height,attr"`

		Views     int    `xml:"views,attr"`
		Media     string `xml:"media,attr"`
		PathAlias string `xml:"path_alias,attr"`

		// Square Urls - these attributes are provided when
		// extras contains "url_sq"
		UrlSq    string `xml:"url_sq,attr"`
		HeightSq int    `xml:"height_sq,attr"`
		WidthSq  int    `xml:"width_sq,attr"`

		// Thumbnail Urls - these attributes are provided
		// when extras contains "url_t"
		UrlT    string `xml:"url_t,attr"`
		HeightT int    `xml:"height_t,attr"`
		WidthT  int    `xml:"width_t,attr"`

		// Q Urls - these attributes are provided when
		// extras contains "url_s"
		UrlS    string `xml:"url_s,attr"`
		HeightS int    `xml:"height_s,attr"`
		WidthS  int    `xml:"width_s,attr"`

		// M Urls - these attributes are provided when
		// extras contains "url_m"
		UrlM    string `xml:"url_m,attr"`
		HeightM int    `xml:"height_m,attr"`
		WidthM  int    `xml:"width_m,attr"`

		// N Urls - these attributes are provided when
		// extras contains "url_n"
		UrlN    string `xml:"url_n,attr"`
		HeightN int    `xml:"height_n,attr"`
		WidthN  int    `xml:"width_n,attr"`

		// Z Urls - these attributes are provided when
		// extras contains "url_z"
		UrlZ    string `xml:"url_z,attr"`
		HeightZ int    `xml:"height_z,attr"`
		WidthZ  int    `xml:"width_z,attr"`

		// C Urls - these attributes are provided when
		// extras contains "url_c"
		UrlC    string `xml:"url_c,attr"`
		HeightC int    `xml:"height_c,attr"`
		WidthC  int    `xml:"width_c,attr"`

		// L Urls - these attributes are provided when
		// extras contains "url_l"
		UrlL    string `xml:"url_l,attr"`
		HeightL int    `xml:"height_l,attr"`
		WidthL  int    `xml:"width_l,attr"`
	}
}

type PhotoListResponse

type PhotoListResponse struct {
	flickr.BasicResponse
	Photos PhotoList `xml:"photos"`
}

func GetPhotos

func GetPhotos(client *flickr.FlickrClient,
	userId string, opts GetPhotosOptionalArgs) (*PhotoListResponse, error)

type PrivacyFilterType

type PrivacyFilterType int
const (
	NoPrivacyFilterSpecified PrivacyFilterType = iota
	Public
	Friends
	Family
	FriendsAndFamily
	Private
)

type SafetyLevel

type SafetyLevel int
const (
	NoSafetySpecified SafetyLevel = iota
	Safe
	Moderate
	Restricted
)

Jump to

Keyboard shortcuts

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