Skip to content

Commit d14df02

Browse files
zoo-github-actions-auth[bot]github-actions[bot]jessfraz
authored
Update api spec (#158)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <[email protected]> --------- Signed-off-by: Jess Frazelle <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <[email protected]>
1 parent d9bbd93 commit d14df02

File tree

7 files changed

+574
-435
lines changed

7 files changed

+574
-435
lines changed

examples_test.go

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/perimeterx/marshmallow v1.1.4 // indirect
2424
go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect
2525
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
26-
golang.org/x/sys v0.23.0 // indirect
26+
golang.org/x/sys v0.25.0 // indirect
2727
gopkg.in/yaml.v2 v2.4.0 // indirect
2828
gopkg.in/yaml.v3 v3.0.1 // indirect
2929
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
7575
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7676
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7777
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
78-
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
79-
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
78+
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
79+
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
8080
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
8181
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
8282
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

kittycad.go.patch.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
},
314314
{
315315
"value": {
316-
"example": "// TokenRevoke: Revoke an OAuth2 token.\n// \n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n// \n// \n// Parameters\n// \n// \t- `body`: The request parameters for the OAuth 2.0 token revocation flow.\n// \n// TokenRevoke: Revoke an OAuth2 token.\n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n//\n// Parameters\n//\n// - `body`: The request parameters for the OAuth 2.0 token revocation flow.\nfunc ExampleOauth2Service_TokenRevoke() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Oauth2.TokenRevoke(kittycad.TokenRevokeRequestForm{ClientID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), ClientSecret: \"some-string\", Token: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
316+
"example": "// TokenRevoke: Revoke an OAuth2 token.\n// \n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n// \n// \n// Parameters\n// \n// \t- `body`: The request parameters for the OAuth 2.0 token revocation flow.\n// \n// TokenRevoke: Revoke an OAuth2 token.\n// This endpoint is designed to be accessed from an *unauthenticated* API client.\n//\n// Parameters\n//\n// - `body`: The request parameters for the OAuth 2.0 token revocation flow.\nfunc ExampleOauth2Service_TokenRevoke() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Oauth2.TokenRevoke(kittycad.TokenRevokeRequestForm{ClientID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), ClientSecret: \"some-string\", Token: \"some-string\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
317317
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#Oauth2Service.TokenRevoke"
318318
},
319319
"op": "add",
@@ -577,15 +577,15 @@
577577
},
578578
{
579579
"value": {
580-
"example": "// DeleteForOrg: Delete an service account for your org.\n// \n// This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.\n// This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.\n// \n// \n// Parameters\n// \n// \t- `token`\n// \n// DeleteForOrg: Delete an service account for your org.\n// This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.\n// This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.\n//\n// Parameters\n//\n// - `token`\nfunc ExampleServiceAccountService_DeleteForOrg() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.ServiceAccount.DeleteForOrg(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
580+
"example": "// DeleteForOrg: Delete an service account for your org.\n// \n// This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.\n// This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.\n// \n// \n// Parameters\n// \n// \t- `token`: An auth token. A uuid with a prefix of svc-\n// \n// DeleteForOrg: Delete an service account for your org.\n// This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.\n// This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.\n//\n// Parameters\n//\n// - `token`: An auth token. A uuid with a prefix of svc-\nfunc ExampleServiceAccountService_DeleteForOrg() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.ServiceAccount.DeleteForOrg(\"some-string\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
581581
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#ServiceAccountService.DeleteForOrg"
582582
},
583583
"op": "add",
584584
"path": "/paths/~1org~1service-accounts~1{token}/delete/x-go"
585585
},
586586
{
587587
"value": {
588-
"example": "// GetForOrg: Get an service account for your org.\n// \n// This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.\n// \n// \n// Parameters\n// \n// \t- `token`\n// \n// GetForOrg: Get an service account for your org.\n// This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.\n//\n// Parameters\n//\n// - `token`\nfunc ExampleServiceAccountService_GetForOrg() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.ServiceAccount.GetForOrg(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
588+
"example": "// GetForOrg: Get an service account for your org.\n// \n// This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.\n// \n// \n// Parameters\n// \n// \t- `token`: An auth token. A uuid with a prefix of svc-\n// \n// GetForOrg: Get an service account for your org.\n// This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.\n//\n// Parameters\n//\n// - `token`: An auth token. A uuid with a prefix of svc-\nfunc ExampleServiceAccountService_GetForOrg() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.ServiceAccount.GetForOrg(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
589589
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#ServiceAccountService.GetForOrg"
590590
},
591591
"op": "add",
@@ -817,15 +817,15 @@
817817
},
818818
{
819819
"value": {
820-
"example": "// DeleteForUser: Delete an API token for your user.\n// \n// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n// \n// \n// Parameters\n// \n// \t- `token`\n// \n// DeleteForUser: Delete an API token for your user.\n// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters\n//\n// - `token`\nfunc ExampleAPITokenService_DeleteForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.APIToken.DeleteForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
820+
"example": "// DeleteForUser: Delete an API token for your user.\n// \n// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n// \n// \n// Parameters\n// \n// \t- `token`: An auth token. A uuid with a prefix of api-\n// \n// DeleteForUser: Delete an API token for your user.\n// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n// This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.\n//\n// Parameters\n//\n// - `token`: An auth token. A uuid with a prefix of api-\nfunc ExampleAPITokenService_DeleteForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.APIToken.DeleteForUser(\"some-string\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
821821
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser"
822822
},
823823
"op": "add",
824824
"path": "/paths/~1user~1api-tokens~1{token}/delete/x-go"
825825
},
826826
{
827827
"value": {
828-
"example": "// GetForUser: Get an API token for your user.\n// \n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n// \n// \n// Parameters\n// \n// \t- `token`\n// \n// GetForUser: Get an API token for your user.\n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n//\n// Parameters\n//\n// - `token`\nfunc ExampleAPITokenService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.GetForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
828+
"example": "// GetForUser: Get an API token for your user.\n// \n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n// \n// \n// Parameters\n// \n// \t- `token`: An auth token. A uuid with a prefix of api-\n// \n// GetForUser: Get an API token for your user.\n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n//\n// Parameters\n//\n// - `token`: An auth token. A uuid with a prefix of api-\nfunc ExampleAPITokenService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.GetForUser(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
829829
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser"
830830
},
831831
"op": "add",
@@ -985,7 +985,7 @@
985985
},
986986
{
987987
"value": {
988-
"example": "// GetSessionFor: Get a session for your user.\n// \n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n// \n// \n// Parameters\n// \n// \t- `token`\n// \n// GetSessionFor: Get a session for your user.\n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n//\n// Parameters\n//\n// - `token`\nfunc ExampleUserService_GetSessionFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetSessionFor(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
988+
"example": "// GetSessionFor: Get a session for your user.\n// \n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n// \n// \n// Parameters\n// \n// \t- `token`: An auth token. A uuid with a prefix of ses-\n// \n// GetSessionFor: Get a session for your user.\n// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n//\n// Parameters\n//\n// - `token`: An auth token. A uuid with a prefix of ses-\nfunc ExampleUserService_GetSessionFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetSessionFor(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
989989
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSessionFor"
990990
},
991991
"op": "add",

0 commit comments

Comments
 (0)