Documentation ¶
Index ¶
- Constants
- type Unsplash
- func (instance *Unsplash) EnsureRandomFromKeywords(keywords []string, color string) (response map[string]interface{}, err error)
- func (instance *Unsplash) Get(url string) (response map[string]interface{}, err error)
- func (instance *Unsplash) Post(url string, body interface{}) (response map[string]interface{}, err error)
- func (instance *Unsplash) Produce(keywords []string, params map[string]interface{}) (response []*model.ProducerItem, err error)
- func (instance *Unsplash) Random(query string) (response map[string]interface{}, err error)
- func (instance *Unsplash) RandomByColor(query, color string) (response map[string]interface{}, err error)
- func (instance *Unsplash) RandomByColorFromKeywords(keywords []string, color string) (response map[string]interface{}, err error)
- func (instance *Unsplash) RandomFromKeywords(keywords []string) (response map[string]interface{}, err error)
- func (instance *Unsplash) Search(query string) (response []map[string]interface{}, err error)
- func (instance *Unsplash) SearchBlackAndWhite(query string) (response []map[string]interface{}, err error)
- func (instance *Unsplash) SearchByColor(query, color string) (response []map[string]interface{}, err error)
- func (instance *Unsplash) SearchOne(query string) (response map[string]interface{}, err error)
- func (instance *Unsplash) SearchWith(params map[string]interface{}) (response []map[string]interface{}, err error)
- func (instance *Unsplash) String() string
- type UnsplashSettings
Constants ¶
View Source
const ( BaseApiUrl = "https://api.unsplash.com" ApiImageSearch = "/search/photos" ApiPhotoRandom = "/photos/random" )
View Source
const ( Size256 = "256x256" Size512 = "512x512" Size1024 = "1024x1024" )
256x256, 512x512, or 1024x1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Unsplash ¶
type Unsplash struct {
// contains filtered or unexported fields
}
func NewUnsplash ¶
func NewUnsplash(settings *commons.SettingsExternal) (instance *Unsplash, err error)
func (*Unsplash) EnsureRandomFromKeywords ¶
func (*Unsplash) Random ¶
Random https://unsplash.com/documentation#get-a-random-photo
func (*Unsplash) RandomByColor ¶
func (*Unsplash) RandomByColorFromKeywords ¶
func (*Unsplash) RandomFromKeywords ¶
func (*Unsplash) SearchBlackAndWhite ¶
func (*Unsplash) SearchByColor ¶
func (instance *Unsplash) SearchByColor(query, color string) (response []map[string]interface{}, err error)
SearchByColor Filter results by color. Valid values are: black_and_white, black, white, yellow, orange, red, purple, magenta, green, teal, and blue.
func (*Unsplash) SearchWith ¶
type UnsplashSettings ¶
Click to show internal directories.
Click to hide internal directories.