| GET | /recherche/{mode}/{search} |
|---|
import 'package:servicestack/servicestack.dart';
class _recherche implements IConvertible
{
int? id;
String? libelle;
String? barcode;
int? barcode_match;
_recherche({this.id,this.libelle,this.barcode,this.barcode_match});
_recherche.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
libelle = json['libelle'];
barcode = json['barcode'];
barcode_match = json['barcode_match'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'libelle': libelle,
'barcode': barcode,
'barcode_match': barcode_match
};
getTypeName() => "_recherche";
TypeContext? context = _ctx;
}
class rechercheResponse implements IConvertible
{
String? mode;
String? search;
List<_recherche>? results;
rechercheResponse({this.mode,this.search,this.results});
rechercheResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
mode = json['mode'];
search = json['search'];
results = JsonConverters.fromJson(json['results'],'List<_recherche>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'mode': mode,
'search': search,
'results': JsonConverters.toJson(results,'List<_recherche>',context!)
};
getTypeName() => "rechercheResponse";
TypeContext? context = _ctx;
}
class rechercheRequest implements IConvertible
{
String? mode;
String? search;
rechercheRequest({this.mode,this.search});
rechercheRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
mode = json['mode'];
search = json['search'];
return this;
}
Map<String, dynamic> toJson() => {
'mode': mode,
'search': search
};
getTypeName() => "rechercheRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'freemotion_staging.milliet.paris', types: <String, TypeInfo> {
'_recherche': TypeInfo(TypeOf.Class, create:() => _recherche()),
'rechercheResponse': TypeInfo(TypeOf.Class, create:() => rechercheResponse()),
'List<_recherche>': TypeInfo(TypeOf.Class, create:() => <_recherche>[]),
'rechercheRequest': TypeInfo(TypeOf.Class, create:() => rechercheRequest()),
});
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 /recherche/{mode}/{search} HTTP/1.1
Host: freemotion-staging.milliet.paris
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"mode":"String","search":"String","results":[{"id":0,"libelle":"String","barcode":"String","barcode_match":0}]}