Documentation
¶
Index ¶
- Constants
- type ModelUnsplash
- func (instance *ModelUnsplash) FullName() (response string)
- func (instance *ModelUnsplash) ImageUrl() (response string)
- func (instance *ModelUnsplash) Map() map[string]interface{}
- func (instance *ModelUnsplash) Parse(data any) *ModelUnsplash
- func (instance *ModelUnsplash) ProfileUrl() (response string)
- func (instance *ModelUnsplash) String() string
- type ModelUnsplashLinks
- type ModelUnsplashUrls
- type ModelUnsplashUser
- type ModelUnsplashUserLinks
- type ModelUnsplashUserProfileImage
- type ModelUnsplashUserSocial
- 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
View Source
const UnsplashModel = "unsplash"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelUnsplash ¶
type ModelUnsplash struct {
Id string `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
Description string `json:"description"`
AssetType string `json:"asset_types"`
Color string `json:"color"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
PromotedAt string `json:"promoted_at"`
Likes int `json:"likes"`
Width int `json:"width"`
Height int `json:"height"`
Links *ModelUnsplashLinks `json:"links"`
Urls *ModelUnsplashUrls `json:"urls"`
User *ModelUnsplashUser `json:"user"`
}
func NewModelUnsplash ¶
func NewModelUnsplash() *ModelUnsplash
func (*ModelUnsplash) FullName ¶
func (instance *ModelUnsplash) FullName() (response string)
func (*ModelUnsplash) ImageUrl ¶
func (instance *ModelUnsplash) ImageUrl() (response string)
func (*ModelUnsplash) Map ¶
func (instance *ModelUnsplash) Map() map[string]interface{}
func (*ModelUnsplash) Parse ¶
func (instance *ModelUnsplash) Parse(data any) *ModelUnsplash
func (*ModelUnsplash) ProfileUrl ¶
func (instance *ModelUnsplash) ProfileUrl() (response string)
func (*ModelUnsplash) String ¶
func (instance *ModelUnsplash) String() string
type ModelUnsplashLinks ¶
type ModelUnsplashLinks struct {
Download string `json:"download"`
DownloadLocation string `json:"download_location"`
Self string `json:"self"`
Html string `json:"html"`
}
func (*ModelUnsplashLinks) Map ¶
func (instance *ModelUnsplashLinks) Map() map[string]interface{}
func (*ModelUnsplashLinks) String ¶
func (instance *ModelUnsplashLinks) String() string
type ModelUnsplashUrls ¶
type ModelUnsplashUrls struct {
Full string `json:"full"`
Raw string `json:"raw"`
Regular string `json:"regular"`
Thumb string `json:"thumb"`
Small string `json:"small"`
SmallS3 string `json:"small_s3"`
}
func (*ModelUnsplashUrls) Map ¶
func (instance *ModelUnsplashUrls) Map() map[string]interface{}
func (*ModelUnsplashUrls) String ¶
func (instance *ModelUnsplashUrls) String() string
type ModelUnsplashUser ¶
type ModelUnsplashUser struct {
Id string `json:"id"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
UpdatedAt string `json:"updated_at"`
Bio string `json:"bio"`
InstagramUsername string `json:"instagram_username"`
Location string `json:"location"`
PortfolioUrl string `json:"portfolio_url"`
TotalCollections int `json:"total_collection"`
TotalIllustrations int `json:"total_illustrations"`
TotalLikes int `json:"total_likes"`
TotalPhotos int `json:"total_photos"`
TotalPromotedPhotos int `json:"total_promoted_photos"`
TotalPromotedIllustrations int `json:"total_promoted_illustrations"`
Links *ModelUnsplashUserLinks `json:"links"`
ProfileImage *ModelUnsplashUserProfileImage `json:"profile_image"`
Social *ModelUnsplashUserSocial `json:"social"`
}
func (*ModelUnsplashUser) FullName ¶
func (instance *ModelUnsplashUser) FullName() (response string)
func (*ModelUnsplashUser) Map ¶
func (instance *ModelUnsplashUser) Map() map[string]interface{}
func (*ModelUnsplashUser) String ¶
func (instance *ModelUnsplashUser) String() string
type ModelUnsplashUserLinks ¶
type ModelUnsplashUserLinks struct {
Followers string `json:"followers"`
Following string `json:"following"`
Html string `json:"html"`
Likes string `json:"likes"`
Photos string `json:"photos"`
Portfolio string `json:"portfolio"`
Self string `json:"self"`
}
func (*ModelUnsplashUserLinks) Map ¶
func (instance *ModelUnsplashUserLinks) Map() map[string]interface{}
func (*ModelUnsplashUserLinks) String ¶
func (instance *ModelUnsplashUserLinks) String() string
type ModelUnsplashUserProfileImage ¶
type ModelUnsplashUserProfileImage struct {
Large string `json:"large"`
Medium string `json:"medium"`
Small string `json:"small"`
}
func (*ModelUnsplashUserProfileImage) Map ¶
func (instance *ModelUnsplashUserProfileImage) Map() map[string]interface{}
func (*ModelUnsplashUserProfileImage) String ¶
func (instance *ModelUnsplashUserProfileImage) String() string
type ModelUnsplashUserSocial ¶
type ModelUnsplashUserSocial struct {
InstagramUsername string `json:"instagram_username"`
PaypalEmail string `json:"paypal_email"`
PortfolioUrl string `json:"portfolio_url"`
TwitterUsername string `json:"twitter_username"`
}
func (*ModelUnsplashUserSocial) Map ¶
func (instance *ModelUnsplashUserSocial) Map() map[string]interface{}
func (*ModelUnsplashUserSocial) String ¶
func (instance *ModelUnsplashUserSocial) String() string
type UnsplashSettings ¶
type UnsplashSettings struct {
*llm_commons.LLMDriverOptions // access key, secret, etc...
Payload map[string]interface{} `json:"payload"`
}
func NewUnsplashSettings ¶
func NewUnsplashSettings() (instance *UnsplashSettings)
func (*UnsplashSettings) Load ¶
func (instance *UnsplashSettings) Load(m map[string]interface{}) (err error)
func (*UnsplashSettings) String ¶
func (instance *UnsplashSettings) String() string
Click to show internal directories.
Click to hide internal directories.