Skip to content

Latest commit

 

History

History
457 lines (308 loc) · 13.5 KB

MobileApi.md

File metadata and controls

457 lines (308 loc) · 13.5 KB

swagger.api.MobileApi

Load the API package

import 'package:swagger/api.dart';

All URIs are relative to https://localhost

Method HTTP request Description
createForm POST /mobile/forms_post Add a form
createSection POST /mobile/sections_post Add a form
deleteForm DELETE /mobile/form/{uri} Delete form
deleteSection DELETE /mobile/delete_section/{uri} Delete section
importCSVCodes POST /mobile/import Import a CSV file containing parent and child code-lots
searchForms GET /mobile/form_get Search forms
searchSections GET /mobile/section_get Search sections
updateForm PUT /mobile/form_put Update form
updateSection PUT /mobile/section_put Update section

createForm

ObjectUriResponse createForm(authorization, body, acceptLanguage)

Add a form

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var body = new FormCreationDTO(); // FormCreationDTO | Form to save
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.createForm(authorization, body, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->createForm: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body FormCreationDTO Form to save [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]

createSection

ObjectUriResponse createSection(authorization, body, acceptLanguage)

Add a form

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var body = new SectionCreationDTO(); // SectionCreationDTO | Section to save
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.createSection(authorization, body, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->createSection: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body SectionCreationDTO Section to save [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]

deleteForm

ObjectUriResponse deleteForm(uri, authorization, acceptLanguage)

Delete form

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var uri = uri_example; // String | CodeLot URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.deleteForm(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->deleteForm: $e\n");
}

Parameters

Name Type Description Notes
uri String CodeLot URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]

deleteSection

ObjectUriResponse deleteSection(uri, authorization, acceptLanguage)

Delete section

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var uri = uri_example; // String | Section URI
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.deleteSection(uri, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->deleteSection: $e\n");
}

Parameters

Name Type Description Notes
uri String Section URI
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]

importCSVCodes

CodeLotCSVValidationDTO importCSVCodes(file, authorization, acceptLanguage)

Import a CSV file containing parent and child code-lots

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var file = /path/to/file.txt; // MultipartFile | File
var authorization = authorization_example; // String | Authentication token
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.importCSVCodes(file, authorization, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->importCSVCodes: $e\n");
}

Parameters

Name Type Description Notes
file MultipartFile File
authorization String Authentication token
acceptLanguage String Request accepted language [optional]

Return type

CodeLotCSVValidationDTO

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]

searchForms

List searchForms(authorization, uris, orderBy, page, pageSize, acceptLanguage)

Search forms

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var uris = []; // List<String> | Search by uris
var orderBy = ["date=desc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.searchForms(authorization, uris, orderBy, page, pageSize, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->searchForms: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
uris List<String> Search by uris [optional]
orderBy List<String> List of fields to sort as an array of fieldName=asc desc
page int Page number [optional] [default to 0]
pageSize int Page size [optional] [default to 20]
acceptLanguage String Request accepted language [optional]

Return type

List

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]

searchSections

List searchSections(authorization, uris, orderBy, page, pageSize, acceptLanguage)

Search sections

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var uris = []; // List<String> | Search by uris
var orderBy = ["date=desc"]; // List<String> | List of fields to sort as an array of fieldName=asc|desc
var page = 0; // int | Page number
var pageSize = 20; // int | Page size
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.searchSections(authorization, uris, orderBy, page, pageSize, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->searchSections: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
uris List<String> Search by uris [optional]
orderBy List<String> List of fields to sort as an array of fieldName=asc desc
page int Page number [optional] [default to 0]
pageSize int Page size [optional] [default to 20]
acceptLanguage String Request accepted language [optional]

Return type

List

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]

updateForm

ObjectUriResponse updateForm(authorization, body, acceptLanguage)

Update form

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var body = new FormUpdateDTO(); // FormUpdateDTO | Form description
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.updateForm(authorization, body, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->updateForm: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body FormUpdateDTO Form description [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]

updateSection

ObjectUriResponse updateSection(authorization, body, acceptLanguage)

Update section

Example

import 'package:swagger/api.dart';

var api_instance = new MobileApi();
var authorization = authorization_example; // String | Authentication token
var body = new SectionUpdateDTO(); // SectionUpdateDTO | Section description
var acceptLanguage = "en"; // String | Request accepted language

try { 
    var result = api_instance.updateSection(authorization, body, acceptLanguage);
    print(result);
} catch (e) {
    print("Exception when calling MobileApi->updateSection: $e\n");
}

Parameters

Name Type Description Notes
authorization String Authentication token
body SectionUpdateDTO Section description [optional]
acceptLanguage String Request accepted language [optional]

Return type

ObjectUriResponse

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]