tuuli_api/doc/DefaultApi.md
2023-04-24 20:58:26 +07:00

21 KiB

tuuli_api.api.DefaultApi

Load the API package

import 'package:tuuli_api/api.dart';

All URIs are relative to http://localhost

Method HTTP request Description
createItemItemsTableNamePost POST /items/{tableName}/+ Create Item
createTableApiCreateTableTableNamePost POST /api/createTable/{tableName} Create Table
createUserApiUsersPost POST /api/users/+ Create User
deleteItemFromTableItemsTableNamePost POST /items/{tableName}/- Delete Item From Table
dropTableApiDropTableTableNamePost POST /api/dropTable/{tableName} Drop Table
getAccessTokenApiGetAccessTokenPost POST /api/getAccessToken Get Access Token
getAssetAssetsFidGet GET /assets/{fid} Get Asset
getItemsFromTableItemsTableNamePost POST /items/{tableName} Get Items From Table
listTablesApiListTablesGet GET /api/listTables List Tables
putAssetAssetsPost POST /assets/+ Put Asset
removeAssetAssetsAssetIdPost POST /assets/{asset_id}/- Remove Asset
removeUserApiUsersPost POST /api/users/- Remove User
updateAssetDescriptionAssetsAssetIdPost POST /assets/{asset_id}/* Update Asset Description
updateItemInTableItemsTableNamePost POST /items/{tableName}/* Update Item In Table
updateUserApiUsersPost POST /api/users/* Update User

createItemItemsTableNamePost

OkResponse createItemItemsTableNamePost(tableName, body, accessToken)

Create Item

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final JsonObject body = Object; // JsonObject | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.createItemItemsTableNamePost(tableName, body, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->createItemItemsTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
body JsonObject
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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

createTableApiCreateTableTableNamePost

OkResponse createTableApiCreateTableTableNamePost(tableName, requestBody, accessToken)

Create Table

Parameter columns should be a list of strings Each string should be in a following format: column_name:column_type[:column_options] Where column_type should be one of the following: - serial:primary - str - bool - datetime - float - int - int-asset - int-user Also column_options can be one of the following: - unique - default Example: json [ \"id:serial:primary\", \"name:str:unique\", \"description:str\", \"is_active:bool\", \"price:float\", \"quantity:int\", \"creator_id:int-user\", \"asset_id:int-asset\" ] Notes: 1. you cannot use unique and default at the same time 2. in current implementation you cannot use default, because there is no way to specify default value

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final BuiltList<String> requestBody = ; // BuiltList<String> | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.createTableApiCreateTableTableNamePost(tableName, requestBody, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->createTableApiCreateTableTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
requestBody BuiltList<String>
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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

createUserApiUsersPost

OkResponse createUserApiUsersPost(createUserDefinition, accessToken)

Create User

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final CreateUserDefinition createUserDefinition = ; // CreateUserDefinition | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.createUserApiUsersPost(createUserDefinition, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->createUserApiUsersPost: $e\n');
}

Parameters

Name Type Description Notes
createUserDefinition CreateUserDefinition
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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

deleteItemFromTableItemsTableNamePost

OkResponse deleteItemFromTableItemsTableNamePost(tableName, columnConditionCompat, accessToken)

Delete Item From Table

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final BuiltList<ColumnConditionCompat> columnConditionCompat = ; // BuiltList<ColumnConditionCompat> | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.deleteItemFromTableItemsTableNamePost(tableName, columnConditionCompat, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->deleteItemFromTableItemsTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
columnConditionCompat BuiltList<ColumnConditionCompat>
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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

dropTableApiDropTableTableNamePost

OkResponse dropTableApiDropTableTableNamePost(tableName, accessToken)

Drop Table

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.dropTableApiDropTableTableNamePost(tableName, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->dropTableApiDropTableTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
accessToken String [optional]

Return type

OkResponse

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]

getAccessTokenApiGetAccessTokenPost

AccessTokenResponse getAccessTokenApiGetAccessTokenPost(authModel)

Get Access Token

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final AuthModel authModel = ; // AuthModel | 

try {
    final response = api.getAccessTokenApiGetAccessTokenPost(authModel);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->getAccessTokenApiGetAccessTokenPost: $e\n');
}

Parameters

Name Type Description Notes
authModel AuthModel

Return type

AccessTokenResponse

Authorization

No authorization required

HTTP request headers

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

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

getAssetAssetsFidGet

JsonObject getAssetAssetsFidGet(fid)

Get Asset

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String fid = fid_example; // String | 

try {
    final response = api.getAssetAssetsFidGet(fid);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->getAssetAssetsFidGet: $e\n');
}

Parameters

Name Type Description Notes
fid String

Return type

JsonObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/octet-stream

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

getItemsFromTableItemsTableNamePost

BuiltList getItemsFromTableItemsTableNamePost(tableName, accessToken, bodyGetItemsFromTableItemsTableNamePost)

Get Items From Table

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final String accessToken = accessToken_example; // String | 
final BodyGetItemsFromTableItemsTableNamePost bodyGetItemsFromTableItemsTableNamePost = ; // BodyGetItemsFromTableItemsTableNamePost | 

try {
    final response = api.getItemsFromTableItemsTableNamePost(tableName, accessToken, bodyGetItemsFromTableItemsTableNamePost);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->getItemsFromTableItemsTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
accessToken String [optional]
bodyGetItemsFromTableItemsTableNamePost BodyGetItemsFromTableItemsTableNamePost [optional]

Return type

BuiltList<JsonObject>

Authorization

No authorization required

HTTP request headers

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

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

listTablesApiListTablesGet

BuiltList listTablesApiListTablesGet(accessToken)

List Tables

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String accessToken = accessToken_example; // String | 

try {
    final response = api.listTablesApiListTablesGet(accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->listTablesApiListTablesGet: $e\n');
}

Parameters

Name Type Description Notes
accessToken String [optional]

Return type

BuiltList<TableDefinition>

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]

putAssetAssetsPost

CreateAssetResponse putAssetAssetsPost(asset, accessToken)

Put Asset

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final MultipartFile asset = BINARY_DATA_HERE; // MultipartFile | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.putAssetAssetsPost(asset, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->putAssetAssetsPost: $e\n');
}

Parameters

Name Type Description Notes
asset MultipartFile
accessToken String [optional]

Return type

CreateAssetResponse

Authorization

No authorization required

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]

removeAssetAssetsAssetIdPost

OkResponse removeAssetAssetsAssetIdPost(assetId, checkReferences, deleteReferencing, accessToken)

Remove Asset

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final int assetId = 56; // int | 
final bool checkReferences = true; // bool | 
final bool deleteReferencing = true; // bool | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.removeAssetAssetsAssetIdPost(assetId, checkReferences, deleteReferencing, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->removeAssetAssetsAssetIdPost: $e\n');
}

Parameters

Name Type Description Notes
assetId int
checkReferences bool [optional] [default to true]
deleteReferencing bool [optional] [default to false]
accessToken String [optional]

Return type

OkResponse

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]

removeUserApiUsersPost

OkResponse removeUserApiUsersPost(userId, accessToken)

Remove User

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final int userId = 56; // int | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.removeUserApiUsersPost(userId, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->removeUserApiUsersPost: $e\n');
}

Parameters

Name Type Description Notes
userId int
accessToken String [optional]

Return type

OkResponse

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]

updateAssetDescriptionAssetsAssetIdPost

OkResponse updateAssetDescriptionAssetsAssetIdPost(assetId, assetDescription, accessToken)

Update Asset Description

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final int assetId = 56; // int | 
final String assetDescription = assetDescription_example; // String | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.updateAssetDescriptionAssetsAssetIdPost(assetId, assetDescription, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->updateAssetDescriptionAssetsAssetIdPost: $e\n');
}

Parameters

Name Type Description Notes
assetId int
assetDescription String
accessToken String [optional]

Return type

OkResponse

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]

updateItemInTableItemsTableNamePost

OkResponse updateItemInTableItemsTableNamePost(tableName, bodyUpdateItemInTableItemsTableNamePost, accessToken)

Update Item In Table

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final String tableName = tableName_example; // String | 
final BodyUpdateItemInTableItemsTableNamePost bodyUpdateItemInTableItemsTableNamePost = ; // BodyUpdateItemInTableItemsTableNamePost | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.updateItemInTableItemsTableNamePost(tableName, bodyUpdateItemInTableItemsTableNamePost, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->updateItemInTableItemsTableNamePost: $e\n');
}

Parameters

Name Type Description Notes
tableName String
bodyUpdateItemInTableItemsTableNamePost BodyUpdateItemInTableItemsTableNamePost
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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

updateUserApiUsersPost

OkResponse updateUserApiUsersPost(userUpdateDefinition, accessToken)

Update User

Example

import 'package:tuuli_api/api.dart';

final api = TuuliApi().getDefaultApi();
final UserUpdateDefinition userUpdateDefinition = ; // UserUpdateDefinition | 
final String accessToken = accessToken_example; // String | 

try {
    final response = api.updateUserApiUsersPost(userUpdateDefinition, accessToken);
    print(response);
} catch on DioError (e) {
    print('Exception when calling DefaultApi->updateUserApiUsersPost: $e\n');
}

Parameters

Name Type Description Notes
userUpdateDefinition UserUpdateDefinition
accessToken String [optional]

Return type

OkResponse

Authorization

No authorization required

HTTP request headers

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

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