| GET, POST | /cr_photo/{id_cr}/{id_tournee} |
|---|
import 'package:servicestack/servicestack.dart';
class _cr_photo implements IConvertible
{
String? id_cr;
String? id_tournee;
String? num_facture;
int? type;
int? index;
String? path;
String? photo;
String? photo_light;
String? date;
double? latitude;
double? longitude;
_cr_photo({this.id_cr,this.id_tournee,this.num_facture,this.type,this.index,this.path,this.photo,this.photo_light,this.date,this.latitude,this.longitude});
_cr_photo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id_cr = json['id_cr'];
id_tournee = json['id_tournee'];
num_facture = json['num_facture'];
type = json['type'];
index = json['index'];
path = json['path'];
photo = json['photo'];
photo_light = json['photo_light'];
date = json['date'];
latitude = JsonConverters.toDouble(json['latitude']);
longitude = JsonConverters.toDouble(json['longitude']);
return this;
}
Map<String, dynamic> toJson() => {
'id_cr': id_cr,
'id_tournee': id_tournee,
'num_facture': num_facture,
'type': type,
'index': index,
'path': path,
'photo': photo,
'photo_light': photo_light,
'date': date,
'latitude': latitude,
'longitude': longitude
};
getTypeName() => "_cr_photo";
TypeContext? context = _ctx;
}
class cr_photoResponse implements IConvertible
{
String? id_cr;
String? id_tournee;
List<_cr_photo>? multi_photos;
cr_photoResponse({this.id_cr,this.id_tournee,this.multi_photos});
cr_photoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id_cr = json['id_cr'];
id_tournee = json['id_tournee'];
multi_photos = JsonConverters.fromJson(json['multi_photos'],'List<_cr_photo>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id_cr': id_cr,
'id_tournee': id_tournee,
'multi_photos': JsonConverters.toJson(multi_photos,'List<_cr_photo>',context!)
};
getTypeName() => "cr_photoResponse";
TypeContext? context = _ctx;
}
class cr_photoRequest implements IConvertible
{
String? id_cr;
String? id_tournee;
List<_cr_photo>? multi_photos;
cr_photoRequest({this.id_cr,this.id_tournee,this.multi_photos});
cr_photoRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id_cr = json['id_cr'];
id_tournee = json['id_tournee'];
multi_photos = JsonConverters.fromJson(json['multi_photos'],'List<_cr_photo>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id_cr': id_cr,
'id_tournee': id_tournee,
'multi_photos': JsonConverters.toJson(multi_photos,'List<_cr_photo>',context!)
};
getTypeName() => "cr_photoRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'freemotion_staging.milliet.paris', types: <String, TypeInfo> {
'_cr_photo': TypeInfo(TypeOf.Class, create:() => _cr_photo()),
'cr_photoResponse': TypeInfo(TypeOf.Class, create:() => cr_photoResponse()),
'List<_cr_photo>': TypeInfo(TypeOf.Class, create:() => <_cr_photo>[]),
'cr_photoRequest': TypeInfo(TypeOf.Class, create:() => cr_photoRequest()),
});
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.
POST /cr_photo/{id_cr}/{id_tournee} HTTP/1.1
Host: freemotion-staging.milliet.paris
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"id_cr":"String","id_tournee":"String","multi_photos":[{"id_cr":"String","id_tournee":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"id_cr":"String","id_tournee":"String","multi_photos":[{"id_cr":"String","id_tournee":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}