artstation

package
v0.0.0-...-1120f02 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() artworks.Provider

Types

type Artstation

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

func (*Artstation) Enabled

func (*Artstation) Enabled(g *store.Guild) bool

func (*Artstation) Find

func (as *Artstation) Find(id string) (artworks.Artwork, error)

func (*Artstation) Match

func (as *Artstation) Match(url string) (string, bool)

type ArtstationResponse

type ArtstationResponse struct {
	Title       string   `json:"title,omitempty"`
	Description string   `json:"description,omitempty"`
	Permalink   string   `json:"permalink,omitempty"`
	CoverURL    string   `json:"cover_url,omitempty"`
	HashID      string   `json:"hash_id,omitempty"`
	Tags        []string `json:"tags,omitempty"`
	Assets      []*Asset `json:"assets,omitempty"`
	User        *User    `json:"user,omitempty"`

	Medium     *Category   `json:"medium,omitempty"`
	Mediums    []*Category `json:"mediums,omitempty"`
	Categories []*Category `json:"categories,omitempty"`

	ViewsCount    int `json:"views_count,omitempty"`
	LikesCount    int `json:"likes_count,omitempty"`
	CommentsCount int `json:"comments_count,omitempty"`

	HideAsAdult         bool `json:"hide_as_adult,omitempty"`
	VisibleOnArtstation bool `json:"visible_on_artstation,omitempty"`

	AIGenerated bool
	CreatedAt   time.Time `json:"created_at,omitempty"`
}

func (*ArtstationResponse) Len

func (artwork *ArtstationResponse) Len() int

func (*ArtstationResponse) MessageSends

func (artwork *ArtstationResponse) MessageSends(footer string, tagsEnabled bool) ([]*discordgo.MessageSend, error)

func (*ArtstationResponse) StoreArtwork

func (artwork *ArtstationResponse) StoreArtwork() *store.Artwork

func (*ArtstationResponse) URL

func (artwork *ArtstationResponse) URL() string

type Asset

type Asset struct {
	Title             string `json:"title,omitempty"`
	TitleFormatted    string `json:"title_formatted,omitempty"`
	ImageURL          string `json:"image_url,omitempty"`
	Width             int    `json:"width,omitempty"`
	Height            int    `json:"height,omitempty"`
	AssetType         string `json:"asset_type,omitempty"`
	HasImage          bool   `json:"has_image,omitempty"`
	HasEmbeddedPlayer bool   `json:"has_embedded_player,omitempty"`
}

type Category

type Category struct {
	ID   int
	Name string
}

type User

type User struct {
	Name            string `json:"username,omitempty"`
	Headline        string `json:"headline,omitempty"`
	FullName        string `json:"full_name,omitempty"`
	Permalink       string `json:"permalink,omitempty"`
	MediumAvatarURL string `json:"medium_avatar_url,omitempty"`
	LargeAvatarURL  string `json:"large_avatar_url,omitempty"`
	SmallAvatarURL  string `json:"small_avatar_url,omitempty"`
}

Jump to

Keyboard shortcuts

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