POST,GET | /api/Web/GetHeaderMenu |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubManager.Interfaces.Models.UI;
using ClubManager.Interfaces.Models.Branch;
namespace ClubManager.Interfaces.Models.Branch
{
[Flags]
public enum Feature
{
None = 0,
Standard = 1,
Bookings = 2,
Rota = 4,
GoCardless = 8,
HomeScreen = 16,
EPos = 32,
Attendance = 64,
Sales = 128,
PaymentCollections = 256,
MailChimp = 512,
MultiSite = 1024,
AccountingDashboard = 2048,
OtherDashboards = 4096,
Reports = 8192,
AdvancedAccounting = 16384,
MemberLicenseDates = 32768,
FaceRecognition = 65536,
MemberAccountCreation = 131072,
Automation = 262144,
FacebookMarketing = 524288,
Grades = 1048576,
ZoomIntegration = 2097152,
SalesTargetChart = 4194304,
CustomApp = 8388608,
CustomAttributesOnPortal = 16777216,
NoExport = 33554432,
EnterpriseClubPerformanceDashboards = 67108864,
}
}
namespace ClubManager.Interfaces.Models.UI
{
public partial class HeaderMenu
{
public HeaderMenu()
{
HeaderMenuItems = new List<HeaderMenuItem>{};
}
public virtual string Header { get; set; }
public virtual List<HeaderMenuItem> HeaderMenuItems { get; set; }
}
public partial class HeaderMenuItem
{
public HeaderMenuItem()
{
Roles = new string[]{};
SubHeaderMenuItems = new List<SubHeaderMenuItem>{};
}
public virtual string Name { get; set; }
public virtual string Url { get; set; }
public virtual bool IsCurrent { get; set; }
public virtual Feature? Feature { get; set; }
public virtual bool HideFeature { get; set; }
public virtual string[] Roles { get; set; }
public virtual List<SubHeaderMenuItem> SubHeaderMenuItems { get; set; }
}
public partial class SubHeaderMenuItem
{
public SubHeaderMenuItem()
{
Roles = new string[]{};
}
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual string Url { get; set; }
public virtual string Icon { get; set; }
public virtual string[] Roles { get; set; }
public virtual Feature? Feature { get; set; }
public virtual bool? HideForCMGo { get; set; }
public virtual bool ShowFeatureUnavailable { get; set; }
public virtual bool HasIcon { get; set; }
public virtual bool HasFontAwesomeIcon { get; set; }
}
}
C# 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>