Skip to content

Latest commit

 

History

History
246 lines (166 loc) · 6.87 KB

File metadata and controls

246 lines (166 loc) · 6.87 KB

dart_sdk.api.BrandsApi

Load the API package

import 'package:dart_sdk/api.dart';

All URIs are relative to https://api.techcell.cloud

Method HTTP request Description
brandsControllerCreateBrand POST /api/brands
brandsControllerDeleteBrand DELETE /api/brands/{id}
brandsControllerGetBrand GET /api/brands/{id}
brandsControllerGetBrands GET /api/brands
brandsControllerUpdateBrand PATCH /api/brands/{id}

brandsControllerCreateBrand

brandsControllerCreateBrand(createBrandDto)

Example

import 'package:dart_sdk/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = BrandsApi();
final createBrandDto = CreateBrandDto(); // CreateBrandDto | 

try {
    api_instance.brandsControllerCreateBrand(createBrandDto);
} catch (e) {
    print('Exception when calling BrandsApi->brandsControllerCreateBrand: $e\n');
}

Parameters

Name Type Description Notes
createBrandDto CreateBrandDto

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

brandsControllerDeleteBrand

brandsControllerDeleteBrand(id)

Example

import 'package:dart_sdk/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = BrandsApi();
final id = 66164ef6c4165e4833949722; // String | 

try {
    api_instance.brandsControllerDeleteBrand(id);
} catch (e) {
    print('Exception when calling BrandsApi->brandsControllerDeleteBrand: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

brandsControllerGetBrand

Brand brandsControllerGetBrand(id)

Example

import 'package:dart_sdk/api.dart';

final api_instance = BrandsApi();
final id = 66164ef6c4165e4833949722; // String | 

try {
    final result = api_instance.brandsControllerGetBrand(id);
    print(result);
} catch (e) {
    print('Exception when calling BrandsApi->brandsControllerGetBrand: $e\n');
}

Parameters

Name Type Description Notes
id String

Return type

Brand

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

brandsControllerGetBrands

BrandInfinityPaginationResult brandsControllerGetBrands(page, limit, filters, sort)

Example

import 'package:dart_sdk/api.dart';

final api_instance = BrandsApi();
final page = 8.14; // num | 
final limit = 8.14; // num | 
final filters = filters_example; // String | JSON string of FilterBrandsDto
final sort = sort_example; // String | JSON string of SortBrandsDto

try {
    final result = api_instance.brandsControllerGetBrands(page, limit, filters, sort);
    print(result);
} catch (e) {
    print('Exception when calling BrandsApi->brandsControllerGetBrands: $e\n');
}

Parameters

Name Type Description Notes
page num [optional]
limit num [optional]
filters String JSON string of FilterBrandsDto [optional]
sort String JSON string of SortBrandsDto [optional]

Return type

BrandInfinityPaginationResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

brandsControllerUpdateBrand

brandsControllerUpdateBrand(id, updateBrandDto)

Example

import 'package:dart_sdk/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);

final api_instance = BrandsApi();
final id = 66164ef6c4165e4833949722; // String | 
final updateBrandDto = UpdateBrandDto(); // UpdateBrandDto | 

try {
    api_instance.brandsControllerUpdateBrand(id, updateBrandDto);
} catch (e) {
    print('Exception when calling BrandsApi->brandsControllerUpdateBrand: $e\n');
}

Parameters

Name Type Description Notes
id String
updateBrandDto UpdateBrandDto

Return type

void (empty response body)

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]