All URIs are relative to https://mgmtapi.geins.io
Method | HTTP request | Description |
---|---|---|
createCategory | POST /API/Category | Create a new category |
getCategoryById | GET /API/Category/{id} | Get a specific category |
queryCategories | POST /API/Category/Query | Query categories |
updateCategory | PUT /API/Category/{id} | Update a category |
open class func createCategory(category: CategoryModelsWriteCategory, completion: @escaping (_ data: EnvelopeCategoryModelsReadCategory?, _ error: Error?) -> Void)
Create a new category
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let category = Category.Models.Write.Category(parentCategoryId: 123, names: [Shared.Models.LocalizableContent(languageCode: "languageCode_example", content: "content_example")], descriptions: [nil]) // CategoryModelsWriteCategory | The category to create.
// Create a new category
CategoryAPI.createCategory(category: category) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
category | CategoryModelsWriteCategory | The category to create. |
EnvelopeCategoryModelsReadCategory
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getCategoryById(id: Int, completion: @escaping (_ data: EnvelopeCategoryModelsReadCategory?, _ error: Error?) -> Void)
Get a specific category
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let id = 987 // Int | The id of the category to get.
// Get a specific category
CategoryAPI.getCategoryById(id: id) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | The id of the category to get. |
EnvelopeCategoryModelsReadCategory
- Content-Type: Not defined
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func queryCategories(query: CategoryModelsCategoryQuery, completion: @escaping (_ data: [CategoryModelsReadCategory]?, _ error: Error?) -> Void)
Query categories
No response envelope.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let query = Category.Models.CategoryQuery(createdAfter: Date(), categoryIds: [123]) // CategoryModelsCategoryQuery | The query to filter categories by.
// Query categories
CategoryAPI.queryCategories(query: query) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
query | CategoryModelsCategoryQuery | The query to filter categories by. |
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func updateCategory(id: Int, category: CategoryModelsWriteCategory, completion: @escaping (_ data: EnvelopeCategoryModelsReadCategory?, _ error: Error?) -> Void)
Update a category
Leaving out a property will ensure no changes are made to that property. Collection properties will delete and/or add as necessary to match the supplied data.
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient
let id = 987 // Int | The id of the category to update.
let category = Category.Models.Write.Category(parentCategoryId: 123, names: [Shared.Models.LocalizableContent(languageCode: "languageCode_example", content: "content_example")], descriptions: [nil]) // CategoryModelsWriteCategory | The category data to update.
// Update a category
CategoryAPI.updateCategory(id: id, category: category) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | Int | The id of the category to update. | |
category | CategoryModelsWriteCategory | The category data to update. |
EnvelopeCategoryModelsReadCategory
- Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]