groups

package
v0.0.0-...-6a20b66 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPhoto

func AddPhoto(client *flickr.FlickrClient, groupId, photoId string) (*flickr.BasicResponse, error)

AddPhoto Add a photo to a particular group.

Types

type GetGroupsResponse

type GetGroupsResponse struct {
	flickr.BasicResponse
	Groups []Group `xml:"groups>group"`
}

func GetGroups

func GetGroups(client *flickr.FlickrClient, page int, perPage int) (*GetGroupsResponse, error)

GetGroups Get all the groups for current user, ,currently it supports only fetching the first 400 groups

type Group

type Group struct {
	Text         string `xml:",chardata"`
	Nsid         string `xml:"nsid,attr"`
	ID           string `xml:"id,attr"`
	Name         string `xml:"name,attr"`
	Member       string `xml:"member,attr"`
	Moderator    string `xml:"moderator,attr"`
	Admin        string `xml:"admin,attr"`
	Privacy      string `xml:"privacy,attr"`
	Photos       string `xml:"photos,attr"`
	Iconserver   string `xml:"iconserver,attr"`
	Iconfarm     string `xml:"iconfarm,attr"`
	MemberCount  string `xml:"member_count,attr"`
	TopicCount   string `xml:"topic_count,attr"`
	PoolCount    string `xml:"pool_count,attr"`
	Restrictions RestrictionsInfo
	Throttle     ThrottleInfo
}

type GroupInfoResponse

type GroupInfoResponse struct {
	flickr.BasicResponse
	Group struct {
		ID          string           `xml:"id,attr"`
		Throttle    ThrottleInfo     `xml:"throttle"`
		Restriction RestrictionsInfo `xml:"restrictions"`
	} `xml:"group"`
}

func GetInfo

func GetInfo(client *flickr.FlickrClient, groupId string) (*GroupInfoResponse, error)

func (*GroupInfoResponse) CanAddPhotos

func (group *GroupInfoResponse) CanAddPhotos() bool

CanAddPhotos verify if the use can add more photos to the group or not

type RestrictionsInfo

type RestrictionsInfo struct {
	Text         string `xml:",chardata"`
	PhotosOk     string `xml:"photos_ok,attr"`
	VideosOk     string `xml:"videos_ok,attr"`
	ImagesOk     string `xml:"images_ok,attr"`
	ScreensOk    string `xml:"screens_ok,attr"`
	ArtOk        string `xml:"art_ok,attr"`
	VirtualOk    string `xml:"virtual_ok,attr"`
	SafeOk       string `xml:"safe_ok,attr"`
	ModerateOk   string `xml:"moderate_ok,attr"`
	RestrictedOk string `xml:"restricted_ok,attr"`
	HasGeo       string `xml:"has_geo,attr"`
}

type ThrottleInfo

type ThrottleInfo struct {
	Text      string `xml:",chardata"`
	Count     string `xml:"count,attr"`
	Mode      string `xml:"mode,attr"`
	Remaining string `xml:"remaining,attr"`
}

Jump to

Keyboard shortcuts

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