ClubReady Api

<back to all web services

GetClassScheduleRequestV2

The following routes are available for this service:
GET/v2/{Apikey}/club/{StoreID}/classscheduleGet Class ScheduleSpecify 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,
}

class GetClassScheduleRequestV2 extends GetClassScheduleRequestDto implements IRestrictedApiRequest, IConvertible
{
    String? ApiKey;
    int? StoreId;
    DateTime? FromDate;
    DateTime? ToDate;
    /**
    *  Id of CategoryNames to filter results by
    */
    // @ApiMember(DataType="integer", Description=" Id of CategoryNames to filter results by", Name="FilterByCategoryId", ParameterType="query")
    int? FilterByCategoryId;

    int? RestrictedId;
    RestrictedResourceType? RestrictedResourceType;

    GetClassScheduleRequestV2({this.ApiKey,this.StoreId,this.FromDate,this.ToDate,this.FilterByCategoryId,this.RestrictedId,this.RestrictedResourceType});
    GetClassScheduleRequestV2.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() => "GetClassScheduleRequestV2";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'GetClassScheduleRequestDto': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequestDto()),
    'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
    'GetClassScheduleRequestV2': TypeInfo(TypeOf.Class, create:() => GetClassScheduleRequestV2()),
});

Dart GetClassScheduleRequestV2 DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v2/{Apikey}/club/{StoreID}/classschedule HTTP/1.1 
Host: www.clubready.com 
Accept: text/csv