Skip to content

Commit 1930f19

Browse files
Update api spec (#215)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 183fbe5 commit 1930f19

File tree

5 files changed

+114
-1231
lines changed

5 files changed

+114
-1231
lines changed

examples_test.go

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

kittycad.go.patch.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
"op": "add",
1616
"path": "/paths/~1/get/x-go"
1717
},
18-
{
19-
"value": {
20-
"example": "// Getdata: Get the metadata about our currently running server.\n// \n// This includes information on any of our other distributed systems it is connected to.\n// \n// You must be a Zoo employee to perform this request.\n// \n// Getdata: Get the metadata about our currently running server.\n// This includes information on any of our other distributed systems it is connected to.\n//\n// You must be a Zoo employee to perform this request.\nfunc ExampleMetaService_Getdata() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.Getdata()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
21-
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata"
22-
},
23-
"op": "add",
24-
"path": "/paths/~1_meta~1info/get/x-go"
25-
},
2618
{
2719
"value": {
2820
"example": "// GetIpinfo: Get ip address information.\n// \n// GetIpinfo: Get ip address information.\nfunc ExampleMetaService_GetIpinfo() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.GetIpinfo()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
@@ -217,7 +209,7 @@
217209
},
218210
{
219211
"value": {
220-
"example": "// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id.\n// \n// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\n// \n// You must be a Zoo employee to use this endpoint.\n// \n// \n// Parameters\n// \n// \t- `discordId`\n// \n// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id.\n// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\n//\n// You must be a Zoo employee to use this endpoint.\n//\n// Parameters\n//\n// - `discordId`\nfunc ExampleMetaService_InternalGetAPITokenForDiscordUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.InternalGetAPITokenForDiscordUser(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
212+
"example": "// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id.\n// \n// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\n// \n// You must be a Zoo admin to use this endpoint.\n// \n// \n// Parameters\n// \n// \t- `discordId`\n// \n// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id.\n// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\n//\n// You must be a Zoo admin to use this endpoint.\n//\n// Parameters\n//\n// - `discordId`\nfunc ExampleMetaService_InternalGetAPITokenForDiscordUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.InternalGetAPITokenForDiscordUser(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
221213
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.InternalGetAPITokenForDiscordUser"
222214
},
223215
"op": "add",
@@ -641,7 +633,7 @@
641633
},
642634
{
643635
"value": {
644-
"example": "// UpdateEnterprisePricingFor: Set the enterprise price for an organization.\n// \n// You must be a Zoo employee to perform this request.\n// \n// \n// Parameters\n// \n// \t- `id`: A UUID usually v4 or v7\n// \t- `body`: The price for an enterprise subscription.\n// \n// UpdateEnterprisePricingFor: Set the enterprise price for an organization.\n// You must be a Zoo employee to perform this request.\n//\n// Parameters\n//\n// - `id`: A UUID usually v4 or v7\n// - `body`: The price for an enterprise subscription.\nfunc ExampleOrgService_UpdateEnterprisePricingFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Org.UpdateEnterprisePricingFor(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",
636+
"example": "// UpdateEnterprisePricingFor: Set the enterprise price for an organization.\n// \n// You must be a Zoo admin to perform this request.\n// \n// \n// Parameters\n// \n// \t- `id`: A UUID usually v4 or v7\n// \t- `body`: The price for an enterprise subscription.\n// \n// UpdateEnterprisePricingFor: Set the enterprise price for an organization.\n// You must be a Zoo admin to perform this request.\n//\n// Parameters\n//\n// - `id`: A UUID usually v4 or v7\n// - `body`: The price for an enterprise subscription.\nfunc ExampleOrgService_UpdateEnterprisePricingFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Org.UpdateEnterprisePricingFor(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",
645637
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#OrgService.UpdateEnterprisePricingFor"
646638
},
647639
"op": "add",
@@ -1121,15 +1113,15 @@
11211113
},
11221114
{
11231115
"value": {
1124-
"example": "// GetExtended: Get extended information about a user.\n// \n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// \n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// \n// To get information about any Zoo user, you must be a Zoo employee.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \n// GetExtended: Get extended information about a user.\n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n//\n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n//\n// To get information about any Zoo user, you must be a Zoo employee.\n//\n// Parameters\n//\n// - `id`\nfunc ExampleUserService_GetExtended() {\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.GetExtended(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
1116+
"example": "// GetExtended: Get extended information about a user.\n// \n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// \n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \n// GetExtended: Get extended information about a user.\n// To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n//\n// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n//\n// Parameters\n//\n// - `id`\nfunc ExampleUserService_GetExtended() {\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.GetExtended(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
11251117
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended"
11261118
},
11271119
"op": "add",
11281120
"path": "/paths/~1users-extended~1{id}/get/x-go"
11291121
},
11301122
{
11311123
"value": {
1132-
"example": "// Get: Get a user.\n// \n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// \n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// \n// To get information about any Zoo user, you must be a Zoo employee.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get a user.\n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n//\n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n//\n// To get information about any Zoo user, you must be a Zoo employee.\n//\n// Parameters\n//\n// - `id`\nfunc ExampleUserService_Get() {\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.Get(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
1124+
"example": "// Get: Get a user.\n// \n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n// \n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get a user.\n// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n//\n// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n//\n// Parameters\n//\n// - `id`\nfunc ExampleUserService_Get() {\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.Get(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
11331125
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get"
11341126
},
11351127
"op": "add",

paths.go

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

0 commit comments

Comments
 (0)