Skip to content

Commit ee10d0b

Browse files
Update api spec (#217)
* 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 32c70e7 commit ee10d0b

File tree

4 files changed

+270
-0
lines changed

4 files changed

+270
-0
lines changed

examples_test.go

Lines changed: 22 additions & 0 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,14 @@
11511151
"op": "add",
11521152
"path": "/paths/~1users~1{id}~1payment~1balance/put/x-go"
11531153
},
1154+
{
1155+
"value": {
1156+
"example": "// UpdateSubscriptionFor: Update a subscription for a user.\n// \n// You must be a Zoo admin to perform this request.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \t- `body`: A struct of Zoo product subscriptions a user can request.\n// \n// UpdateSubscriptionFor: Update a subscription for a user.\n// You must be a Zoo admin to perform this request.\n//\n// Parameters\n//\n// - `id`\n// - `body`: A struct of Zoo product subscriptions a user can request.\nfunc ExampleUserService_UpdateSubscriptionFor() {\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.UpdateSubscriptionFor(\"some-string\", kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: \"\", PayAnnually: true})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n",
1157+
"libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSubscriptionFor"
1158+
},
1159+
"op": "add",
1160+
"path": "/paths/~1users~1{id}~1payment~1subscriptions/put/x-go"
1161+
},
11541162
{
11551163
"value": {
11561164
"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",

paths.go

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

spec.json

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16679,6 +16679,186 @@
1667916679
}
1668016680
}
1668116681
},
16682+
"/users/{id}/payment/subscriptions": {
16683+
"put": {
16684+
"tags": [
16685+
"users",
16686+
"hidden"
16687+
],
16688+
"summary": "Update a subscription for a user.",
16689+
"description": "You must be a Zoo admin to perform this request.",
16690+
"operationId": "update_subscription_for_user",
16691+
"parameters": [
16692+
{
16693+
"in": "path",
16694+
"name": "id",
16695+
"description": "The user's identifier (uuid or email).",
16696+
"required": true,
16697+
"schema": {
16698+
"$ref": "#/components/schemas/UserIdentifier"
16699+
}
16700+
}
16701+
],
16702+
"requestBody": {
16703+
"content": {
16704+
"application/json": {
16705+
"schema": {
16706+
"$ref": "#/components/schemas/ZooProductSubscriptionsUserRequest"
16707+
}
16708+
}
16709+
},
16710+
"required": true
16711+
},
16712+
"responses": {
16713+
"200": {
16714+
"description": "successful operation",
16715+
"headers": {
16716+
"Access-Control-Allow-Credentials": {
16717+
"description": "Access-Control-Allow-Credentials header.",
16718+
"style": "simple",
16719+
"schema": {
16720+
"nullable": true,
16721+
"type": "string"
16722+
}
16723+
},
16724+
"Access-Control-Allow-Headers": {
16725+
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
16726+
"style": "simple",
16727+
"schema": {
16728+
"nullable": true,
16729+
"type": "string"
16730+
}
16731+
},
16732+
"Access-Control-Allow-Methods": {
16733+
"description": "Access-Control-Allow-Methods header.",
16734+
"style": "simple",
16735+
"schema": {
16736+
"nullable": true,
16737+
"type": "string"
16738+
}
16739+
},
16740+
"Access-Control-Allow-Origin": {
16741+
"description": "Access-Control-Allow-Origin header.",
16742+
"style": "simple",
16743+
"schema": {
16744+
"nullable": true,
16745+
"type": "string"
16746+
}
16747+
},
16748+
"Set-Cookie": {
16749+
"description": "Set-Cookie header.",
16750+
"style": "simple",
16751+
"schema": {
16752+
"nullable": true,
16753+
"type": "string"
16754+
}
16755+
},
16756+
"X-Api-Call-Id": {
16757+
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
16758+
"style": "simple",
16759+
"required": true,
16760+
"schema": {
16761+
"type": "string"
16762+
}
16763+
}
16764+
},
16765+
"content": {
16766+
"application/json": {
16767+
"schema": {
16768+
"$ref": "#/components/schemas/ZooProductSubscriptions"
16769+
}
16770+
}
16771+
}
16772+
},
16773+
"4XX": {
16774+
"$ref": "#/components/responses/Error"
16775+
},
16776+
"5XX": {
16777+
"$ref": "#/components/responses/Error"
16778+
}
16779+
}
16780+
},
16781+
"options": {
16782+
"tags": [
16783+
"hidden"
16784+
],
16785+
"summary": "OPTIONS endpoint.",
16786+
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
16787+
"operationId": "options_update_subscription_for_user",
16788+
"parameters": [
16789+
{
16790+
"in": "path",
16791+
"name": "id",
16792+
"description": "The user's identifier (uuid or email).",
16793+
"required": true,
16794+
"schema": {
16795+
"$ref": "#/components/schemas/UserIdentifier"
16796+
}
16797+
}
16798+
],
16799+
"responses": {
16800+
"204": {
16801+
"description": "successful operation, no content",
16802+
"headers": {
16803+
"Access-Control-Allow-Credentials": {
16804+
"description": "Access-Control-Allow-Credentials header.",
16805+
"style": "simple",
16806+
"schema": {
16807+
"nullable": true,
16808+
"type": "string"
16809+
}
16810+
},
16811+
"Access-Control-Allow-Headers": {
16812+
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
16813+
"style": "simple",
16814+
"schema": {
16815+
"nullable": true,
16816+
"type": "string"
16817+
}
16818+
},
16819+
"Access-Control-Allow-Methods": {
16820+
"description": "Access-Control-Allow-Methods header.",
16821+
"style": "simple",
16822+
"schema": {
16823+
"nullable": true,
16824+
"type": "string"
16825+
}
16826+
},
16827+
"Access-Control-Allow-Origin": {
16828+
"description": "Access-Control-Allow-Origin header.",
16829+
"style": "simple",
16830+
"schema": {
16831+
"nullable": true,
16832+
"type": "string"
16833+
}
16834+
},
16835+
"Set-Cookie": {
16836+
"description": "Set-Cookie header.",
16837+
"style": "simple",
16838+
"schema": {
16839+
"nullable": true,
16840+
"type": "string"
16841+
}
16842+
},
16843+
"X-Api-Call-Id": {
16844+
"description": "ID for this request. We return it so that users can report this to us and help us debug their problems.",
16845+
"style": "simple",
16846+
"required": true,
16847+
"schema": {
16848+
"type": "string"
16849+
}
16850+
}
16851+
}
16852+
},
16853+
"4XX": {
16854+
"$ref": "#/components/responses/Error"
16855+
},
16856+
"5XX": {
16857+
"$ref": "#/components/responses/Error"
16858+
}
16859+
}
16860+
}
16861+
},
1668216862
"/website/form": {
1668316863
"put": {
1668416864
"tags": [

0 commit comments

Comments
 (0)