metadata

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const URL string = "https://www.ubisoft.com/de-de/game/rainbow-six/siege/stats/glossary/fa94e165-6328-4a9b-8581-81735ffaba27"

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Seasons []season
}

func New

func New(scriptJS string) (*Metadata, error)

New creates a new instance, parsing scriptJS. The parameter should be a Javascript string starting with "window.__PRELOADED_STATE__ = <JS object>". This method should only be called internally.

func (*Metadata) SeasonNameFromID added in v0.1.0

func (m *Metadata) SeasonNameFromID(seasonID int) string

SeasonNameFromID will return the name of the season (e.g. "Brutal Swarm") with the provided ID or "" if unknown.

func (*Metadata) SeasonSlugFromID added in v0.1.0

func (m *Metadata) SeasonSlugFromID(seasonID int) string

SeasonSlugFromID will return the slug of the season (e.g. "Y7S3") with the provided ID or "" if unknown.

func (*Metadata) UnmarshalJSON

func (m *Metadata) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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