GET | /v2/{ApiKey}/corp/{ChainId}/clubs | Get Clubs | Get a list of all clubs by ChainID |
---|---|---|---|
GET | /corp/{chainId}/clubs | Get Clubs | Get a list of all clubs by ChainID |
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 GetClubsListRequestDto extends ApiDtoBase implements IConvertible
{
GetClubsListRequestDto();
GetClubsListRequestDto.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "GetClubsListRequestDto";
TypeContext? context = _ctx;
}
enum RestrictedResourceType
{
Store,
Chain,
User,
Undefined,
}
class GetClubsListRequest extends GetClubsListRequestDto 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;
/**
* Corporate Chain ID.
*/
// @ApiMember(DataType="integer", Description="Corporate Chain ID.", IsRequired=true, Name="ChainId", ParameterType="query")
int? ChainId;
int? RestrictedId;
RestrictedResourceType? RestrictedResourceType;
GetClubsListRequest({this.ApiKey,this.ChainId,this.RestrictedId,this.RestrictedResourceType});
GetClubsListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
ApiKey = json['ApiKey'];
ChainId = json['ChainId'];
RestrictedId = json['RestrictedId'];
RestrictedResourceType = JsonConverters.fromJson(json['RestrictedResourceType'],'RestrictedResourceType',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'ApiKey': ApiKey,
'ChainId': ChainId,
'RestrictedId': RestrictedId,
'RestrictedResourceType': JsonConverters.toJson(RestrictedResourceType,'RestrictedResourceType',context!)
});
getTypeName() => "GetClubsListRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'clubready.com', types: <String, TypeInfo> {
'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
'GetClubsListRequestDto': TypeInfo(TypeOf.Class, create:() => GetClubsListRequestDto()),
'RestrictedResourceType': TypeInfo(TypeOf.Enum, enumValues:RestrictedResourceType.values),
'GetClubsListRequest': TypeInfo(TypeOf.Class, create:() => GetClubsListRequest()),
});
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.
GET /v2/{ApiKey}/corp/{ChainId}/clubs HTTP/1.1 Host: clubready.com Accept: application/json