api

package module
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	AppVersion   string   `json:"app_version"`
	Arch         string   `json:"arch"`
	OS           string   `json:"os"`
	Build        string   `json:"build"`
	DailyImages  []string `json:"daily_images"`
	RandomImages []string `json:"random_images"`
}

AppInfo is shared wallpaperize info type

type BingAPI

type BingAPI struct{}

BingAPI DailyImageGetter implementation

func (BingAPI) GetDailyImage

func (b BingAPI) GetDailyImage() ([]byte, error)

GetDailyImage implementation

type UnsplashAPI

type UnsplashAPI struct {
	// contains filtered or unexported fields
}

UnsplashAPI implementation

func NewUnsplashAPI

func NewUnsplashAPI(idGetter idGetter) *UnsplashAPI

func (*UnsplashAPI) GetRandomImage added in v1.0.8

func (u *UnsplashAPI) GetRandomImage() (*UnsplashRandomImageResponse, error)

type UnsplashAuthorizer

type UnsplashAuthorizer struct {
	// contains filtered or unexported fields
}

func NewUnsplashAuthorizer

func NewUnsplashAuthorizer(clientID, clientSecret string, tokenStore tokenStore) *UnsplashAuthorizer

func (*UnsplashAuthorizer) GetToken

func (a *UnsplashAuthorizer) GetToken() (string, error)

type UnsplashRandomImage added in v1.0.8

type UnsplashRandomImage struct {
	ID          string                  `json:"id"`
	CreatedAt   string                  `json:"created_at"`
	UpdatedAt   string                  `json:"updated_at"`
	Width       int                     `json:"width"`
	Height      int                     `json:"height"`
	Description string                  `json:"description"`
	URLs        unsplashRandomImageURLs `json:"urls"`
	Links       imageLinks              `json:"links"`
}

type UnsplashRandomImageResponse added in v1.0.8

type UnsplashRandomImageResponse struct {
	Data               UnsplashRandomImage
	RateLimitRemaining int
}

type Wallmaster

type Wallmaster interface {
	Get() (string, error)
	SetFromFile(file string) error
}

Wallmaster get and set wallpaper from filepath

Jump to

Keyboard shortcuts

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