GET | /lookaheadResults | Use to get lookahead response for resourceitems |
---|
import 'package:servicestack/servicestack.dart';
class BasicResourceLibraryRequest implements IConvertible
{
int? resourceLibraryMemberId;
BasicResourceLibraryRequest({this.resourceLibraryMemberId});
BasicResourceLibraryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
resourceLibraryMemberId = json['resourceLibraryMemberId'];
return this;
}
Map<String, dynamic> toJson() => {
'resourceLibraryMemberId': resourceLibraryMemberId
};
getTypeName() => "BasicResourceLibraryRequest";
TypeContext? context = _ctx;
}
class ResourceLookAheadRequest extends BasicResourceLibraryRequest implements IConvertible
{
String? text;
/**
* Set it to true if requesting resources only from digital library
*/
// @ApiMember(Description="Set it to true if requesting resources only from digital library")
bool? digitalFitness;
/**
* Set it to true if requesting resources only from health library
*/
// @ApiMember(Description="Set it to true if requesting resources only from health library")
bool? healthLibrary;
ResourceLookAheadRequest({this.text,this.digitalFitness,this.healthLibrary});
ResourceLookAheadRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
text = json['text'];
digitalFitness = json['digitalFitness'];
healthLibrary = json['healthLibrary'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'text': text,
'digitalFitness': digitalFitness,
'healthLibrary': healthLibrary
});
getTypeName() => "ResourceLookAheadRequest";
TypeContext? context = _ctx;
}
class LookaheadTitle implements IConvertible
{
String? id;
String? title;
String? subtitle;
LookaheadTitle({this.id,this.title,this.subtitle});
LookaheadTitle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
subtitle = json['subtitle'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'subtitle': subtitle
};
getTypeName() => "LookaheadTitle";
TypeContext? context = _ctx;
}
class LookaheadTag implements IConvertible
{
String? id;
String? title;
LookaheadTag({this.id,this.title});
LookaheadTag.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'title': title
};
getTypeName() => "LookaheadTag";
TypeContext? context = _ctx;
}
class LookaheadResult implements IConvertible
{
String? id;
List<LookaheadTitle>? lookaheadTitles;
List<LookaheadTag>? lookaheadTags;
LookaheadResult({this.id,this.lookaheadTitles,this.lookaheadTags});
LookaheadResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
lookaheadTitles = JsonConverters.fromJson(json['lookaheadTitles'],'List<LookaheadTitle>',context!);
lookaheadTags = JsonConverters.fromJson(json['lookaheadTags'],'List<LookaheadTag>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'lookaheadTitles': JsonConverters.toJson(lookaheadTitles,'List<LookaheadTitle>',context!),
'lookaheadTags': JsonConverters.toJson(lookaheadTags,'List<LookaheadTag>',context!)
};
getTypeName() => "LookaheadResult";
TypeContext? context = _ctx;
}
class ResourceLookAheadResponse implements IConvertible
{
LookaheadResult? lookaheadResult;
ResourceLookAheadResponse({this.lookaheadResult});
ResourceLookAheadResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
lookaheadResult = JsonConverters.fromJson(json['lookaheadResult'],'LookaheadResult',context!);
return this;
}
Map<String, dynamic> toJson() => {
'lookaheadResult': JsonConverters.toJson(lookaheadResult,'LookaheadResult',context!)
};
getTypeName() => "ResourceLookAheadResponse";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: <String, TypeInfo> {
'BasicResourceLibraryRequest': TypeInfo(TypeOf.Class, create:() => BasicResourceLibraryRequest()),
'ResourceLookAheadRequest': TypeInfo(TypeOf.Class, create:() => ResourceLookAheadRequest()),
'LookaheadTitle': TypeInfo(TypeOf.Class, create:() => LookaheadTitle()),
'LookaheadTag': TypeInfo(TypeOf.Class, create:() => LookaheadTag()),
'LookaheadResult': TypeInfo(TypeOf.Class, create:() => LookaheadResult()),
'List<LookaheadTitle>': TypeInfo(TypeOf.Class, create:() => <LookaheadTitle>[]),
'List<LookaheadTag>': TypeInfo(TypeOf.Class, create:() => <LookaheadTag>[]),
'ResourceLookAheadResponse': TypeInfo(TypeOf.Class, create:() => ResourceLookAheadResponse()),
});
Dart ResourceLookAheadRequest 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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /lookaheadResults HTTP/1.1 Host: resourcelibrary.api.ashcompanies.com Accept: application/json
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"lookaheadResult":{"id":"String","lookaheadTitles":[{"id":"String","title":"String","subtitle":"String"}],"lookaheadTags":[{"id":"String","title":"String"}]}}