GET | /scheduling/class-schedule | Get Class Schedule | Specify ToDate/FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today. |
---|---|---|---|
GET | /v2/{Apikey}/club/{StoreID}/classschedule | (obsolete) Get Class Schedule | Specify ToDate/FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today. |
import 'package:servicestack/servicestack.dart';
class ApiDtoBase implements IConvertible
{
String? ApiKey;
int? StoreId;
int? ChainId;
ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
ChainId = json['ChainId'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiKey': ApiKey,
'StoreId': StoreId,
'ChainId': ChainId
};
getTypeName() => "ApiDtoBase";
TypeContext? context = _ctx;
}
class GetClassScheduleRequestDto extends ApiDtoBase implements IConvertible
{
DateTime? FromDate;
DateTime? ToDate;
int? FilterByCategoryId;
GetClassScheduleRequestDto({this.FromDate,this.ToDate,this.FilterByCategoryId});
GetClassScheduleRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
FilterByCategoryId = json['FilterByCategoryId'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
'FilterByCategoryId': FilterByCategoryId
});
getTypeName() => "GetClassScheduleRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
/**
* Get a list of classes for a locations. Specify ToDate / FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today.
*/
// @Api(Description="Get a list of classes for a locations. Specify ToDate / FromDate (max 7 days) to get a list of classes within a date range. Omitting dates will retrieve classes for today.")
class GetClassScheduleRequest extends GetClassScheduleRequestDto implements IRestrictedApiRequest, IConvertible
{
/**
* Api Key - grants access to resources
*/
// @ApiMember(DataType="string", Description="Api Key - grants access to resources", IsRequired=true, Name="ApiKey", ParameterType="query")
String? ApiKey;
/**
* StoreID
*/
// @ApiMember(DataType="integer", Description="StoreID", IsRequired=true, Name="StoreID", ParameterType="query")
int? StoreId;
/**
* From Date (if blank, defaults to today; format: YYYY-MM-DD)
*/
// @ApiMember(DataType="date", Description="From Date (if blank, defaults to today; format: YYYY-MM-DD)", Name="FromDate", ParameterType="query")
DateTime? FromDate;
/**
* To Date (max 7 days; format: YYYY-MM-DD)
*/
// @ApiMember(DataType="date", Description="To Date (max 7 days; format: YYYY-MM-DD)", IsRequired=true, Name="ToDate", ParameterType="query")
DateTime? ToDate;
/**
* Id of Category Names to filter results by
*/
// @ApiMember(DataType="int", Description="Id of Category Names to filter results by", Name="FilterByCategoryId", ParameterType="query")
int? FilterByCategoryId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
GetClassScheduleRequest({this.ApiKey,this.StoreId,this.FromDate,this.ToDate,this.FilterByCategoryId,this.RestrictedId,this.RestrictedResourceType});
GetClassScheduleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
StoreId = json['StoreId'];
FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
FilterByCategoryId = json['FilterByCategoryId'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'StoreId': StoreId,
'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!),
'FilterByCategoryId': FilterByCategoryId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "GetClassScheduleRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'GetClassScheduleRequestDto': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'GetClassScheduleRequest': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequest()),
});
Dart GetClassScheduleRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /scheduling/class-schedule HTTP/1.1 Host: clubready.com Accept: text/jsv