papes

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Id   string `json:"id"`
	Path string `json:"path"`
}

Image contains identifying data and metadatas about the image, such as: id, url, views, favorites, dimension, file_size, colors, etc. TODO Fill out, we just don't need to yet

type Meta

type Meta struct {
	PageSize int `json:"per_page"`
	Total    int `json:"total"`
}

The Meta struct contains query response metadata such as page size, total pages, current page, etc. TODO Not using all of the objects returned in the response cause we only really want the URL.

type Params

type Params struct {
	Query      string `url:"q"`
	Resolution string `url:"resolutions"`
	Sorting    string `url:"sorting"`
	Page       int    `url:"page"`
}

Query is the main search string entered, such as "forest" Resolution retricts the result set to images of dimension: "1920x1080", etc. Sorting allows us to choose the result set ordering, so we don't have to shuffle :)

type Response

type Response struct {
	Data []Image `json:"data"`
	// ♫ Do dooo do doodoo... ♫
	Meta Meta `json:"meta"`
}

Response is a union of both the data and metadatas about that datas Does your data data its datas data?

Jump to

Keyboard shortcuts

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