Skip to content

Commit 5416e19

Browse files
Update api spec (#207)
* 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 5a3d053 commit 5416e19

File tree

5 files changed

+1794
-696
lines changed

5 files changed

+1794
-696
lines changed

examples_test.go

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

kittycad.go.patch.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@
809809
},
810810
{
811811
"value": {
812-
"example": "// UpdateSelf: Update your user.\n// \n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The user-modifiable parts of a User.\n// \n// UpdateSelf: Update your user.\n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n//\n// Parameters\n//\n// - `body`: The user-modifiable parts of a User.\nfunc ExampleUserService_UpdateSelf() {\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.UpdateSelf(kittycad.UpdateUser{Company: \"some-string\", Discord: \"some-string\", FirstName: \"some-string\", Github: \"some-string\", Image: kittycad.URL{\u0026url.URL{Scheme: \"https\", Host: \"example.com\"}}, LastName: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
812+
"example": "// UpdateSelf: Update your user.\n// \n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The user-modifiable parts of a User.\n// \n// UpdateSelf: Update your user.\n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n//\n// Parameters\n//\n// - `body`: The user-modifiable parts of a User.\nfunc ExampleUserService_UpdateSelf() {\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.UpdateSelf(kittycad.UpdateUser{Company: \"some-string\", Discord: \"some-string\", FirstName: \"some-string\", Github: \"some-string\", Image: kittycad.URL{\u0026url.URL{Scheme: \"https\", Host: \"example.com\"}}, IsOnboarded: true, LastName: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
813813
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf"
814814
},
815815
"op": "add",
@@ -863,6 +863,14 @@
863863
"op": "add",
864864
"path": "/paths/~1user~1api-tokens~1{token}/get/x-go"
865865
},
866+
{
867+
"value": {
868+
"example": "// PatchCrm: Update properties in the CRM\n// \n// \n// Parameters\n// \n// \t- `body`: The data for subscribing a user to the newsletter.\n// \n// PatchCrm: Update properties in the CRM\n// Parameters\n//\n// - `body`: The data for subscribing a user to the newsletter.\nfunc ExampleUserService_PatchCrm() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.PatchCrm(kittycad.CrmData{CadIndustry: \"some-string\", CadUserCount: \"some-string\", CadUserType: \"some-string\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
869+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.PatchCrm"
870+
},
871+
"op": "add",
872+
"path": "/paths/~1user~1crm/patch/x-go"
873+
},
866874
{
867875
"value": {
868876
"example": "// GetSelfExtended: Get extended information about your user.\n// \n// Get the user information for the authenticated user.\n// \n// Alternatively, you can also use the `/users-extended/me` endpoint.\n// \n// GetSelfExtended: Get extended information about your user.\n// Get the user information for the authenticated user.\n//\n// Alternatively, you can also use the `/users-extended/me` endpoint.\nfunc ExampleUserService_GetSelfExtended() {\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.GetSelfExtended()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
@@ -871,6 +879,14 @@
871879
"op": "add",
872880
"path": "/paths/~1user~1extended/get/x-go"
873881
},
882+
{
883+
"value": {
884+
"example": "// PutFormSelf: Create a new support/sales ticket from the website contact form. This endpoint is authenticated.\n// \n// It gets attached to the user's account.\n// \n// \n// Parameters\n// \n// \t- `body`: The form for a public inquiry submission.\n// \n// PutFormSelf: Create a new support/sales ticket from the website contact form. This endpoint is authenticated.\n// It gets attached to the user's account.\n//\n// Parameters\n//\n// - `body`: The form for a public inquiry submission.\nfunc ExampleUserService_PutFormSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.PutFormSelf(kittycad.InquiryForm{Company: \"some-string\", Email: \"[email protected]\", FirstName: \"some-string\", Industry: \"some-string\", InquiryType: \"\", LastName: \"some-string\", Message: \"some-string\", Phone: \"some-string\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
885+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.PutFormSelf"
886+
},
887+
"op": "add",
888+
"path": "/paths/~1user~1form/put/x-go"
889+
},
874890
{
875891
"value": {
876892
"example": "// GetOauth2ProvidersFor: Get the OAuth2 providers for your user.\n// \n// If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.\n// \n// This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.\n// \n// GetOauth2ProvidersFor: Get the OAuth2 providers for your user.\n// If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.\n//\n// This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.\nfunc ExampleUserService_GetOauth2ProvidersFor() {\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.GetOauth2ProvidersFor()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
@@ -1143,6 +1159,22 @@
11431159
"op": "add",
11441160
"path": "/paths/~1users~1{id}~1payment~1balance/put/x-go"
11451161
},
1162+
{
1163+
"value": {
1164+
"example": "// PutPublicForm: Creates a new support/sales ticket from the website contact form. This endpoint is for untrusted\n// \n// users and is not authenticated.\n// \n// \n// Parameters\n// \n// \t- `body`: The form for a public inquiry submission.\n// \n// PutPublicForm: Creates a new support/sales ticket from the website contact form. This endpoint is for untrusted\n// users and is not authenticated.\n//\n// Parameters\n//\n// - `body`: The form for a public inquiry submission.\nfunc ExampleUserService_PutPublicForm() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.PutPublicForm(kittycad.InquiryForm{Company: \"some-string\", Email: \"[email protected]\", FirstName: \"some-string\", Industry: \"some-string\", InquiryType: \"\", LastName: \"some-string\", Message: \"some-string\", Phone: \"some-string\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
1165+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.PutPublicForm"
1166+
},
1167+
"op": "add",
1168+
"path": "/paths/~1website~1form/put/x-go"
1169+
},
1170+
{
1171+
"value": {
1172+
"example": "// PutPublicSubscribe: Subscribes a user to the newsletter.\n// \n// \n// Parameters\n// \n// \t- `body`: The data for subscribing a user to the newsletter.\n// \n// PutPublicSubscribe: Subscribes a user to the newsletter.\n// Parameters\n//\n// - `body`: The data for subscribing a user to the newsletter.\nfunc ExampleUserService_PutPublicSubscribe() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.PutPublicSubscribe(kittycad.Subscribe{Email: \"[email protected]\"}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
1173+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.PutPublicSubscribe"
1174+
},
1175+
"op": "add",
1176+
"path": "/paths/~1website~1subscribe/put/x-go"
1177+
},
11461178
{
11471179
"value": {
11481180
"example": "// CreateTerm: Create a terminal.\n// \n// Attach to a docker container to create an interactive terminal.\n// \n// CreateTerm: Create a terminal.\n// Attach to a docker container to create an interactive terminal.\nfunc ExampleExecutorService_CreateTerm() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Create the websocket connection.\n\tws, err := client.Executor.CreateTerm()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tdefer ws.Close()\n\n\tdone := make(chan struct{})\n\n\tgo func() {\n\t\tdefer close(done)\n\t\tfor {\n\t\t\t_, message, err := ws.ReadMessage()\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"read:\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tlog.Printf(\"recv: %s\", message)\n\t\t}\n\t}()\n\n\tticker := time.NewTicker(time.Second)\n\tdefer ticker.Stop()\n\n\tinterrupt := make(chan os.Signal, 1)\n\tsignal.Notify(interrupt, os.Interrupt)\n\n\tfor {\n\t\tselect {\n\t\tcase \u003c-done:\n\t\t\treturn\n\t\tcase t := \u003c-ticker.C:\n\t\t\terr := ws.WriteMessage(websocket.TextMessage, []byte(t.String()))\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"write:\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\tcase \u003c-interrupt:\n\t\t\tlog.Println(\"interrupt\")\n\n\t\t\t// Cleanly close the connection by sending a close message and then\n\t\t\t// waiting (with timeout) for the server to close the connection.\n\t\t\terr := ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, \"\"))\n\t\t\tif err != nil {\n\t\t\t\tlog.Println(\"write close:\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tselect {\n\t\t\tcase \u003c-done:\n\t\t\tcase \u003c-time.After(time.Second):\n\t\t\t}\n\t\t\treturn\n\t\t}\n\t}\n\n}\n",

paths.go

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

0 commit comments

Comments
 (0)