raw

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoujinRaw

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

DoujinRaw contains the json returned by the API for doujinshi

func NewDoujinRaw

func NewDoujinRaw(data map[string]json.RawMessage) (*DoujinRaw, error)

NewDoujinRaw creates a new Doujinshi raw object with the raw message

func NewDoujinRawUrl

func NewDoujinRawUrl(clientHttp *http.Client, url string) (*DoujinRaw, error)

NewDoujinRawUrl creates a new Doujinshi raw object with the url

func (*DoujinRaw) All

func (dr *DoujinRaw) All() (doujinMap map[string]interface{}, err error)

All is a function that returns all info of the doujinshi

func (*DoujinRaw) Artists

func (dr *DoujinRaw) Artists() (artists []*TagRaw, err error)

Artists is a function that returns the artists list of the doujinshi raw

func (*DoujinRaw) Categories

func (dr *DoujinRaw) Categories() (categories []*TagRaw, err error)

Categories is a function that returns the categories list of the doujinshi raw

func (*DoujinRaw) Characters

func (dr *DoujinRaw) Characters() (characters []*TagRaw, err error)

Characters is a function that returns the characters list of the doujinshi raw

func (*DoujinRaw) CoverImage

func (dr *DoujinRaw) CoverImage() (cover ImageRaw, err error)

CoverImage is a function that returns the cover of the doujinshi raw

func (*DoujinRaw) Groups

func (dr *DoujinRaw) Groups() (groups []*TagRaw, err error)

Groups is a function that returns the groups list of the doujinshi raw

func (*DoujinRaw) Id

func (dr *DoujinRaw) Id() (id int, err error)

Id is a function that returns the id of the doujinshi raw

func (*DoujinRaw) Languages

func (dr *DoujinRaw) Languages() (languages []*TagRaw, err error)

Languages is a function that returns the languages list of the doujinshi raw

func (*DoujinRaw) MediaId

func (dr *DoujinRaw) MediaId() (mediaId int, err error)

MediaId is a function that returns the media id of the doujinshi raw

func (*DoujinRaw) NumFavorites

func (dr *DoujinRaw) NumFavorites() (numFavorites int, err error)

NumFavorites is a function that returns the number of favorites of the doujinshi raw

func (*DoujinRaw) NumPages

func (dr *DoujinRaw) NumPages() (numPages int, err error)

NumPages is a function that returns the number of pages of the doujinshi raw

func (*DoujinRaw) Pages

func (dr *DoujinRaw) Pages() (pages []*ImageRaw, err error)

Pages is a function that returns all pages of the doujinshi raw

func (*DoujinRaw) Parodies

func (dr *DoujinRaw) Parodies() (parodies []*TagRaw, err error)

Parodies is a function that returns the parodies list of the doujinshi raw

func (*DoujinRaw) Scanlator

func (dr *DoujinRaw) Scanlator() (scanlator string, err error)

Scanlator is a function that returns the scanlator of the doujinshi raw

func (*DoujinRaw) Tags

func (dr *DoujinRaw) Tags() (tags []*TagRaw, err error)

Tags is a function that returns the tags list of the doujinshi raw

func (*DoujinRaw) Thumbnail

func (dr *DoujinRaw) Thumbnail() (thumb ImageRaw, err error)

Thumbnail is a function that returns the thumbnail of the doujinshi raw

func (*DoujinRaw) Title

func (dr *DoujinRaw) Title() (title TitleRaw, err error)

Title is a function that returns the title of the doujinshi raw

func (*DoujinRaw) UploadDate

func (dr *DoujinRaw) UploadDate() (uploadTime time.Time, err error)

UploadDate is a function that returns the upload date of the doujinshi raw

type ImageRaw

type ImageRaw struct {
	Data map[string]json.RawMessage
}

ImageRaw is the data struct that describes a image raw

func (*ImageRaw) All

func (ir *ImageRaw) All() (imageMap map[string]interface{}, err error)

All is a function that returns all info of the image

func (*ImageRaw) Ext

func (ir *ImageRaw) Ext() (ext string, err error)

Ext is a function that returns the type of the image raw

func (*ImageRaw) Height

func (ir *ImageRaw) Height() (height int, err error)

Height is a function that returns the height of the image raw

func (*ImageRaw) Width

func (ir *ImageRaw) Width() (width int, err error)

Width is a function that returns the width of the image raw

type TagRaw

type TagRaw struct {
	Data map[string]json.RawMessage
}

TagRaw contains the json returned by the API for tags

func (*TagRaw) All

func (tr *TagRaw) All() (tagMap map[string]interface{}, err error)

All is a function that returns all info of tags in a map

func (*TagRaw) Count

func (tr *TagRaw) Count() (count int, err error)

Count is a function that returns the count of tags raw

func (*TagRaw) Id

func (tr *TagRaw) Id() (id int, err error)

Id is a function that returns the id of tags raw

func (*TagRaw) Name

func (tr *TagRaw) Name() (name string, err error)

Name is a function that returns the name of tags raw

func (*TagRaw) Type

func (tr *TagRaw) Type() (tagsType string, err error)

Type is a function that returns the type of tags raw

func (*TagRaw) Url

func (tr *TagRaw) Url() (url string, err error)

Url is a function that returns the url of tags raw

type TitleRaw

type TitleRaw struct {
	Data map[string]json.RawMessage
}

TitleRaw is the json api result of the doujinshi title

func (*TitleRaw) All

func (t *TitleRaw) All() (returnMap map[string]string, err error)

All is a function that returns a title map with title in all languages

func (*TitleRaw) English

func (t *TitleRaw) English() (string, error)

English is a function that returns the english title of the Title Raw

func (*TitleRaw) Japanese

func (t *TitleRaw) Japanese() (string, error)

Japanese is a function that returns the japanese title of the Title Raw

func (*TitleRaw) Pretty

func (t *TitleRaw) Pretty() (string, error)

Pretty is a function that returns the pretty title of the Title Raw

type User

type User struct {
	Id   int `validate:"-"`
	Info struct {
		Name  string `validate:"presence,min=2,max=32"`
		Email string `validate:"email,required"`
	}
}

User is the data struct that describes a user raw

Jump to

Keyboard shortcuts

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