Skip to content

Latest commit

 

History

History
210 lines (144 loc) · 6.97 KB

CategoryAPI.md

File metadata and controls

210 lines (144 loc) · 6.97 KB

CategoryAPI

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

createCategory

    open class func createCategory(category: CategoryModelsWriteCategory, completion: @escaping (_ data: EnvelopeCategoryModelsReadCategory?, _ error: Error?) -> Void)

Create a new category

Example

// 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)
    }
}

Parameters

Name Type Description Notes
category CategoryModelsWriteCategory The category to create.

Return type

EnvelopeCategoryModelsReadCategory

Authorization

apiKey, basicAuth

HTTP request headers

  • 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]

getCategoryById

    open class func getCategoryById(id: Int, completion: @escaping (_ data: EnvelopeCategoryModelsReadCategory?, _ error: Error?) -> Void)

Get a specific category

Example

// 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)
    }
}

Parameters

Name Type Description Notes
id Int The id of the category to get.

Return type

EnvelopeCategoryModelsReadCategory

Authorization

apiKey, basicAuth

HTTP request headers

  • 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]

queryCategories

    open class func queryCategories(query: CategoryModelsCategoryQuery, completion: @escaping (_ data: [CategoryModelsReadCategory]?, _ error: Error?) -> Void)

Query categories

No response envelope.

Example

// 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)
    }
}

Parameters

Name Type Description Notes
query CategoryModelsCategoryQuery The query to filter categories by.

Return type

[CategoryModelsReadCategory]

Authorization

apiKey, basicAuth

HTTP request headers

  • 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]

updateCategory

    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.

Example

// 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)
    }
}

Parameters

Name Type Description Notes
id Int The id of the category to update.
category CategoryModelsWriteCategory The category data to update.

Return type

EnvelopeCategoryModelsReadCategory

Authorization

apiKey, basicAuth

HTTP request headers

  • 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]