POST,GET | /api/Web/GetHeaderMenu |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
# @Flags()
class Feature(IntEnum):
NONE = 0
STANDARD = 1
BOOKINGS = 2
ROTA = 4
GO_CARDLESS = 8
HOME_SCREEN = 16
E_POS = 32
ATTENDANCE = 64
SALES = 128
PAYMENT_COLLECTIONS = 256
MAIL_CHIMP = 512
MULTI_SITE = 1024
ACCOUNTING_DASHBOARD = 2048
OTHER_DASHBOARDS = 4096
REPORTS = 8192
ADVANCED_ACCOUNTING = 16384
MEMBER_LICENSE_DATES = 32768
FACE_RECOGNITION = 65536
MEMBER_ACCOUNT_CREATION = 131072
AUTOMATION = 262144
FACEBOOK_MARKETING = 524288
GRADES = 1048576
ZOOM_INTEGRATION = 2097152
SALES_TARGET_CHART = 4194304
CUSTOM_APP = 8388608
CUSTOM_ATTRIBUTES_ON_PORTAL = 16777216
NO_EXPORT = 33554432
ENTERPRISE_CLUB_PERFORMANCE_DASHBOARDS = 67108864
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SubHeaderMenuItem:
name: Optional[str] = None
description: Optional[str] = None
url: Optional[str] = None
icon: Optional[str] = None
roles: Optional[List[str]] = None
feature: Optional[Feature] = None
hide_for_c_m_go: Optional[bool] = None
show_feature_unavailable: Optional[bool] = None
has_icon: Optional[bool] = None
has_font_awesome_icon: Optional[bool] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HeaderMenuItem:
name: Optional[str] = None
url: Optional[str] = None
is_current: Optional[bool] = None
feature: Optional[Feature] = None
hide_feature: Optional[bool] = None
roles: Optional[List[str]] = None
sub_header_menu_items: Optional[List[SubHeaderMenuItem]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class HeaderMenu:
header: Optional[str] = None
header_menu_items: Optional[List[HeaderMenuItem]] = None
Python WebService.GetHeaderMenuRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/Web/GetHeaderMenu HTTP/1.1
Host: api.clubmanagercentral.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<WebService.GetHeaderMenuRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Api.Services">
<MemberId>0</MemberId>
<UserId>0</UserId>
</WebService.GetHeaderMenuRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <HeaderMenu xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Interfaces.Models.UI"> <Header>String</Header> <HeaderMenuItems> <HeaderMenuItem> <Feature>None</Feature> <HideFeature>false</HideFeature> <IsCurrent>false</IsCurrent> <Name>String</Name> <Roles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </Roles> <SubHeaderMenuItems> <SubHeaderMenuItem> <Description>String</Description> <Feature>None</Feature> <HideForCMGo>false</HideForCMGo> <Icon>String</Icon> <Name>String</Name> <Roles xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d6p1:string>String</d6p1:string> </Roles> <ShowFeatureUnavailable>false</ShowFeatureUnavailable> <Url>String</Url> </SubHeaderMenuItem> </SubHeaderMenuItems> <Url>String</Url> </HeaderMenuItem> </HeaderMenuItems> </HeaderMenu>