| GET,OPTIONS | /v1/worker/photos/mine |
|---|
import 'package:servicestack/servicestack.dart';
class WorkPhotoRow implements IConvertible
{
int? WorkPhotoID;
int? ContactId;
String? TakerName;
String? RoleKey;
String? TargetType;
String? TargetId;
String? TargetRef;
String? TargetTitle;
String? Kind;
String? Caption;
DateTime? CapturedAtUtc;
double? Lat;
double? Lng;
int? AccuracyM;
int? DistanceM;
bool? InApp;
String? Source;
bool? IsLate;
bool? CountsAsProof;
int? MarkCount;
bool? IssueOpen;
String? IssueClosedBy;
bool? FromGeneral;
String? Url;
String? MarkedUrl;
String? TriageStatus;
String? RouteTo;
String? SuggestType;
String? SuggestId;
String? SuggestTitle;
String? SuggestWhy;
String? FiledType;
String? FiledId;
String? FiledTitle;
String? ReplyText;
String? TriagedBy;
DateTime? TriagedAtUtc;
DateTime? ExpiresAtUtc;
WorkPhotoRow({this.WorkPhotoID,this.ContactId,this.TakerName,this.RoleKey,this.TargetType,this.TargetId,this.TargetRef,this.TargetTitle,this.Kind,this.Caption,this.CapturedAtUtc,this.Lat,this.Lng,this.AccuracyM,this.DistanceM,this.InApp,this.Source,this.IsLate,this.CountsAsProof,this.MarkCount,this.IssueOpen,this.IssueClosedBy,this.FromGeneral,this.Url,this.MarkedUrl,this.TriageStatus,this.RouteTo,this.SuggestType,this.SuggestId,this.SuggestTitle,this.SuggestWhy,this.FiledType,this.FiledId,this.FiledTitle,this.ReplyText,this.TriagedBy,this.TriagedAtUtc,this.ExpiresAtUtc});
WorkPhotoRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkPhotoID = json['WorkPhotoID'];
ContactId = json['ContactId'];
TakerName = json['TakerName'];
RoleKey = json['RoleKey'];
TargetType = json['TargetType'];
TargetId = json['TargetId'];
TargetRef = json['TargetRef'];
TargetTitle = json['TargetTitle'];
Kind = json['Kind'];
Caption = json['Caption'];
CapturedAtUtc = JsonConverters.fromJson(json['CapturedAtUtc'],'DateTime',context!);
Lat = JsonConverters.toDouble(json['Lat']);
Lng = JsonConverters.toDouble(json['Lng']);
AccuracyM = json['AccuracyM'];
DistanceM = json['DistanceM'];
InApp = json['InApp'];
Source = json['Source'];
IsLate = json['IsLate'];
CountsAsProof = json['CountsAsProof'];
MarkCount = json['MarkCount'];
IssueOpen = json['IssueOpen'];
IssueClosedBy = json['IssueClosedBy'];
FromGeneral = json['FromGeneral'];
Url = json['Url'];
MarkedUrl = json['MarkedUrl'];
TriageStatus = json['TriageStatus'];
RouteTo = json['RouteTo'];
SuggestType = json['SuggestType'];
SuggestId = json['SuggestId'];
SuggestTitle = json['SuggestTitle'];
SuggestWhy = json['SuggestWhy'];
FiledType = json['FiledType'];
FiledId = json['FiledId'];
FiledTitle = json['FiledTitle'];
ReplyText = json['ReplyText'];
TriagedBy = json['TriagedBy'];
TriagedAtUtc = JsonConverters.fromJson(json['TriagedAtUtc'],'DateTime',context!);
ExpiresAtUtc = JsonConverters.fromJson(json['ExpiresAtUtc'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'WorkPhotoID': WorkPhotoID,
'ContactId': ContactId,
'TakerName': TakerName,
'RoleKey': RoleKey,
'TargetType': TargetType,
'TargetId': TargetId,
'TargetRef': TargetRef,
'TargetTitle': TargetTitle,
'Kind': Kind,
'Caption': Caption,
'CapturedAtUtc': JsonConverters.toJson(CapturedAtUtc,'DateTime',context!),
'Lat': Lat,
'Lng': Lng,
'AccuracyM': AccuracyM,
'DistanceM': DistanceM,
'InApp': InApp,
'Source': Source,
'IsLate': IsLate,
'CountsAsProof': CountsAsProof,
'MarkCount': MarkCount,
'IssueOpen': IssueOpen,
'IssueClosedBy': IssueClosedBy,
'FromGeneral': FromGeneral,
'Url': Url,
'MarkedUrl': MarkedUrl,
'TriageStatus': TriageStatus,
'RouteTo': RouteTo,
'SuggestType': SuggestType,
'SuggestId': SuggestId,
'SuggestTitle': SuggestTitle,
'SuggestWhy': SuggestWhy,
'FiledType': FiledType,
'FiledId': FiledId,
'FiledTitle': FiledTitle,
'ReplyText': ReplyText,
'TriagedBy': TriagedBy,
'TriagedAtUtc': JsonConverters.toJson(TriagedAtUtc,'DateTime',context!),
'ExpiresAtUtc': JsonConverters.toJson(ExpiresAtUtc,'DateTime',context!)
};
getTypeName() => "WorkPhotoRow";
TypeContext? context = _ctx;
}
class WorkPhotoListResponse implements IConvertible
{
List<WorkPhotoRow>? Photos = [];
ResponseStatus? ResponseStatus;
WorkPhotoListResponse({this.Photos,this.ResponseStatus});
WorkPhotoListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Photos = JsonConverters.fromJson(json['Photos'],'List<WorkPhotoRow>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Photos': JsonConverters.toJson(Photos,'List<WorkPhotoRow>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "WorkPhotoListResponse";
TypeContext? context = _ctx;
}
class MyWorkPhotosRequest implements IConvertible
{
int? Take;
MyWorkPhotosRequest({this.Take});
MyWorkPhotosRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Take = json['Take'];
return this;
}
Map<String, dynamic> toJson() => {
'Take': Take
};
getTypeName() => "MyWorkPhotosRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'WorkPhotoRow': TypeInfo(TypeOf.Class, create:() => WorkPhotoRow()),
'WorkPhotoListResponse': TypeInfo(TypeOf.Class, create:() => WorkPhotoListResponse()),
'List<WorkPhotoRow>': TypeInfo(TypeOf.Class, create:() => <WorkPhotoRow>[]),
'MyWorkPhotosRequest': TypeInfo(TypeOf.Class, create:() => MyWorkPhotosRequest()),
});
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 /v1/worker/photos/mine HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Photos":[{"WorkPhotoID":0,"ContactId":0,"TakerName":"String","RoleKey":"String","TargetType":"String","TargetId":"String","TargetRef":"String","TargetTitle":"String","Kind":"String","Caption":"String","CapturedAtUtc":"0001-01-01T00:00:00.0000000","Lat":0,"Lng":0,"AccuracyM":0,"DistanceM":0,"InApp":false,"Source":"String","IsLate":false,"CountsAsProof":false,"MarkCount":0,"IssueOpen":false,"IssueClosedBy":"String","FromGeneral":false,"Url":"String","MarkedUrl":"String","TriageStatus":"String","RouteTo":"String","SuggestType":"String","SuggestId":"String","SuggestTitle":"String","SuggestWhy":"String","FiledType":"String","FiledId":"String","FiledTitle":"String","ReplyText":"String","TriagedBy":"String","TriagedAtUtc":"0001-01-01T00:00:00.0000000","ExpiresAtUtc":"0001-01-01T00:00:00.0000000"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}