| POST | /v1/groups |
|---|
import 'package:servicestack/servicestack.dart';
// @DataContract
class PostGroupResponse implements IPostGroupResponse, IConvertible
{
// @DataMember(Name="groupId")
int? groupId;
// @DataMember(Name="responseStatus")
ResponseStatus? responseStatus;
PostGroupResponse({this.groupId,this.responseStatus});
PostGroupResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
groupId = json['groupId'];
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'groupId': groupId,
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "PostGroupResponse";
TypeContext? context = _ctx;
}
// @DataContract
class PostGroupRequest implements IConvertible
{
// @DataMember(Name="userAuthId")
// @ApiMember(IsRequired=true, Name="userAuthId")
int? userAuthId;
PostGroupRequest({this.userAuthId});
PostGroupRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
userAuthId = json['userAuthId'];
return this;
}
Map<String, dynamic> toJson() => {
'userAuthId': userAuthId
};
getTypeName() => "PostGroupRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.booklinker.com', types: <String, TypeInfo> {
'PostGroupResponse': TypeInfo(TypeOf.Class, create:() => PostGroupResponse()),
'PostGroupRequest': TypeInfo(TypeOf.Class, create:() => PostGroupRequest()),
});
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 /v1/groups HTTP/1.1
Host: api.booklinker.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"userAuthId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"groupId":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}