ss

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is the error returned when a ROM isn't found.

Functions

func SanitizeURL added in v1.2.1

func SanitizeURL(s string) string

func Threads added in v1.2.1

func Threads(dev DevInfo, user UserInfo) int

Types

type BoxArt added in v1.2.1

type BoxArt struct {
	Box2D map[string]string `json:"media_boxs2d"`
	Box3D map[string]string `json:"media_boxs3d"`
}

type DevInfo

type DevInfo struct {
	ID       string
	Password string
	Name     string
}

DevInfo is the information about the developer and used across APIs.

func DeobfuscateDevInfo added in v1.2.0

func DeobfuscateDevInfo() (info DevInfo, err error)

type Game

type Game struct {
	Synopsis  map[string]string   `json:"synopsis"`
	ID        string              `json:"id"`
	Name      string              `json:"nom"`
	Names     map[string]string   `json:"noms"`
	Regions   []string            `json:"regionshortnames"`
	Publisher string              `json:"editeur"`
	Developer string              `json:"developpeur"`
	Players   string              `json:"joueurs"`
	Rating    string              `json:"note"`
	Dates     map[string]string   `json:"dates"`
	Genres    map[string][]string `json:"genres:`
	Media     Media               `json:"medias"`
	ROMs      []ROM               `json:"roms"`
}

func (Game) Date added in v1.2.1

func (g Game) Date(r []string) (string, bool)

func (Game) Desc

func (g Game) Desc(l []string) (string, bool)

func (Game) Genre

func (g Game) Genre(l []string) (string, bool)

func (Game) ROM added in v1.2.1

func (g Game) ROM(req GameInfoReq) ROM

type GameInfoReq

type GameInfoReq struct {
	Name    string
	SHA1    string
	RomType string
}

GameInfoReq is the information we use in the GameInfo command.

type GameInfoResp

type GameInfoResp struct {
	Response Response `json:"response"`
}

func GameInfo

func GameInfo(dev DevInfo, user UserInfo, req GameInfoReq) (*GameInfoResp, error)

GameInfo is the call to get game info.

type Media added in v1.2.1

type Media struct {
	Screenshot    string            `json:"media_screenshot"`
	ScreenMarquee string            `json:"media_screenmarquee"`
	Marquee       string            `json:"media_marquee"`
	Video         string            `json:"media_video"`
	Flyers        map[string]string `json:"media_flyers"`
	BoxArt        BoxArt            `json:"media_boxs"`
}

func (Media) Box2D added in v1.2.1

func (m Media) Box2D(r []string) (string, bool)

func (Media) Box3D added in v1.2.1

func (m Media) Box3D(r []string) (string, bool)

func (Media) Flyer added in v1.2.1

func (m Media) Flyer(r []string) (string, bool)

type ROM added in v1.2.1

type ROM struct {
	FileName   string `json:"romfilename"`
	SHA1       string `json:"romsha1"`
	RegionsRaw string `json:"romregions"`
}

func (ROM) Regions added in v1.2.1

func (r ROM) Regions() []string

type Response added in v1.2.1

type Response struct {
	Game Game `json:"jeu"`
}

type UserInfo

type UserInfo struct {
	ID       string
	Password string
}

UserInfo is information about the user making the call.

type UserInfoResp added in v1.2.1

type UserInfoResp struct {
	ID              string `xml:"ssuser>id"`
	Level           int    `xml:"ssuser>niveau"`
	Contribution    int    `xml:"ssuser>contribution"`
	UploadedSystems int    `xml:"ssuser>uploadsysteme"`
	UploadedInfo    int    `xml:"ssuser>uploadinfos"`
	ROMsAssociated  int    `xml:"ssuser>romasso"`
	UpdatedMedia    int    `xml:"ssuser>uploadmedia"`
	FavoriteRegion  string `xml:"ssuser>favregion"`
	MaxThreads      int    `xml:"ssuser>maxthreads"`
}

func User added in v1.2.1

func User(dev DevInfo, user UserInfo) (*UserInfoResp, error)

Jump to

Keyboard shortcuts

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