Skip to content

Commit

Permalink
Update api spec (#105)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
jessfraz and github-actions[bot] authored Sep 29, 2023
1 parent a0275c4 commit 2c2a044
Show file tree
Hide file tree
Showing 6 changed files with 1,685 additions and 5,379 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.27
v0.2.28
44 changes: 2 additions & 42 deletions examples_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 2 additions & 18 deletions kittycad.go.patch.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,6 @@
"op": "add",
"path": "/paths/~1logout/post/x-go"
},
{
"value": {
"example": "// Cmd: Submit one modeling operation.\n// \n// Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.\n// \n// \n// Parameters\n// \n// \t- `body`: A graphics command submitted to the KittyCAD engine via the Modeling API.\n// \n// Cmd: Submit one modeling operation.\n// Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.\n//\n// Parameters\n//\n// - `body`: A graphics command submitted to the KittyCAD engine via the Modeling API.\nfunc ExampleModelingService_Cmd() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Modeling.Cmd(kittycad.ModelingCmdReq{Cmd: \"\", CmdID: 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",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#ModelingService.Cmd"
},
"op": "add",
"path": "/paths/~1modeling~1cmd/post/x-go"
},
{
"value": {
"example": "// CmdBatch: Submit many modeling operations.\n// \n// \n// Parameters\n// \n// \t- `body`: A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.\n// \n// CmdBatch: Submit many modeling operations.\n// Parameters\n//\n// - `body`: A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.\nfunc ExampleModelingService_CmdBatch() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Modeling.CmdBatch(kittycad.ModelingCmdReqBatch{Cmds: map[string]kittycad.ModelingCmdReq{\"example\": kittycad.ModelingCmdReq{Cmd: \"\", CmdID: 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",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#ModelingService.CmdBatch"
},
"op": "add",
"path": "/paths/~1modeling~1cmd-batch/post/x-go"
},
{
"value": {
"example": "// DeviceAuthRequest: Start an OAuth 2.0 Device Authorization Grant.\n// \n// This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.\n// \n// \n// Parameters\n// \n// \t- `body`: The request parameters for the OAuth 2.0 Device Authorization Grant flow.\n// \n// DeviceAuthRequest: Start an OAuth 2.0 Device Authorization Grant.\n// This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted.\n//\n// Parameters\n//\n// - `body`: The request parameters for the OAuth 2.0 Device Authorization Grant flow.\nfunc ExampleOauth2Service_DeviceAuthRequest() {\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.DeviceAuthRequest(kittycad.DeviceAuthRequestForm{ClientID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")}); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n",
Expand Down Expand Up @@ -489,15 +473,15 @@
},
{
"value": {
"example": "// CreateInformationForUser: Create payment info for your user.\n// \n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// CreateInformationForUser: Create payment info for your user.\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_CreateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"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",
"example": "// CreateInformationForUser: Create payment info for your user.\n// \n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// CreateInformationForUser: Create payment info for your user.\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_CreateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"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",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser"
},
"op": "add",
"path": "/paths/~1user~1payment/post/x-go"
},
{
"value": {
"example": "// UpdateInformationForUser: Update payment info for your user.\n// \n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// UpdateInformationForUser: Update payment info for your user.\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_UpdateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"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",
"example": "// UpdateInformationForUser: Update payment info for your user.\n// \n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// UpdateInformationForUser: Update payment info for your user.\n// This includes billing address, phone, and name.\n// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_UpdateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"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",
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser"
},
"op": "add",
Expand Down
102 changes: 0 additions & 102 deletions paths.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2c2a044

Please sign in to comment.