sc2c

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package sc2c contains types for the Starcraft 2 Community APIs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ladder

type Ladder struct {
	LadderTeams          []interface{} `json:"ladderTeams"`
	AllLadderMemberships []interface{} `json:"allLadderMemberships"`
	RanksAndPools        []interface{} `json:"ranksAndPools"`
}

Ladder structure

type LadderGrandmaster

type LadderGrandmaster struct {
	LadderTeams []struct {
		TeamMembers []struct {
			ID           string `json:"id"`
			Realm        int    `json:"realm"`
			Region       int    `json:"region"`
			DisplayName  string `json:"displayName"`
			ClanTag      string `json:"clanTag"`
			FavoriteRace string `json:"favoriteRace"`
		} `json:"teamMembers"`
		PreviousRank  int `json:"previousRank"`
		Points        int `json:"points"`
		Wins          int `json:"wins"`
		Losses        int `json:"losses"`
		Mmr           int `json:"mmr"`
		JoinTimestamp int `json:"joinTimestamp"`
	} `json:"ladderTeams"`
}

LadderGrandmaster structure

type LadderSeason

type LadderSeason struct {
	SeasonID  int    `json:"seasonId"`
	Number    int    `json:"number"`
	Year      int    `json:"year"`
	StartDate string `json:"startDate"`
	EndDate   string `json:"endDate"`
}

LadderSeason structure

type LadderSummary

type LadderSummary struct {
	ShowCaseEntries      []interface{} `json:"showCaseEntries"`
	PlacementMatches     []interface{} `json:"placementMatches"`
	AllLadderMemberships []interface{} `json:"allLadderMemberships"`
}

LadderSummary structure

type LegacyAchievements

type LegacyAchievements struct {
	Achievements []struct {
		Title         string `json:"title"`
		Description   string `json:"description"`
		AchievementID string `json:"achievementId"`
		CategoryID    string `json:"categoryId"`
		Points        int    `json:"points"`
		Icon          struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
	} `json:"achievements"`
	Categories []struct {
		Title                 string `json:"title"`
		CategoryID            string `json:"categoryId"`
		FeaturedAchievementID string `json:"featuredAchievementId"`
		Children              []struct {
			Title                 string `json:"title"`
			CategoryID            string `json:"categoryId"`
			FeaturedAchievementID string `json:"featuredAchievementId"`
		} `json:"children,omitempty"`
	} `json:"categories"`
}

LegacyAchievements structure

type LegacyLadder

type LegacyLadder struct {
	LadderMembers []struct {
		Character struct {
			ID          string `json:"id"`
			Realm       int    `json:"realm"`
			Region      int    `json:"region"`
			DisplayName string `json:"displayName"`
			ClanName    string `json:"clanName"`
			ClanTag     string `json:"clanTag"`
			ProfilePath string `json:"profilePath"`
		} `json:"character"`
		JoinTimestamp  int    `json:"joinTimestamp"`
		Points         int    `json:"points"`
		Wins           int    `json:"wins"`
		Losses         int    `json:"losses"`
		HighestRank    int    `json:"highestRank"`
		PreviousRank   int    `json:"previousRank"`
		FavoriteRaceP1 string `json:"favoriteRaceP1"`
	} `json:"ladderMembers"`
}

LegacyLadder structure

type LegacyProfile

type LegacyProfile struct {
	ID          string `json:"id"`
	Realm       int    `json:"realm"`
	DisplayName string `json:"displayName"`
	ClanName    string `json:"clanName"`
	ClanTag     string `json:"clanTag"`
	ProfilePath string `json:"profilePath"`
	Portrait    struct {
		X      int    `json:"x"`
		Y      int    `json:"y"`
		W      int    `json:"w"`
		H      int    `json:"h"`
		Offset int    `json:"offset"`
		URL    string `json:"url"`
	} `json:"portrait"`
	Career struct {
		PrimaryRace      string `json:"primaryRace"`
		TerranWins       int    `json:"terranWins"`
		ProtossWins      int    `json:"protossWins"`
		ZergWins         int    `json:"zergWins"`
		Highest1V1Rank   string `json:"highest1v1Rank"`
		HighestTeamRank  string `json:"highestTeamRank"`
		SeasonTotalGames int    `json:"seasonTotalGames"`
		CareerTotalGames int    `json:"careerTotalGames"`
	} `json:"career"`
	SwarmLevels struct {
		Level  int `json:"level"`
		Terran struct {
			Level          int `json:"level"`
			TotalLevelXP   int `json:"totalLevelXP"`
			CurrentLevelXP int `json:"currentLevelXP"`
		} `json:"terran"`
		Zerg struct {
			Level          int `json:"level"`
			TotalLevelXP   int `json:"totalLevelXP"`
			CurrentLevelXP int `json:"currentLevelXP"`
		} `json:"zerg"`
		Protoss struct {
			Level          int `json:"level"`
			TotalLevelXP   int `json:"totalLevelXP"`
			CurrentLevelXP int `json:"currentLevelXP"`
		} `json:"protoss"`
	} `json:"swarmLevels"`
	Campaign struct {
		Wol  string `json:"wol"`
		Hots string `json:"hots"`
	} `json:"campaign"`
	Season struct {
		SeasonID             int `json:"seasonId"`
		SeasonNumber         int `json:"seasonNumber"`
		SeasonYear           int `json:"seasonYear"`
		TotalGamesThisSeason int `json:"totalGamesThisSeason"`
		Stats                []struct {
			Type  string `json:"type"`
			Wins  int    `json:"wins"`
			Games int    `json:"games"`
		} `json:"stats"`
	} `json:"season"`
	Rewards struct {
		Selected []string `json:"selected"`
		Earned   []string `json:"earned"`
	} `json:"rewards"`
	Achievements struct {
		Points struct {
			TotalPoints    int `json:"totalPoints"`
			CategoryPoints struct {
				Num4325377 int `json:"4325377"`
				Num4325379 int `json:"4325379"`
				Num4325382 int `json:"4325382"`
				Num4325408 int `json:"4325408"`
				Num4325410 int `json:"4325410"`
				Num4330138 int `json:"4330138"`
				Num4364473 int `json:"4364473"`
				Num4386911 int `json:"4386911"`
			} `json:"categoryPoints"`
		} `json:"points"`
		Achievements []struct {
			AchievementID  string `json:"achievementId"`
			CompletionDate int    `json:"completionDate"`
		} `json:"achievements"`
	} `json:"achievements"`
}

LegacyProfile structure

type LegacyProfileLadders

type LegacyProfileLadders struct {
	CurrentSeason []struct {
		Characters []struct {
			ClanName    string `json:"clanName"`
			ClanTag     string `json:"clanTag"`
			DisplayName string `json:"displayName"`
			ID          string `json:"id"`
			ProfilePath string `json:"profilePath"`
			Realm       int    `json:"realm"`
			Region      int    `json:"region"`
		} `json:"characters"`
		Ladder []struct {
			Division         int    `json:"division"`
			LadderID         string `json:"ladderId"`
			LadderName       string `json:"ladderName"`
			League           string `json:"league"`
			Losses           int    `json:"losses"`
			MatchMakingQueue string `json:"matchMakingQueue"`
			Rank             int    `json:"rank"`
			Showcase         bool   `json:"showcase"`
			Wins             int    `json:"wins"`
		} `json:"ladder"`
		NonRanked []interface{} `json:"nonRanked"`
	} `json:"currentSeason"`
	PreviousSeason []struct {
		Characters []struct {
			ClanName    string `json:"clanName"`
			ClanTag     string `json:"clanTag"`
			DisplayName string `json:"displayName"`
			ID          string `json:"id"`
			ProfilePath string `json:"profilePath"`
			Realm       int    `json:"realm"`
			Region      int    `json:"region"`
		} `json:"characters"`
		Ladder []struct {
			Division         int    `json:"division"`
			LadderID         string `json:"ladderId"`
			LadderName       string `json:"ladderName"`
			League           string `json:"league"`
			Losses           int    `json:"losses"`
			MatchMakingQueue string `json:"matchMakingQueue"`
			Rank             int    `json:"rank"`
			Showcase         bool   `json:"showcase"`
			Wins             int    `json:"wins"`
		} `json:"ladder"`
		NonRanked []struct {
			GamesPlayed int    `json:"gamesPlayed"`
			Mmq         string `json:"mmq"`
		} `json:"nonRanked"`
	} `json:"previousSeason"`
	ShowcasePlacement []struct {
		Characters []struct {
			ClanName    string `json:"clanName"`
			ClanTag     string `json:"clanTag"`
			DisplayName string `json:"displayName"`
			ID          string `json:"id"`
			ProfilePath string `json:"profilePath"`
			Realm       int    `json:"realm"`
			Region      int    `json:"region"`
		} `json:"characters"`
		Ladder    []interface{} `json:"ladder"`
		NonRanked []struct {
			GamesPlayed int    `json:"gamesPlayed"`
			Mmq         string `json:"mmq"`
		} `json:"nonRanked"`
	} `json:"showcasePlacement"`
}

LegacyProfileLadders structure

type LegacyProfileMatches

type LegacyProfileMatches struct {
	Matches []struct {
		Map      string `json:"map"`
		Type     string `json:"type"`
		Decision string `json:"decision"`
		Speed    string `json:"speed"`
		Date     int    `json:"date"`
	} `json:"matches"`
}

LegacyProfileMatches structure

type LegacyRewards

type LegacyRewards struct {
	Portraits []struct {
		Title string `json:"title"`
		ID    string `json:"id"`
		Icon  struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		AchievementID string `json:"achievementId"`
	} `json:"portraits"`
	TerranDecals []struct {
		Title string `json:"title"`
		ID    string `json:"id"`
		Icon  struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		AchievementID string `json:"achievementId"`
	} `json:"terranDecals"`
	ZergDecals []struct {
		Title string `json:"title"`
		ID    string `json:"id"`
		Icon  struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		AchievementID string `json:"achievementId"`
	} `json:"zergDecals"`
	ProtossDecals []struct {
		Title string `json:"title"`
		ID    string `json:"id"`
		Icon  struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		AchievementID string `json:"achievementId"`
	} `json:"protossDecals"`
	Skins []struct {
		Title string `json:"title"`
		ID    string `json:"id"`
		Icon  struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		Name          string `json:"name,omitempty"`
		AchievementID string `json:"achievementId"`
	} `json:"skins"`
	Animations []struct {
		Title   string `json:"title"`
		Command string `json:"command"`
		ID      string `json:"id"`
		Icon    struct {
			X      int    `json:"x"`
			Y      int    `json:"y"`
			W      int    `json:"w"`
			H      int    `json:"h"`
			Offset int    `json:"offset"`
			URL    string `json:"url"`
		} `json:"icon"`
		AchievementID string `json:"achievementId"`
	} `json:"animations"`
}

LegacyRewards structure

type MetadataProfile

type MetadataProfile struct {
	Name       string `json:"name"`
	ProfileURL string `json:"profileUrl"`
	AvatarURL  string `json:"avatarUrl"`
	ProfileID  string `json:"profileId"`
	RegionID   int    `json:"regionId"`
	RealmID    int    `json:"realmId"`
}

MetadataProfile structure

type Player

type Player []struct {
	Name       string `json:"name"`
	ProfileURL string `json:"profileUrl"`
	AvatarURL  string `json:"avatarUrl"`
	ProfileID  string `json:"profileId"`
	RegionID   int    `json:"regionId"`
	RealmID    int    `json:"realmId"`
}

Player structure

type Profile

type Profile struct {
	Summary struct {
		ID                     string `json:"id"`
		Realm                  int    `json:"realm"`
		DisplayName            string `json:"displayName"`
		Portrait               string `json:"portrait"`
		DecalTerran            string `json:"decalTerran"`
		DecalProtoss           string `json:"decalProtoss"`
		DecalZerg              string `json:"decalZerg"`
		TotalSwarmLevel        int    `json:"totalSwarmLevel"`
		TotalAchievementPoints int    `json:"totalAchievementPoints"`
	} `json:"summary"`
	Snapshot struct {
		SeasonSnapshot struct {
			OneV1 struct {
				Rank       int         `json:"rank"`
				LeagueName interface{} `json:"leagueName"`
				TotalGames int         `json:"totalGames"`
				TotalWins  int         `json:"totalWins"`
			} `json:"1v1"`
			TwoV2 struct {
				Rank       int         `json:"rank"`
				LeagueName interface{} `json:"leagueName"`
				TotalGames int         `json:"totalGames"`
				TotalWins  int         `json:"totalWins"`
			} `json:"2v2"`
			ThreeV3 struct {
				Rank       int         `json:"rank"`
				LeagueName interface{} `json:"leagueName"`
				TotalGames int         `json:"totalGames"`
				TotalWins  int         `json:"totalWins"`
			} `json:"3v3"`
			FourV4 struct {
				Rank       int         `json:"rank"`
				LeagueName interface{} `json:"leagueName"`
				TotalGames int         `json:"totalGames"`
				TotalWins  int         `json:"totalWins"`
			} `json:"4v4"`
			Archon struct {
				Rank       int         `json:"rank"`
				LeagueName interface{} `json:"leagueName"`
				TotalGames int         `json:"totalGames"`
				TotalWins  int         `json:"totalWins"`
			} `json:"Archon"`
		} `json:"seasonSnapshot"`
		TotalRankedSeasonGamesPlayed int `json:"totalRankedSeasonGamesPlayed"`
	} `json:"snapshot"`
	Career struct {
		TerranWins                int         `json:"terranWins"`
		ZergWins                  int         `json:"zergWins"`
		ProtossWins               int         `json:"protossWins"`
		TotalCareerGames          int         `json:"totalCareerGames"`
		TotalGamesThisSeason      int         `json:"totalGamesThisSeason"`
		Current1V1LeagueName      interface{} `json:"current1v1LeagueName"`
		CurrentBestTeamLeagueName interface{} `json:"currentBestTeamLeagueName"`
		Best1V1Finish             struct {
			LeagueName    string `json:"leagueName"`
			TimesAchieved int    `json:"timesAchieved"`
		} `json:"best1v1Finish"`
		BestTeamFinish struct {
			LeagueName    interface{} `json:"leagueName"`
			TimesAchieved int         `json:"timesAchieved"`
		} `json:"bestTeamFinish"`
	} `json:"career"`
	SwarmLevels struct {
		Level  int `json:"level"`
		Terran struct {
			Level              int `json:"level"`
			MaxLevelPoints     int `json:"maxLevelPoints"`
			CurrentLevelPoints int `json:"currentLevelPoints"`
		} `json:"terran"`
		Zerg struct {
			Level              int `json:"level"`
			MaxLevelPoints     int `json:"maxLevelPoints"`
			CurrentLevelPoints int `json:"currentLevelPoints"`
		} `json:"zerg"`
		Protoss struct {
			Level              int `json:"level"`
			MaxLevelPoints     int `json:"maxLevelPoints"`
			CurrentLevelPoints int `json:"currentLevelPoints"`
		} `json:"protoss"`
	} `json:"swarmLevels"`
	Campaign struct {
		DifficultyCompleted struct {
			WingsOfLiberty  string `json:"wings-of-liberty"`
			HeartOfTheSwarm string `json:"heart-of-the-swarm"`
		} `json:"difficultyCompleted"`
	} `json:"campaign"`
	CategoryPointProgress []struct {
		CategoryID   string `json:"categoryId"`
		PointsEarned int    `json:"pointsEarned"`
	} `json:"categoryPointProgress"`
	AchievementShowcase []string `json:"achievementShowcase"`
	EarnedRewards       []struct {
		RewardID      string `json:"rewardId"`
		Selected      bool   `json:"selected"`
		AchievementID string `json:"achievementId,omitempty"`
		Category      string `json:"category,omitempty"`
	} `json:"earnedRewards"`
	EarnedAchievements []struct {
		AchievementID                    string  `json:"achievementId"`
		CompletionDate                   float64 `json:"completionDate"`
		NumCompletedAchievementsInSeries int     `json:"numCompletedAchievementsInSeries"`
		TotalAchievementsInSeries        int     `json:"totalAchievementsInSeries"`
		IsComplete                       bool    `json:"isComplete"`
		InProgress                       bool    `json:"inProgress"`
		Criteria                         []struct {
			CriterionID string `json:"criterionId"`
		} `json:"criteria"`
		NextProgressEarnedQuantity   int `json:"nextProgressEarnedQuantity,omitempty"`
		NextProgressRequiredQuantity int `json:"nextProgressRequiredQuantity,omitempty"`
	} `json:"earnedAchievements"`
}

Profile structure

type StaticProfile

type StaticProfile struct {
	Achievements []struct {
		CategoryID          string   `json:"categoryId"`
		ChainAchievementIds []string `json:"chainAchievementIds"`
		ChainRewardSize     int      `json:"chainRewardSize"`
		CriteriaIds         []string `json:"criteriaIds,omitempty"`
		Description         string   `json:"description"`
		Flags               int      `json:"flags"`
		ID                  string   `json:"id"`
		ImageURL            string   `json:"imageUrl"`
		IsChained           bool     `json:"isChained"`
		Points              int      `json:"points"`
		Title               string   `json:"title"`
		UIOrderHint         int      `json:"uiOrderHint"`
	} `json:"achievements"`
	Criteria []struct {
		AchievementID     string `json:"achievementId"`
		Description       string `json:"description"`
		EvaluationClass   string `json:"evaluationClass"`
		Flags             int    `json:"flags"`
		ID                string `json:"id"`
		NecessaryQuantity int    `json:"necessaryQuantity"`
		UIOrderHint       int    `json:"uiOrderHint"`
	} `json:"criteria"`
	Categories []struct {
		ChildrenCategoryIds   []interface{} `json:"childrenCategoryIds"`
		FeaturedAchievementID string        `json:"featuredAchievementId"`
		ID                    string        `json:"id"`
		Name                  string        `json:"name"`
		ParentCategoryID      string        `json:"parentCategoryId"`
		Points                int           `json:"points"`
		UIOrderHint           int           `json:"uiOrderHint"`
		MedalTiers            []int         `json:"medalTiers,omitempty"`
	} `json:"categories"`
	Rewards []struct {
		Flags          int    `json:"flags"`
		ID             string `json:"id"`
		AchievementID  string `json:"achievementId,omitempty"`
		Name           string `json:"name"`
		ImageURL       string `json:"imageUrl"`
		UnlockableType string `json:"unlockableType"`
		IsSkin         bool   `json:"isSkin"`
		UIOrderHint    int    `json:"uiOrderHint"`
		Command        string `json:"command,omitempty"`
	} `json:"rewards"`
}

StaticProfile structure

Jump to

Keyboard shortcuts

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