ScannerVision Web Server

<back to all web services

PostQuestion

Requires Authentication
The following routes are available for this service:
POST/{Brand}/question/{TemplateGuid}/{QuestionGuid}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

enum Brand
{
    Desktop,
    Hp,
    Kyocera,
    NeaScan,
    Samsung,
    FujiXerox,
    Ta,
    Utax,
    Epson,
    ScanFront400,
    Sharp,
    Ricoh,
    FujiFilm,
}

class DtoBase implements IConvertible
{
    Brand? Brand;

    DtoBase({this.Brand});
    DtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Brand = JsonConverters.fromJson(json['Brand'],'Brand',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Brand': JsonConverters.toJson(Brand,'Brand',context!)
    };

    getTypeName() => "DtoBase";
    TypeContext? context = _ctx;
}

class RequestBase extends DtoBase implements IConvertible
{
    RequestBase();
    RequestBase.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "RequestBase";
    TypeContext? context = _ctx;
}

class QuestionRequestDto extends RequestBase implements IConvertible
{
    String? TemplateGuid;
    String? QuestionGuid;
    String? Parent;
    String? FolderBrowser;

    QuestionRequestDto({this.TemplateGuid,this.QuestionGuid,this.Parent,this.FolderBrowser});
    QuestionRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        TemplateGuid = json['TemplateGuid'];
        QuestionGuid = json['QuestionGuid'];
        Parent = json['Parent'];
        FolderBrowser = json['FolderBrowser'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'TemplateGuid': TemplateGuid,
        'QuestionGuid': QuestionGuid,
        'Parent': Parent,
        'FolderBrowser': FolderBrowser
    });

    getTypeName() => "QuestionRequestDto";
    TypeContext? context = _ctx;
}

class PostQuestion extends QuestionRequestDto implements IConvertible
{
    String? QuestionValueReturned;
    String? QuestionValueDisplayed;
    String? SelectedFolder;

    PostQuestion({this.QuestionValueReturned,this.QuestionValueDisplayed,this.SelectedFolder});
    PostQuestion.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        QuestionValueReturned = json['QuestionValueReturned'];
        QuestionValueDisplayed = json['QuestionValueDisplayed'];
        SelectedFolder = json['SelectedFolder'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'QuestionValueReturned': QuestionValueReturned,
        'QuestionValueDisplayed': QuestionValueDisplayed,
        'SelectedFolder': SelectedFolder
    });

    getTypeName() => "PostQuestion";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'buildmax.org', types: <String, TypeInfo> {
    'Brand': TypeInfo(TypeOf.Enum, enumValues:Brand.values),
    'DtoBase': TypeInfo(TypeOf.Class, create:() => DtoBase()),
    'RequestBase': TypeInfo(TypeOf.Class, create:() => RequestBase()),
    'QuestionRequestDto': TypeInfo(TypeOf.Class, create:() => QuestionRequestDto()),
    'PostQuestion': TypeInfo(TypeOf.Class, create:() => PostQuestion()),
});

Dart PostQuestion DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Brand}/question/{TemplateGuid}/{QuestionGuid} HTTP/1.1 
Host: buildmax.org 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"QuestionValueReturned":"String","QuestionValueDisplayed":"String","SelectedFolder":"String","TemplateGuid":"String","QuestionGuid":"String","Parent":"String","FolderBrowser":"String","Brand":"Desktop"}