All URIs are relative to https://api.facestore.local/v1
Method | HTTP request | Description |
---|---|---|
AddCategories | POST /categories | |
DeleteCategoryById | DELETE /categories/{id}/ | |
GetCategories | GET /categories | |
GetCategoryById | GET /categories/{id}/ | |
UpdateCategoryById | PUT /categories/{id}/ |
InlineResponse2011 AddCategories (Category category)
Creates a new category in the store.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class AddCategoriesExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new CategoriesApi();
var category = new Category(); // Category | Category to add to the store
try
{
InlineResponse2011 result = apiInstance.AddCategories(category);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CategoriesApi.AddCategories: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
category | Category | Category to add to the store |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteCategoryById (long? id)
deletes a single category based on the ID supplied
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class DeleteCategoryByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new CategoriesApi();
var id = 789; // long? | ID of category to delete
try
{
apiInstance.DeleteCategoryById(id);
}
catch (Exception e)
{
Debug.Print("Exception when calling CategoriesApi.DeleteCategoryById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? | ID of category to delete |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2001 GetCategories (List includes, int? limit, List orderBy)
Returns all categories from the system that the user has access to ### Includes You can give the following values on includes parameter: routes, products
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class GetCategoriesExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new CategoriesApi();
var includes = new List<string>(); // List<string> | Include associated objects within response (optional)
var limit = 56; // int? | max records to return (optional)
var orderBy = new List<string>(); // List<string> | Specify the field to be sorted, examples: - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc` (optional)
try
{
InlineResponse2001 result = apiInstance.GetCategories(includes, limit, orderBy);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CategoriesApi.GetCategories: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
includes | List | Include associated objects within response | [optional] |
limit | int? | max records to return | [optional] |
orderBy | List | Specify the field to be sorted, examples: - `?order_by=id | desc` - `?order_by=updated_at |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2011 GetCategoryById (long? id, List includes, int? limit)
Returns a category based on a single ID ### Includes You can give the following values on includes parameter: routes, products
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class GetCategoryByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new CategoriesApi();
var id = 789; // long? | ID of category to fetch
var includes = new List<string>(); // List<string> | Include associated objects within response (optional)
var limit = 56; // int? | max records to return (optional)
try
{
InlineResponse2011 result = apiInstance.GetCategoryById(id, includes, limit);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CategoriesApi.GetCategoryById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? | ID of category to fetch | |
includes | List | Include associated objects within response | [optional] |
limit | int? | max records to return | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateCategoryById (long? id, Object category)
update a single category based on the ID supplied
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UpdateCategoryByIdExample
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");
var apiInstance = new CategoriesApi();
var id = 789; // long? | ID of category to update
var category = ; // Object | Category to update in store
try
{
apiInstance.UpdateCategoryById(id, category);
}
catch (Exception e)
{
Debug.Print("Exception when calling CategoriesApi.UpdateCategoryById: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | long? | ID of category to update | |
category | Object | Category to update in store |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]