overwaifu

package module
v0.0.0-...-48e2326 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: MIT Imports: 13 Imported by: 0

README

OverWaifu

Build Status Go Report Card Dependabot Status

Everybody can visit https://overbuff.com/heroes and check the most popular character according to pick rate, win rate etc. However, OW represents 26 different characters with the different looks, nature and spirit. I started this project to determine the most popular/unpopular characters according their off-gaming stats, i.e. popularity between artists (as first step).

Sources

  • Sankaku Channel

Score calculates only by tag count, tranding calculations coming soon:

i.e. 100 per 5days > 200 per 20days

The only source available for now is Sankaku's channel. I'll add more sources such as Overbuff, Google Trends and etc.

Disclaimer

overwaifu isn’t endorsed or in any way affiliated with Blizzard Entertainment and doesn’t reflect the views or opinions of Blizzard Entertainment or anyone officially involved in producing or managing Overwatch. Overwatch and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries. All submitted art content remains copyright of its original copyright holder.

License

overwaifu is free software licensed under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Achievement

type Achievement struct {
	Character string `json:"character" bson:"character"`
	Skin      string `json:"skin,omitempty" bson:"skin,omitempty"`
}

Achievement holds the character achievement

type Character

type Character struct {
	Name     string   `json:"name" toml:"name"`
	RealName string   `json:"real_name" toml:"realName"`
	Age      int      `json:"age" toml:"age"`
	Role     string   `json:"role" toml:"role"`
	Sex      string   `json:"sex" toml:"sex"`
	Skins    Skins    `json:"skins" toml:"skins"`
	Tags     []string `json:"tags" toml:"tags"` // sankaku tag
	Key      string   `json:"key"`
	Score    `json:"score"`
}

Character contains all main data about character

func (*Character) QueryScore

func (c *Character) QueryScore(collection *mongo.Collection) error

QueryScore ...

func (*Character) QueryScoreSkins

func (c *Character) QueryScoreSkins(collection *mongo.Collection)

QueryScoreSkins ...

func (*Character) UpdateSkinDefaults

func (c *Character) UpdateSkinDefaults()

UpdateSkinDefaults ...

type Characters

type Characters map[string]*Character

Characters provides custom marhaller for JSON

func (Characters) MarshalJSON

func (c Characters) MarshalJSON() ([]byte, error)

MarshalJSON ...

type OverWaifu

type OverWaifu struct {
	UpdatedAt    time.Time               `json:"updated_at"`
	PostsCount   int                     `json:"posts_count"`
	Characters   Characters              `json:"characters"`
	Achievements map[string]*Achievement `json:"achievements"`
}

OverWaifu holds all overwaifu results

func New

func New() (*OverWaifu, error)

New creates a new OverWaifu instance

func (*OverWaifu) QueryAchievements

func (ow *OverWaifu) QueryAchievements(collection *mongo.Collection) error

QueryAchievements calculates achievements

func (*OverWaifu) QueryScore

func (ow *OverWaifu) QueryScore(postsCollection, charactersCollection *mongo.Collection)

QueryScore calculates score

type Score

type Score struct {
	All                 int     `json:"all,omitempty" bson:"all"`
	Safe                int     `json:"safe,omitempty" bson:"safe"`
	Questionable        int     `json:"questionable,omitempty" bson:"questionable"`
	Explicit            int     `json:"explicit,omitempty" bson:"explicit"`
	GenderSwaps         int     `json:"gender_swaps,omitempty" bson:"gender_swaps"`
	Lewd                float64 `json:"lewd,omitempty" bson:"lewd"`
	Pure                float64 `json:"pure,omitempty" bson:"pure"`
	VirginKillerSweater int     `json:"virgin_killer_sweater,omitempty" bson:"virgin_killer_sweater"`
	Selfie              int     `json:"selfie,omitempty" bson:"selfie"`
}

Score holds all scores

type Skin

type Skin struct {
	Name   string   `json:"name" toml:"name"`
	Rarity string   `json:"rarity,omitempty" toml:"rarity"`
	Event  string   `json:"event,omitempty" toml:"event"`
	Tags   []string `json:"tags,omitempty" toml:"tags"`
	Key    string   `json:"key"`
	Score  `json:"score"`
}

Skin contains data about skin

func (*Skin) DefaultTags

func (s *Skin) DefaultTags(owner string)

DefaultTags allows to assigs tags as `key_character`

func (*Skin) QueryScore

func (s *Skin) QueryScore(owner *Character, collection *mongo.Collection) error

QueryScore ...

type Skins

type Skins map[string]*Skin

Skins provides custom marhaller for JSON

func (Skins) MarshalJSON

func (s Skins) MarshalJSON() ([]byte, error)

MarshalJSON ...

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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