From 7c1cff0de6cd31d3e014cdd0be1de5847cf67fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wysoki=C5=84ski?= Date: Fri, 9 Jun 2023 07:21:54 +0200 Subject: [PATCH] feat: use go-swagger to generate REST client --- Makefile | 10 +- go.mod | 27 +- go.sum | 178 +- .../20221028073839_groups_add_two_columns.go | 4 +- internal/twhelp/internal/client/.gitignore | 4 + internal/twhelp/internal/client/client.go | 3 + internal/twhelp/internal/client/swagger.json | 3650 +++++++++++++++++ 7 files changed, 3861 insertions(+), 15 deletions(-) create mode 100644 internal/twhelp/internal/client/.gitignore create mode 100644 internal/twhelp/internal/client/client.go create mode 100644 internal/twhelp/internal/client/swagger.json diff --git a/Makefile b/Makefile index f3e2f68..a4c4b84 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ GOBIN := $(shell go env GOPATH)/bin endif OSARCH=$(shell uname -m) GOLANGCI_LINT_PATH=$(GOBIN)/golangci-lint +GO_SWAGGER_PATH=$(GOBIN)/go-swagger .PHONY: install-git-hooks install-git-hooks: @@ -18,17 +19,22 @@ install-golangci-lint: @echo "Installing github.com/golangci/golangci-lint..." @test -f $(GOLANGCI_LINT_PATH) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.53.2 +.PHONY: install-go-swagger +install-go-swagger: + @echo "Installing github.com/go-swagger/go-swagger..." + @test -f $(GO_SWAGGER_PATH) || (wget -q -O $(GO_SWAGGER_PATH) https://github.com/go-swagger/go-swagger/releases/download/v0.30.4/swagger_$(GOOS)_$(GOARCH) && chmod u+x $(GO_SWAGGER_PATH)) + .PHONY: install-counterfeiter install-counterfeiter: @echo "Installing github.com/maxbrunsfeld/counterfeiter..." @go install github.com/maxbrunsfeld/counterfeiter/v6@v6.6.1 .PHONY: install-tools -install-tools: install-golangci-lint install-counterfeiter +install-tools: install-golangci-lint install-counterfeiter install-go-swagger .PHONY: install install: install-tools install-git-hooks .PHONY: generate -generate: install-counterfeiter +generate: install-counterfeiter install-go-swagger go generate ./... diff --git a/go.mod b/go.mod index 9571a2a..f8b2f66 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,11 @@ go 1.20 require ( github.com/bwmarrin/discordgo v0.27.1 github.com/cenkalti/backoff/v4 v4.2.1 + github.com/go-openapi/errors v0.20.3 + github.com/go-openapi/runtime v0.26.0 + github.com/go-openapi/strfmt v0.21.7 + github.com/go-openapi/swag v0.22.3 + github.com/go-openapi/validate v0.22.1 github.com/google/uuid v1.3.0 github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa github.com/kelseyhightower/envconfig v1.4.0 @@ -23,24 +28,35 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/docker v20.10.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/analysis v0.21.4 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/loads v0.21.2 // indirect + github.com/go-openapi/spec v0.20.8 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jinzhu/inflection v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opencontainers/runc v1.1.5 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -52,13 +68,16 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + go.mongodb.org/mongo-driver v1.11.3 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.9.0 // indirect golang.org/x/mod v0.9.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/tools v0.7.0 // indirect - gopkg.in/yaml.v2 v2.3.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect mellium.im/sasl v0.3.1 // indirect ) diff --git a/go.sum b/go.sum index 0a27715..1cccb36 100644 --- a/go.sum +++ b/go.sum @@ -5,6 +5,11 @@ github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2y github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/bwmarrin/discordgo v0.27.1 h1:ib9AIc/dom1E/fSIulrBwnez0CToJE113ZGt4HoliGY= github.com/bwmarrin/discordgo v0.27.1/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= @@ -19,6 +24,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -31,49 +37,141 @@ github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYS github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= +github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= +github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= +github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= +github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= +github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= +github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= +github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= +github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= +github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= +github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa h1:s+4MhCQ6YrzisK6hFJUX53drDT4UsSW3DEhKn0ifuHw= github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2 h1:hRGSmZu7j271trc9sneMrpOW7GN5ngLm8YUZIPzf394= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 h1:rzf0wL0CHVc8CEsgyygG0Mn9CNCCPZqOPaz8RiiHYQk= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -82,8 +180,12 @@ github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/ github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -91,21 +193,35 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= github.com/uptrace/bun v1.1.14 h1:S5vvNnjEynJ0CvnrBOD7MIRW7q/WbtvFXrdfy0lddAM= @@ -125,6 +241,11 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= @@ -133,8 +254,19 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= +go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= +go.mongodb.org/mongo-driver v1.11.3 h1:Ql6K6qYHEzB6xvu4+AU0BoRoqf9vFPcc4o7MUIdPW8Y= +go.mongodb.org/mongo-driver v1.11.3/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= @@ -142,10 +274,14 @@ go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -159,12 +295,22 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -172,6 +318,9 @@ golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -180,7 +329,14 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -194,11 +350,19 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/internal/bundb/migrations/20221028073839_groups_add_two_columns.go b/internal/bundb/migrations/20221028073839_groups_add_two_columns.go index 27d4eeb..0845865 100644 --- a/internal/bundb/migrations/20221028073839_groups_add_two_columns.go +++ b/internal/bundb/migrations/20221028073839_groups_add_two_columns.go @@ -22,7 +22,7 @@ func init() { ColumnExpr("? boolean default false", bun.Safe(c)). IfNotExists(). Exec(ctx); err != nil { - return fmt.Errorf("couldn't add the %s column: %w", c, err) + return fmt.Errorf("couldn't add the '%s' column: %w", c, err) } } return nil @@ -38,7 +38,7 @@ func init() { Model(&model.Group{}). Column(c). Exec(ctx); err != nil { - return fmt.Errorf("couldn't drop the %s column: %w", c, err) + return fmt.Errorf("couldn't drop the '%s' column: %w", c, err) } } return nil diff --git a/internal/twhelp/internal/client/.gitignore b/internal/twhelp/internal/client/.gitignore new file mode 100644 index 0000000..2a589f3 --- /dev/null +++ b/internal/twhelp/internal/client/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!swagger.json +!client.go diff --git a/internal/twhelp/internal/client/client.go b/internal/twhelp/internal/client/client.go new file mode 100644 index 0000000..98f69ad --- /dev/null +++ b/internal/twhelp/internal/client/client.go @@ -0,0 +1,3 @@ +package client + +//go:generate go-swagger generate client -f swagger.json --target ../ -c client -m client --skip-tag-packages diff --git a/internal/twhelp/internal/client/swagger.json b/internal/twhelp/internal/client/swagger.json new file mode 100644 index 0000000..13c79bf --- /dev/null +++ b/internal/twhelp/internal/client/swagger.json @@ -0,0 +1,3650 @@ +{ + "schemes": ["https"], + "swagger": "2.0", + "info": { + "description": "REST API to interact with [TWHelp](https://tribalwarshelp.com).", + "title": "TWHelp API", + "contact": { + "name": "Dawid WysokiƄski", + "url": "https://dwysokinski.me", + "email": "contact@dwysokinski.me" + }, + "license": { + "name": "MIT" + }, + "version": "1.0" + }, + "host": "tribalwarshelp.com", + "basePath": "/api/v1", + "paths": { + "/versions": { + "get": { + "description": "List all versions", + "produces": [ + "application/json" + ], + "tags": [ + "versions" + ], + "summary": "List versions", + "operationId": "listVersions", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListVersionsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}": { + "get": { + "description": "Get a version", + "produces": [ + "application/json" + ], + "tags": [ + "versions" + ], + "summary": "Get a version", + "operationId": "getVersion", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetVersionResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers": { + "get": { + "description": "List all servers", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers" + ], + "summary": "List servers", + "operationId": "listServers", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "true=only open servers, false=only closed servers, by default both open and closed servers are returned", + "name": "open", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 500, + "minimum": 1, + "type": "integer", + "default": 500, + "description": "page size", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListServersResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}": { + "get": { + "description": "Get a server", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers" + ], + "summary": "Get a server", + "operationId": "getServer", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetServerResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/building-info": { + "get": { + "description": "Get building info", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers" + ], + "summary": "Get building info", + "operationId": "getBuildingInfo", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetBuildingInfoResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/config": { + "get": { + "description": "Get server config", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers" + ], + "summary": "Get server config", + "operationId": "getServerConfig", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetServerConfigResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/ennoblements": { + "get": { + "description": "List all ennoblements", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "ennoblements" + ], + "summary": "List ennoblements", + "operationId": "listEnnoblements", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created after the given time, this is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created before the given time, this is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListEnnoblementsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players": { + "get": { + "description": "List all players", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players" + ], + "summary": "List players", + "operationId": "listPlayers", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "true=only deleted players, false=only existing players, by default both existing and deleted players are returned", + "name": "deleted", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "player names, max 20", + "name": "name", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "scoreAtt:asc", + "scoreAtt:desc", + "scoreDef:asc", + "scoreDef:desc", + "scoreSup:asc", + "scoreSup:desc", + "scoreTotal:asc", + "scoreTotal:desc", + "points:asc", + "points:desc", + "deletedAt:asc", + "deletedAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListPlayersResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}": { + "get": { + "description": "Get a player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players" + ], + "summary": "Get a player", + "operationId": "getPlayer", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetPlayerResp" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/ennoblements": { + "get": { + "description": "List ennoblements of a particular player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "ennoblements" + ], + "summary": "List ennoblements of a particular player", + "operationId": "listPlayerEnnoblements", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created after the given time, this is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created before the given time, this is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListEnnoblementsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/history": { + "get": { + "description": "Deprecated, use /versions/{versionCode}/servers/{serverKey}/players/{playerId}/snapshots instead.", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "snapshots" + ], + "summary": "Deprecated, use /versions/{versionCode}/servers/{serverKey}/players/{playerId}/snapshots instead.", + "operationId": "listPlayerSnapshotsDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "date:asc", + "date:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [date:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListPlayerSnapshotsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/other-servers": { + "get": { + "description": "List other servers of a particular player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players" + ], + "summary": "List other servers of a particular player", + "operationId": "listPlayerOtherServers", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListPlayerOtherServersResp" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/snapshots": { + "get": { + "description": "List snapshots of a particular player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "snapshots" + ], + "summary": "List snapshots of a particular player", + "operationId": "listPlayerSnapshots", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "date:asc", + "date:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [date:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListPlayerSnapshotsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/tribe-changes": { + "get": { + "description": "List tribe changes of a particular player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "tribe_changes" + ], + "summary": "List tribe changes of a particular player", + "operationId": "listPlayerTribeChanges", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTribeChangesResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/players/{playerId}/villages": { + "get": { + "description": "List villages of a particular player", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "villages" + ], + "summary": "List villages of a particular player", + "operationId": "listPlayerVillages", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Player ID", + "name": "playerId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 500, + "minimum": 1, + "type": "integer", + "default": 500, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "village coordinates, max 50", + "name": "coords", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListVillagesResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes": { + "get": { + "description": "List all tribes", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes" + ], + "summary": "List tribes", + "operationId": "listTribes", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "true=only deleted tribes, false=only existing tribes, by default both existing and deleted tribes are returned", + "name": "deleted", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "tribe tags, max 20", + "name": "tag", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "scoreAtt:asc", + "scoreAtt:desc", + "scoreDef:asc", + "scoreDef:desc", + "scoreTotal:asc", + "scoreTotal:desc", + "points:asc", + "points:desc", + "dominance:asc", + "dominance:desc", + "deletedAt:asc", + "deletedAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTribesResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}": { + "get": { + "description": "Get a tribe", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes" + ], + "summary": "Get a tribe", + "operationId": "getTribe", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetTribeResp" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/ennoblements": { + "get": { + "description": "List ennoblements of a particular tribe", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes", + "ennoblements" + ], + "summary": "List ennoblements of a particular tribe", + "operationId": "listTribeEnnoblements", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created after the given time, this is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created before the given time, this is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListEnnoblementsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/history": { + "get": { + "description": "Deprecated, use /versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/snapshots instead.", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes", + "snapshots" + ], + "summary": "Deprecated, use /versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/snapshots instead.", + "operationId": "listTribeSnapshotsDeprecated", + "deprecated": true, + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "date:asc", + "date:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [date:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTribeSnapshotsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/members": { + "get": { + "description": "List all tribe members", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "players", + "tribes" + ], + "summary": "List tribe members", + "operationId": "listTribeMembers", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "scoreAtt:asc", + "scoreAtt:desc", + "scoreDef:asc", + "scoreDef:desc", + "scoreSup:asc", + "scoreSup:desc", + "scoreTotal:asc", + "scoreTotal:desc", + "points:asc", + "points:desc", + "deletedAt:asc", + "deletedAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListPlayersResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/snapshots": { + "get": { + "description": "List snapshots of a particular tribe", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes", + "snapshots" + ], + "summary": "List snapshots of a particular tribe", + "operationId": "listTribeSnapshots", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "date:asc", + "date:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [date:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTribeSnapshotsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/tribes/{tribeId}/tribe-changes": { + "get": { + "description": "List tribe changes of a particular tribe", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "tribes", + "tribe_changes" + ], + "summary": "List tribe changes of a particular tribe", + "operationId": "listTribeTribeChanges", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Tribe ID", + "name": "tribeId", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 100, + "minimum": 1, + "type": "integer", + "default": 100, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "id:asc", + "id:desc", + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc,id:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListTribeChangesResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/unit-info": { + "get": { + "description": "Get unit info", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers" + ], + "summary": "Get unit info", + "operationId": "getUnitInfo", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetUnitInfoResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/villages": { + "get": { + "description": "List all villages", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "villages" + ], + "summary": "List villages", + "operationId": "listVillages", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 500, + "minimum": 1, + "type": "integer", + "default": 500, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi", + "description": "village coordinates, max 50", + "name": "coords", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListVillagesResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/villages/{villageId}": { + "get": { + "description": "Get a village", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "villages" + ], + "summary": "Get a village", + "operationId": "getVillage", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Village ID", + "name": "villageId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/GetVillageResp" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + }, + "/versions/{versionCode}/servers/{serverKey}/villages/{villageId}/ennoblements": { + "get": { + "description": "List ennoblements of a particular village", + "produces": [ + "application/json" + ], + "tags": [ + "versions", + "servers", + "villages", + "ennoblements" + ], + "summary": "List ennoblements of a particular village", + "operationId": "listVillageEnnoblements", + "parameters": [ + { + "type": "string", + "description": "Version code", + "name": "versionCode", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Server key", + "name": "serverKey", + "in": "path", + "required": true + }, + { + "type": "integer", + "description": "Village ID", + "name": "villageId", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created after the given time, this is a timestamp in RFC 3339 format", + "name": "since", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "only show items created before the given time, this is a timestamp in RFC 3339 format", + "name": "before", + "in": "query" + }, + { + "minimum": 0, + "type": "integer", + "default": 0, + "description": "specifies where to start a page", + "name": "offset", + "in": "query" + }, + { + "maximum": 200, + "minimum": 1, + "type": "integer", + "default": 200, + "description": "page size", + "name": "limit", + "in": "query" + }, + { + "type": "array", + "items": { + "enum": [ + "createdAt:asc", + "createdAt:desc" + ], + "type": "string" + }, + "collectionFormat": "multi", + "description": "format: field:direction, default: [createdAt:asc]", + "name": "sort", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ListEnnoblementsResp" + }, + "headers": { + "X-Total-Count": { + "type": "integer", + "description": "Total number of records" + } + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "404": { + "description": "Not Found", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/ErrorResp" + } + } + } + } + } + }, + "definitions": { + "ApiError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "entity-not-found", + "route-not-found", + "method-not-allowed", + "validation-error", + "internal-server-error" + ] + }, + "message": { + "type": "string" + } + } + }, + "Building": { + "type": "object", + "properties": { + "buildTime": { + "type": "number" + }, + "buildTimeFactor": { + "type": "number" + }, + "iron": { + "type": "integer" + }, + "ironFactor": { + "type": "number" + }, + "maxLevel": { + "type": "integer" + }, + "minLevel": { + "type": "integer" + }, + "pop": { + "type": "integer" + }, + "popFactor": { + "type": "number" + }, + "stone": { + "type": "integer" + }, + "stoneFactor": { + "type": "number" + }, + "wood": { + "type": "integer" + }, + "woodFactor": { + "type": "number" + } + } + }, + "BuildingInfo": { + "type": "object", + "properties": { + "barracks": { + "$ref": "#/definitions/Building" + }, + "farm": { + "$ref": "#/definitions/Building" + }, + "garage": { + "$ref": "#/definitions/Building" + }, + "hide": { + "$ref": "#/definitions/Building" + }, + "iron": { + "$ref": "#/definitions/Building" + }, + "main": { + "$ref": "#/definitions/Building" + }, + "market": { + "$ref": "#/definitions/Building" + }, + "place": { + "$ref": "#/definitions/Building" + }, + "smith": { + "$ref": "#/definitions/Building" + }, + "snob": { + "$ref": "#/definitions/Building" + }, + "stable": { + "$ref": "#/definitions/Building" + }, + "statue": { + "$ref": "#/definitions/Building" + }, + "stone": { + "$ref": "#/definitions/Building" + }, + "storage": { + "$ref": "#/definitions/Building" + }, + "wall": { + "$ref": "#/definitions/Building" + }, + "watchtower": { + "$ref": "#/definitions/Building" + }, + "wood": { + "$ref": "#/definitions/Building" + } + } + }, + "Ennoblement": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "id": { + "type": "integer" + }, + "newOwner": { + "x-nullable": true, + "$ref": "#/definitions/PlayerMeta" + }, + "points": { + "type": "integer" + }, + "village": { + "$ref": "#/definitions/VillageMeta" + } + } + }, + "ErrorResp": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ApiError" + } + } + }, + "GetBuildingInfoResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/BuildingInfo" + } + } + }, + "GetPlayerResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Player" + } + } + }, + "GetServerConfigResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/ServerConfig" + } + } + }, + "GetServerResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Server" + } + } + }, + "GetTribeResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Tribe" + } + } + }, + "GetUnitInfoResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/UnitInfo" + } + } + }, + "GetVersionResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Version" + } + } + }, + "GetVillageResp": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/Village" + } + } + }, + "ListEnnoblementsResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Ennoblement" + } + } + } + }, + "ListPlayerOtherServersResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/PlayerWithServer" + } + } + } + }, + "ListPlayerSnapshotsResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/PlayerSnapshot" + } + } + } + }, + "ListPlayersResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Player" + } + } + } + }, + "ListServersResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Server" + } + } + } + }, + "ListTribeChangesResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/TribeChange" + } + } + } + }, + "ListTribeSnapshotsResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/TribeSnapshot" + } + } + } + }, + "ListTribesResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Tribe" + } + } + } + }, + "ListVersionsResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Version" + } + } + } + }, + "ListVillagesResp": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Village" + } + } + } + }, + "Player": { + "type": "object", + "properties": { + "bestRank": { + "type": "integer" + }, + "bestRankAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "id": { + "type": "integer" + }, + "lastActivityAt": { + "type": "string", + "format": "date-time" + }, + "mostPoints": { + "type": "integer" + }, + "mostPointsAt": { + "type": "string", + "format": "date-time" + }, + "mostVillages": { + "type": "integer" + }, + "mostVillagesAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "numVillages": { + "type": "integer" + }, + "points": { + "type": "integer" + }, + "profileUrl": { + "type": "string" + }, + "rank": { + "type": "integer" + }, + "rankAtt": { + "type": "integer" + }, + "rankDef": { + "type": "integer" + }, + "rankSup": { + "type": "integer" + }, + "rankTotal": { + "type": "integer" + }, + "scoreAtt": { + "type": "integer" + }, + "scoreDef": { + "type": "integer" + }, + "scoreSup": { + "type": "integer" + }, + "scoreTotal": { + "type": "integer" + }, + "tribe": { + "x-nullable": true, + "$ref": "#/definitions/TribeMeta" + } + } + }, + "PlayerMeta": { + "description": "Basic player information", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "profileUrl": { + "type": "string" + }, + "tribe": { + "x-nullable": true, + "$ref": "#/definitions/TribeMeta" + } + } + }, + "PlayerSnapshot": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date" + }, + "id": { + "type": "integer" + }, + "numVillages": { + "type": "integer" + }, + "points": { + "type": "integer" + }, + "rank": { + "type": "integer" + }, + "rankAtt": { + "type": "integer" + }, + "rankDef": { + "type": "integer" + }, + "rankSup": { + "type": "integer" + }, + "rankTotal": { + "type": "integer" + }, + "scoreAtt": { + "type": "integer" + }, + "scoreDef": { + "type": "integer" + }, + "scoreSup": { + "type": "integer" + }, + "scoreTotal": { + "type": "integer" + }, + "tribe": { + "x-nullable": true, + "$ref": "#/definitions/TribeMeta" + } + } + }, + "PlayerWithServer": { + "type": "object", + "properties": { + "bestRank": { + "type": "integer" + }, + "bestRankAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "id": { + "type": "integer" + }, + "lastActivityAt": { + "type": "string", + "format": "date-time" + }, + "mostPoints": { + "type": "integer" + }, + "mostPointsAt": { + "type": "string", + "format": "date-time" + }, + "mostVillages": { + "type": "integer" + }, + "mostVillagesAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "numVillages": { + "type": "integer" + }, + "points": { + "type": "integer" + }, + "profileUrl": { + "type": "string" + }, + "rank": { + "type": "integer" + }, + "rankAtt": { + "type": "integer" + }, + "rankDef": { + "type": "integer" + }, + "rankSup": { + "type": "integer" + }, + "rankTotal": { + "type": "integer" + }, + "scoreAtt": { + "type": "integer" + }, + "scoreDef": { + "type": "integer" + }, + "scoreSup": { + "type": "integer" + }, + "scoreTotal": { + "type": "integer" + }, + "server": { + "$ref": "#/definitions/ServerMeta" + }, + "tribe": { + "x-nullable": true, + "$ref": "#/definitions/TribeMeta" + } + } + }, + "Server": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "ennoblementDataUpdatedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "key": { + "type": "string", + "example": "pl151" + }, + "numBarbarianVillages": { + "type": "integer" + }, + "numBonusVillages": { + "type": "integer" + }, + "numPlayerVillages": { + "type": "integer" + }, + "numPlayers": { + "type": "integer" + }, + "numTribes": { + "type": "integer" + }, + "numVillages": { + "type": "integer" + }, + "open": { + "type": "boolean" + }, + "playerDataUpdatedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "tribeDataUpdatedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "url": { + "type": "string", + "example": "https://pl151.plemiona.pl" + }, + "villageDataUpdatedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + } + } + }, + "ServerConfig": { + "type": "object", + "properties": { + "ally": { + "$ref": "#/definitions/ServerConfigAlly" + }, + "build": { + "$ref": "#/definitions/ServerConfigBuild" + }, + "buildings": { + "$ref": "#/definitions/ServerConfigBuildings" + }, + "commands": { + "$ref": "#/definitions/ServerConfigCommands" + }, + "coord": { + "$ref": "#/definitions/ServerConfigCoord" + }, + "game": { + "$ref": "#/definitions/ServerConfigGame" + }, + "misc": { + "$ref": "#/definitions/ServerConfigMisc" + }, + "moral": { + "type": "integer" + }, + "newbie": { + "$ref": "#/definitions/ServerConfigNewbie" + }, + "night": { + "$ref": "#/definitions/ServerConfigNight" + }, + "sitter": { + "$ref": "#/definitions/ServerConfigSitter" + }, + "sleep": { + "$ref": "#/definitions/ServerConfigSleep" + }, + "snob": { + "$ref": "#/definitions/ServerConfigSnob" + }, + "speed": { + "type": "number" + }, + "unitSpeed": { + "type": "number" + }, + "win": { + "$ref": "#/definitions/ServerConfigWin" + } + } + }, + "ServerConfigAlly": { + "type": "object", + "properties": { + "allytimeSupport": { + "type": "integer" + }, + "fixedAllies": { + "type": "integer" + }, + "levels": { + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "noHarm": { + "type": "integer" + }, + "noJoin": { + "type": "integer" + }, + "noLeave": { + "type": "integer" + }, + "noOtherSupport": { + "type": "integer" + }, + "noOtherSupportType": { + "type": "integer" + }, + "pointsMemberCount": { + "type": "integer" + }, + "warsAutoacceptDays": { + "type": "integer" + }, + "warsMemberRequirement": { + "type": "integer" + }, + "warsPointsRequirement": { + "type": "integer" + }, + "xpRequirements": { + "type": "string" + } + } + }, + "ServerConfigBuild": { + "type": "object", + "properties": { + "destroy": { + "type": "integer" + } + } + }, + "ServerConfigBuildings": { + "type": "object", + "properties": { + "customBarracks": { + "type": "integer" + }, + "customChurch": { + "type": "integer" + }, + "customFarm": { + "type": "integer" + }, + "customGarage": { + "type": "integer" + }, + "customHide": { + "type": "integer" + }, + "customIron": { + "type": "integer" + }, + "customMain": { + "type": "integer" + }, + "customMarket": { + "type": "integer" + }, + "customPlace": { + "type": "integer" + }, + "customSmith": { + "type": "integer" + }, + "customSnob": { + "type": "integer" + }, + "customStable": { + "type": "integer" + }, + "customStatue": { + "type": "integer" + }, + "customStone": { + "type": "integer" + }, + "customStorage": { + "type": "integer" + }, + "customWall": { + "type": "integer" + }, + "customWatchtower": { + "type": "integer" + }, + "customWood": { + "type": "integer" + } + } + }, + "ServerConfigCommands": { + "type": "object", + "properties": { + "commandCancelTime": { + "type": "integer" + }, + "millisArrival": { + "type": "integer" + } + } + }, + "ServerConfigCoord": { + "type": "object", + "properties": { + "bonusNew": { + "type": "integer" + }, + "bonusVillages": { + "type": "integer" + }, + "emptyVillages": { + "type": "integer" + }, + "func": { + "type": "integer" + }, + "inner": { + "type": "integer" + }, + "mapSize": { + "type": "integer" + }, + "nobleRestart": { + "type": "integer" + }, + "selectStart": { + "type": "integer" + }, + "startVillages": { + "type": "integer" + }, + "villageMoveWait": { + "type": "integer" + } + } + }, + "ServerConfigGame": { + "type": "object", + "properties": { + "archer": { + "type": "integer" + }, + "barbarianMaxPoints": { + "type": "integer" + }, + "barbarianRise": { + "type": "number" + }, + "barbarianShrink": { + "type": "integer" + }, + "baseProduction": { + "type": "integer" + }, + "buildtimeFormula": { + "type": "integer" + }, + "church": { + "type": "integer" + }, + "event": { + "type": "integer" + }, + "fakeLimit": { + "type": "number" + }, + "farmLimit": { + "type": "integer" + }, + "hauls": { + "type": "integer" + }, + "haulsBase": { + "type": "integer" + }, + "haulsMax": { + "type": "integer" + }, + "knight": { + "type": "integer" + }, + "knightNewItems": { + "type": "integer" + }, + "scavenging": { + "type": "integer" + }, + "stronghold": { + "type": "integer" + }, + "suppressEvents": { + "type": "integer" + }, + "tech": { + "type": "integer" + }, + "watchtower": { + "type": "integer" + } + } + }, + "ServerConfigMisc": { + "type": "object", + "properties": { + "killRanking": { + "type": "integer" + }, + "tradeCancelTime": { + "type": "integer" + }, + "tutorial": { + "type": "integer" + } + } + }, + "ServerConfigNewbie": { + "type": "object", + "properties": { + "days": { + "type": "integer" + }, + "ratio": { + "type": "integer" + }, + "ratioDays": { + "type": "integer" + }, + "removeNewbieVillages": { + "type": "integer" + } + } + }, + "ServerConfigNight": { + "type": "object", + "properties": { + "active": { + "type": "integer" + }, + "defFactor": { + "type": "number" + }, + "duration": { + "type": "integer" + }, + "endHour": { + "type": "integer" + }, + "startHour": { + "type": "integer" + } + } + }, + "ServerConfigSitter": { + "type": "object", + "properties": { + "allow": { + "type": "integer" + } + } + }, + "ServerConfigSleep": { + "type": "object", + "properties": { + "active": { + "type": "integer" + }, + "delay": { + "type": "integer" + }, + "max": { + "type": "integer" + }, + "maxAwake": { + "type": "integer" + }, + "min": { + "type": "integer" + }, + "minAwake": { + "type": "integer" + }, + "warnTime": { + "type": "integer" + } + } + }, + "ServerConfigSnob": { + "type": "object", + "properties": { + "cheapRebuild": { + "type": "integer" + }, + "coinIron": { + "type": "integer" + }, + "coinStone": { + "type": "integer" + }, + "coinWood": { + "type": "integer" + }, + "factor": { + "type": "number" + }, + "gold": { + "type": "integer" + }, + "maxDist": { + "type": "integer" + }, + "noBarbConquer": { + "type": "integer" + }, + "rise": { + "type": "integer" + } + } + }, + "ServerConfigWin": { + "type": "object", + "properties": { + "check": { + "type": "integer" + } + } + }, + "ServerMeta": { + "description": "Basic server information", + "type": "object", + "properties": { + "key": { + "type": "string", + "example": "pl151" + }, + "open": { + "type": "boolean" + }, + "url": { + "type": "string", + "example": "https://pl151.plemiona.pl" + } + } + }, + "Tribe": { + "type": "object", + "properties": { + "allPoints": { + "type": "integer" + }, + "bestRank": { + "type": "integer" + }, + "bestRankAt": { + "type": "string", + "format": "date-time" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "deletedAt": { + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "dominance": { + "type": "number" + }, + "id": { + "type": "integer" + }, + "mostPoints": { + "type": "integer" + }, + "mostPointsAt": { + "type": "string", + "format": "date-time" + }, + "mostVillages": { + "type": "integer" + }, + "mostVillagesAt": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "numMembers": { + "type": "integer" + }, + "numVillages": { + "type": "integer" + }, + "points": { + "type": "integer" + }, + "profileUrl": { + "type": "string" + }, + "rank": { + "type": "integer" + }, + "rankAtt": { + "type": "integer" + }, + "rankDef": { + "type": "integer" + }, + "rankTotal": { + "type": "integer" + }, + "scoreAtt": { + "type": "integer" + }, + "scoreDef": { + "type": "integer" + }, + "scoreTotal": { + "type": "integer" + }, + "tag": { + "type": "string" + } + } + }, + "TribeChange": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "id": { + "type": "integer" + }, + "newTribe": { + "$ref": "#/definitions/TribeMeta" + }, + "player": { + "$ref": "#/definitions/PlayerMeta" + } + } + }, + "TribeMeta": { + "description": "Basic tribe information", + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "profileUrl": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "TribeSnapshot": { + "type": "object", + "properties": { + "allPoints": { + "type": "integer" + }, + "date": { + "type": "string", + "format": "date" + }, + "dominance": { + "type": "number" + }, + "id": { + "type": "integer" + }, + "numMembers": { + "type": "integer" + }, + "numVillages": { + "type": "integer" + }, + "points": { + "type": "integer" + }, + "rank": { + "type": "integer" + }, + "rankAtt": { + "type": "integer" + }, + "rankDef": { + "type": "integer" + }, + "rankTotal": { + "type": "integer" + }, + "scoreAtt": { + "type": "integer" + }, + "scoreDef": { + "type": "integer" + }, + "scoreTotal": { + "type": "integer" + } + } + }, + "Unit": { + "type": "object", + "properties": { + "attack": { + "type": "integer" + }, + "buildTime": { + "type": "number" + }, + "carry": { + "type": "integer" + }, + "defense": { + "type": "integer" + }, + "defenseArcher": { + "type": "integer" + }, + "defenseCavalry": { + "type": "integer" + }, + "pop": { + "type": "integer" + }, + "speed": { + "type": "number" + } + } + }, + "UnitInfo": { + "type": "object", + "properties": { + "archer": { + "$ref": "#/definitions/Unit" + }, + "axe": { + "$ref": "#/definitions/Unit" + }, + "catapult": { + "$ref": "#/definitions/Unit" + }, + "heavy": { + "$ref": "#/definitions/Unit" + }, + "knight": { + "$ref": "#/definitions/Unit" + }, + "light": { + "$ref": "#/definitions/Unit" + }, + "marcher": { + "$ref": "#/definitions/Unit" + }, + "militia": { + "$ref": "#/definitions/Unit" + }, + "ram": { + "$ref": "#/definitions/Unit" + }, + "snob": { + "$ref": "#/definitions/Unit" + }, + "spear": { + "$ref": "#/definitions/Unit" + }, + "spy": { + "$ref": "#/definitions/Unit" + }, + "sword": { + "$ref": "#/definitions/Unit" + } + } + }, + "Version": { + "type": "object", + "properties": { + "code": { + "type": "string", + "example": "pl" + }, + "host": { + "type": "string", + "example": "plemiona.pl" + }, + "name": { + "type": "string", + "example": "Poland" + }, + "timezone": { + "type": "string", + "example": "Europe/Warsaw" + } + } + }, + "Village": { + "type": "object", + "properties": { + "bonus": { + "type": "integer" + }, + "continent": { + "type": "string", + "example": "K44" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "fullName": { + "type": "string", + "example": "Village (450|450) K44" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string", + "example": "Village" + }, + "player": { + "x-nullable": true, + "$ref": "#/definitions/PlayerMeta" + }, + "points": { + "type": "integer" + }, + "profileUrl": { + "type": "string" + }, + "x": { + "type": "integer", + "example": 450 + }, + "y": { + "type": "integer", + "example": 450 + } + } + }, + "VillageMeta": { + "description": "Basic village information", + "type": "object", + "properties": { + "continent": { + "type": "string" + }, + "fullName": { + "type": "string", + "example": "Village (450|450) K44" + }, + "id": { + "type": "integer" + }, + "player": { + "x-nullable": true, + "$ref": "#/definitions/PlayerMeta" + }, + "profileUrl": { + "type": "string" + }, + "x": { + "type": "integer" + }, + "y": { + "type": "integer" + } + } + } + } +}