BokaMera.API.Host

<back to all web services

ApiVersionCompabilityQuery

The following routes are available for this service:
GET/version/compabilityGet information about if your current version is compability with the api verisonReturns information about which version of the API is currently running and when it was built.
import 'package:servicestack/servicestack.dart';

class ApiVersionCompabilityQueryResponse implements IConvertible
{
    /**
    * The latest version number
    */
    String? CurrentVersion;
    /**
    * Your version number
    */
    String? YourVersion;
    /**
    * Any compatible error message
    */
    String? Message;
    /**
    * If your version is compatible with the current version
    */
    bool? Compatible;
    /**
    * If the changes are blocking for use and you need to upgrade to later version
    */
    bool? BlockingChanges;
    ResponseStatus? ResponseStatus;

    ApiVersionCompabilityQueryResponse({this.CurrentVersion,this.YourVersion,this.Message,this.Compatible,this.BlockingChanges,this.ResponseStatus});
    ApiVersionCompabilityQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CurrentVersion = json['CurrentVersion'];
        YourVersion = json['YourVersion'];
        Message = json['Message'];
        Compatible = json['Compatible'];
        BlockingChanges = json['BlockingChanges'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CurrentVersion': CurrentVersion,
        'YourVersion': YourVersion,
        'Message': Message,
        'Compatible': Compatible,
        'BlockingChanges': BlockingChanges,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

enum VersionIdentifier
{
    BokaMeraiOS,
    BokaMeraAdminiOS,
    BokaMeraAndroid,
    BokaMeraAdminAndroid,
}

class ApiVersionCompabilityQuery implements IConvertible
{
    /**
    * The identifier for your application.
    */
    // @ApiMember(Description="The identifier for your application.", IsRequired=true, ParameterType="query")
    VersionIdentifier? Identifier;

    /**
    * The version you are running and you want to check
    */
    // @ApiMember(Description="The version you are running and you want to check", IsRequired=true, ParameterType="query")
    String? Version;

    ApiVersionCompabilityQuery({this.Identifier,this.Version});
    ApiVersionCompabilityQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'ApiVersionCompabilityQueryResponse': TypeInfo(TypeOf.Class, create:() => ApiVersionCompabilityQueryResponse()),
    'VersionIdentifier': TypeInfo(TypeOf.Enum, enumValues:VersionIdentifier.values),
    'ApiVersionCompabilityQuery': TypeInfo(TypeOf.Class, create:() => ApiVersionCompabilityQuery()),
});

Dart ApiVersionCompabilityQuery DTOs

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

HTTP + XML

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

GET /version/compability HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ApiVersionCompabilityQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BlockingChanges>false</BlockingChanges>
  <Compatible>false</Compatible>
  <CurrentVersion>String</CurrentVersion>
  <Message>String</Message>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <YourVersion>String</YourVersion>
</ApiVersionCompabilityQueryResponse>