clean out internal some more
This commit is contained in:
parent
481ae64cc1
commit
abdfd503fd
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
Copyright © 2024 filifa
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package statsapi
|
||||
|
||||
type LeagueID int
|
||||
|
||||
// NOTE: there's a lot more leagues than this, but I don't care enough to put
|
||||
// them all in right now
|
||||
const (
|
||||
AL LeagueID = 103
|
||||
NL LeagueID = 104
|
||||
NN2 LeagueID = 431
|
||||
NNL LeagueID = 430
|
||||
EWL LeagueID = 429
|
||||
NAL LeagueID = 428
|
||||
ECL LeagueID = 427
|
||||
ANL LeagueID = 426
|
||||
NSL LeagueID = 432
|
||||
AA LeagueID = 100
|
||||
PL LeagueID = 105
|
||||
UA LeagueID = 101
|
||||
FL LeagueID = 106
|
||||
)
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
Copyright © 2024 filifa
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package statsapi
|
||||
|
||||
type SportID int
|
||||
|
||||
// These are all the Sport IDs used in some of the API calls, like the schedule
|
||||
// endpoint.
|
||||
const (
|
||||
MLB SportID = 1
|
||||
TripleA SportID = 11
|
||||
DoubleA SportID = 12
|
||||
HighA SportID = 13
|
||||
SingleA SportID = 14
|
||||
Rookie SportID = 16
|
||||
Winter SportID = 17
|
||||
MILB SportID = 21
|
||||
Independent SportID = 23
|
||||
Negro SportID = 61
|
||||
Korea SportID = 32
|
||||
NPB SportID = 31
|
||||
International SportID = 51
|
||||
International18U SportID = 509
|
||||
International16U SportID = 510
|
||||
InternationalAmateur SportID = 6005
|
||||
College SportID = 22
|
||||
HighSchool SportID = 586
|
||||
)
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
Copyright © 2024 filifa
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package statsapi
|
||||
|
||||
type TeamID int
|
||||
|
||||
// NOTE: there are obviously more teams than this (in other leagues), but I
|
||||
// only need MLB for my purposes
|
||||
const (
|
||||
LAA TeamID = 108
|
||||
AZ TeamID = 109
|
||||
BAL TeamID = 110
|
||||
BOS TeamID = 111
|
||||
CHC TeamID = 112
|
||||
CIN TeamID = 113
|
||||
CLE TeamID = 114
|
||||
COL TeamID = 115
|
||||
DET TeamID = 116
|
||||
HOU TeamID = 117
|
||||
KC TeamID = 118
|
||||
LAD TeamID = 119
|
||||
WSH TeamID = 120
|
||||
NYM TeamID = 121
|
||||
OAK TeamID = 133
|
||||
PIT TeamID = 134
|
||||
SD TeamID = 135
|
||||
SEA TeamID = 136
|
||||
SF TeamID = 137
|
||||
STL TeamID = 138
|
||||
TB TeamID = 139
|
||||
TEX TeamID = 140
|
||||
TOR TeamID = 141
|
||||
MIN TeamID = 142
|
||||
PHI TeamID = 143
|
||||
ATL TeamID = 144
|
||||
CWS TeamID = 145
|
||||
MIA TeamID = 146
|
||||
NYY TeamID = 147
|
||||
MIL TeamID = 158
|
||||
)
|
|
@ -17,24 +17,22 @@ package cmd
|
|||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"scm.dairydemon.net/filifa/mlbstats/cmd/internal/statsapi"
|
||||
)
|
||||
|
||||
var leagueIDs = map[string]statsapi.LeagueID{
|
||||
"al": statsapi.AL,
|
||||
"nl": statsapi.NL,
|
||||
"nn2": statsapi.NN2,
|
||||
"nnl": statsapi.NNL,
|
||||
"ewl": statsapi.EWL,
|
||||
"nal": statsapi.NAL,
|
||||
"ecl": statsapi.ECL,
|
||||
"anl": statsapi.ANL,
|
||||
"nsl": statsapi.NSL,
|
||||
"aa": statsapi.AA,
|
||||
"pl": statsapi.PL,
|
||||
"ua": statsapi.UA,
|
||||
"fl": statsapi.FL,
|
||||
var leagueIDs = map[string]int32{
|
||||
"al": 103,
|
||||
"nl": 104,
|
||||
"nn2": 431,
|
||||
"nnl": 430,
|
||||
"ewl": 429,
|
||||
"nal": 428,
|
||||
"ecl": 427,
|
||||
"anl": 426,
|
||||
"nsl": 432,
|
||||
"aa": 100,
|
||||
"pl": 105,
|
||||
"ua": 101,
|
||||
"fl": 106,
|
||||
}
|
||||
|
||||
type leagueAbbr string
|
||||
|
|
|
@ -17,29 +17,27 @@ package cmd
|
|||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"scm.dairydemon.net/filifa/mlbstats/cmd/internal/statsapi"
|
||||
)
|
||||
|
||||
var sportIDs = map[string]statsapi.SportID{
|
||||
"mlb": statsapi.MLB,
|
||||
"aaa": statsapi.TripleA,
|
||||
"aa": statsapi.DoubleA,
|
||||
"higha": statsapi.HighA,
|
||||
"a": statsapi.SingleA,
|
||||
"rookie": statsapi.Rookie,
|
||||
"winter": statsapi.Winter,
|
||||
"milb": statsapi.MILB,
|
||||
"indie": statsapi.Independent,
|
||||
"negro": statsapi.Negro,
|
||||
"kbo": statsapi.Korea,
|
||||
"npb": statsapi.NPB,
|
||||
"int": statsapi.International,
|
||||
"int18u": statsapi.International18U,
|
||||
"int16u": statsapi.International16U,
|
||||
"intamateur": statsapi.InternationalAmateur,
|
||||
"college": statsapi.College,
|
||||
"hs": statsapi.HighSchool,
|
||||
var sportIDs = map[string]int32{
|
||||
"mlb": 1,
|
||||
"aaa": 11,
|
||||
"aa": 12,
|
||||
"higha": 13,
|
||||
"a": 14,
|
||||
"rookie": 16,
|
||||
"winter": 17,
|
||||
"milb": 21,
|
||||
"indie": 23,
|
||||
"negro": 61,
|
||||
"kbo": 32,
|
||||
"npb": 31,
|
||||
"int": 51,
|
||||
"int18u": 509,
|
||||
"int16u": 510,
|
||||
"intamateur": 6005,
|
||||
"college": 22,
|
||||
"hs": 586,
|
||||
}
|
||||
|
||||
type sportAbbr string
|
||||
|
|
|
@ -17,41 +17,39 @@ package cmd
|
|||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"scm.dairydemon.net/filifa/mlbstats/cmd/internal/statsapi"
|
||||
)
|
||||
|
||||
var teamIDs = map[string]statsapi.TeamID{
|
||||
"laa": statsapi.LAA,
|
||||
"az": statsapi.AZ,
|
||||
"bal": statsapi.BAL,
|
||||
"bos": statsapi.BOS,
|
||||
"chc": statsapi.CHC,
|
||||
"cin": statsapi.CIN,
|
||||
"cle": statsapi.CLE,
|
||||
"col": statsapi.COL,
|
||||
"det": statsapi.DET,
|
||||
"hou": statsapi.HOU,
|
||||
"kc": statsapi.KC,
|
||||
"lad": statsapi.LAD,
|
||||
"wsh": statsapi.WSH,
|
||||
"nym": statsapi.NYM,
|
||||
"oak": statsapi.OAK,
|
||||
"pit": statsapi.PIT,
|
||||
"sd": statsapi.SD,
|
||||
"sea": statsapi.SEA,
|
||||
"sf": statsapi.SF,
|
||||
"stl": statsapi.STL,
|
||||
"tb": statsapi.TB,
|
||||
"tex": statsapi.TEX,
|
||||
"tor": statsapi.TOR,
|
||||
"min": statsapi.MIN,
|
||||
"phi": statsapi.PHI,
|
||||
"atl": statsapi.ATL,
|
||||
"cws": statsapi.CWS,
|
||||
"mia": statsapi.MIA,
|
||||
"nyy": statsapi.NYY,
|
||||
"mil": statsapi.MIL,
|
||||
var teamIDs = map[string]int32{
|
||||
"laa": 108,
|
||||
"az": 109,
|
||||
"bal": 110,
|
||||
"bos": 111,
|
||||
"chc": 112,
|
||||
"cin": 113,
|
||||
"cle": 114,
|
||||
"col": 115,
|
||||
"det": 116,
|
||||
"hou": 117,
|
||||
"kc": 118,
|
||||
"lad": 119,
|
||||
"wsh": 120,
|
||||
"nym": 121,
|
||||
"oak": 133,
|
||||
"pit": 134,
|
||||
"sd": 135,
|
||||
"sea": 136,
|
||||
"sf": 137,
|
||||
"stl": 138,
|
||||
"tb": 139,
|
||||
"tex": 140,
|
||||
"tor": 141,
|
||||
"min": 142,
|
||||
"phi": 143,
|
||||
"atl": 144,
|
||||
"cws": 145,
|
||||
"mia": 146,
|
||||
"nyy": 147,
|
||||
"mil": 158,
|
||||
}
|
||||
|
||||
type teamAbbr string
|
||||
|
|
Loading…
Reference in New Issue