Skip to content

Latest commit

 

History

History
103 lines (70 loc) · 3 KB

File metadata and controls

103 lines (70 loc) · 3 KB

dart_sdk.api.ImagesApi

Load the API package

import 'package:dart_sdk/api.dart';

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

Method HTTP request Description
imagesControllerGetImageByPublicId GET /api/images/{publicId} Get image by public id
imagesControllerUploadArrayImages POST /api/images Upload multiple image

imagesControllerGetImageByPublicId

ImageUploadedResponseDTO imagesControllerGetImageByPublicId(publicId)

Get image by public id

Example

import 'package:dart_sdk/api.dart';

final api_instance = ImagesApi();
final publicId = publicId_example; // String | Image public id

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

Parameters

Name Type Description Notes
publicId String Image public id

Return type

ImageUploadedResponseDTO

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]

imagesControllerUploadArrayImages

List imagesControllerUploadArrayImages(images)

Upload multiple image

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 = ImagesApi();
final images = [/path/to/file.txt]; // List<MultipartFile> | 

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

Parameters

Name Type Description Notes
images List [optional]

Return type

List

Authorization

bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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