Trackunit API

<back to all web services

GetSessionInfo

The following routes are available for this service:
GET/sessionInfo
GET POST/GetSessionInfo
import 'package:servicestack/servicestack.dart';

// @DataContract
class SessionInfo implements IConvertible
{
    // @DataMember
    String? distanceUoM;

    // @DataMember
    String? speedUoM;

    // @DataMember
    String? temperatureUoM;

    SessionInfo({this.distanceUoM,this.speedUoM,this.temperatureUoM});
    SessionInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        distanceUoM = json['distanceUoM'];
        speedUoM = json['speedUoM'];
        temperatureUoM = json['temperatureUoM'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'distanceUoM': distanceUoM,
        'speedUoM': speedUoM,
        'temperatureUoM': temperatureUoM
    };

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

// @DataContract
class GetSessionInfoResponse implements IConvertible
{
    // @DataMember
    SessionInfo? data;

    // @DataMember
    ResponseStatus? responseStatus;

    GetSessionInfoResponse({this.data,this.responseStatus});
    GetSessionInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'data': JsonConverters.toJson(data,'SessionInfo',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

// @DataContract
class GetSessionInfo implements IConvertible
{
    GetSessionInfo();
    GetSessionInfo.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "GetSessionInfo";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.trackunit.com', types: <String, TypeInfo> {
    'SessionInfo': TypeInfo(TypeOf.Class, create:() => SessionInfo()),
    'GetSessionInfoResponse': TypeInfo(TypeOf.Class, create:() => GetSessionInfoResponse()),
    'GetSessionInfo': TypeInfo(TypeOf.Class, create:() => GetSessionInfo()),
});

Dart GetSessionInfo DTOs

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

HTTP + OTHER

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

POST /GetSessionInfo HTTP/1.1 
Host: api.trackunit.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"data":{"distanceUoM":"String","speedUoM":"String","temperatureUoM":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}