PUT | /resourceProgress | Use to save progress of a resource. |
---|
import 'package:servicestack/servicestack.dart';
class ResourceItemProgressResponse implements IConvertible
{
int? memberResourceProgressID;
ResourceItemProgressResponse({this.memberResourceProgressID});
ResourceItemProgressResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
memberResourceProgressID = json['memberResourceProgressID'];
return this;
}
Map<String, dynamic> toJson() => {
'memberResourceProgressID': memberResourceProgressID
};
getTypeName() => "ResourceItemProgressResponse";
TypeContext? context = _ctx;
}
class ResourceItemProgressRequest implements IConvertible
{
int? memberId;
String? resourceId;
int? percentageCompleted;
bool? isCompleted;
ResourceItemProgressRequest({this.memberId,this.resourceId,this.percentageCompleted,this.isCompleted});
ResourceItemProgressRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
memberId = json['memberId'];
resourceId = json['resourceId'];
percentageCompleted = json['percentageCompleted'];
isCompleted = json['isCompleted'];
return this;
}
Map<String, dynamic> toJson() => {
'memberId': memberId,
'resourceId': resourceId,
'percentageCompleted': percentageCompleted,
'isCompleted': isCompleted
};
getTypeName() => "ResourceItemProgressRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'resourcelibrary.api.ashcompanies.com', types: <String, TypeInfo> {
'ResourceItemProgressResponse': TypeInfo(TypeOf.Class, create:() => ResourceItemProgressResponse()),
'ResourceItemProgressRequest': TypeInfo(TypeOf.Class, create:() => ResourceItemProgressRequest()),
});
Dart ResourceItemProgressRequest 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.
PUT /resourceProgress HTTP/1.1
Host: resourcelibrary.api.ashcompanies.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"memberId":0,"resourceId":"String","percentageCompleted":0,"isCompleted":false}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"memberResourceProgressID":0}