| GET | /RestApi/translations/projects |
|---|
import 'package:servicestack/servicestack.dart';
enum ProjectStatus
{
NotStarted,
Started,
Completed,
}
class GetProjects implements IProjectsFilter, IConvertible
{
int? Skip;
int? Take;
String? OrderExpression;
String? SearchText;
List<String>? Service;
ProjectStatus? ProjectStatus;
String? ActualSourceLanguage;
bool? WithoutSourceLanguage;
GetProjects({this.Skip,this.Take,this.OrderExpression,this.SearchText,this.Service,this.ProjectStatus,this.ActualSourceLanguage,this.WithoutSourceLanguage});
GetProjects.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Skip = json['Skip'];
Take = json['Take'];
OrderExpression = json['OrderExpression'];
SearchText = json['SearchText'];
Service = JsonConverters.fromJson(json['Service'],'List<String>',context!);
ProjectStatus = JsonConverters.fromJson(json['ProjectStatus'],'ProjectStatus',context!);
ActualSourceLanguage = json['ActualSourceLanguage'];
WithoutSourceLanguage = json['WithoutSourceLanguage'];
return this;
}
Map<String, dynamic> toJson() => {
'Skip': Skip,
'Take': Take,
'OrderExpression': OrderExpression,
'SearchText': SearchText,
'Service': JsonConverters.toJson(Service,'List<String>',context!),
'ProjectStatus': JsonConverters.toJson(ProjectStatus,'ProjectStatus',context!),
'ActualSourceLanguage': ActualSourceLanguage,
'WithoutSourceLanguage': WithoutSourceLanguage
};
getTypeName() => "GetProjects";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.imglobal.com', types: <String, TypeInfo> {
'ProjectStatus': TypeInfo(TypeOf.Enum, enumValues:ProjectStatus.values),
'GetProjects': TypeInfo(TypeOf.Class, create:() => GetProjects()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /RestApi/translations/projects HTTP/1.1 Host: www.imglobal.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{Unable to show example output for type 'IList`1' using the custom 'other' filter}Cannot create an instance of an interface.