Required role: | REGISUserRole |
POST | /Grades |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class GradeResponse implements IConvertible
{
ResponseStatus? responseStatus;
int? id;
String? grade_code;
String? grade_name;
double? grade_points;
bool? gpa_credit;
bool? completed_credit;
GradeResponse({this.responseStatus,this.id,this.grade_code,this.grade_name,this.grade_points,this.gpa_credit,this.completed_credit});
GradeResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
id = json['id'];
grade_code = json['grade_code'];
grade_name = json['grade_name'];
grade_points = JsonConverters.toDouble(json['grade_points']);
gpa_credit = json['gpa_credit'];
completed_credit = json['completed_credit'];
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'id': id,
'grade_code': grade_code,
'grade_name': grade_name,
'grade_points': grade_points,
'gpa_credit': gpa_credit,
'completed_credit': completed_credit
};
getTypeName() => "GradeResponse";
TypeContext? context = _ctx;
}
class GradesResponse implements IConvertible
{
ResponseStatus? responseStatus;
List<GradeResponse>? grades;
GradesResponse({this.responseStatus,this.grades});
GradesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
grades = JsonConverters.fromJson(json['grades'],'List<GradeResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
'grades': JsonConverters.toJson(grades,'List<GradeResponse>',context!)
};
getTypeName() => "GradesResponse";
TypeContext? context = _ctx;
}
class GradesRequest implements IConvertible
{
GradesRequest();
GradesRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GradesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'GradeResponse': TypeInfo(TypeOf.Class, create:() => GradeResponse()),
'GradesResponse': TypeInfo(TypeOf.Class, create:() => GradesResponse()),
'List<GradeResponse>': TypeInfo(TypeOf.Class, create:() => <GradeResponse>[]),
'GradesRequest': TypeInfo(TypeOf.Class, create:() => GradesRequest()),
});
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 /Grades HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"grades":[{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"id":0,"grade_code":"String","grade_name":"String","grade_points":0,"gpa_credit":false,"completed_credit":false}]}