Class ThemesClient
- Namespace
- Auth0.ManagementApi.Branding
- Assembly
- Auth0.ManagementApi.dll
public class ThemesClient : IThemesClient
- Inheritance
-
ThemesClient
- Implements
- Inherited Members
- Extension Methods
Methods
CreateAsync(CreateBrandingThemeRequestContent, RequestOptions?, CancellationToken)
Create branding theme.
public WithRawResponseTask<CreateBrandingThemeResponseContent> CreateAsync(CreateBrandingThemeRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
requestCreateBrandingThemeRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Branding.Themes.CreateAsync(
new CreateBrandingThemeRequestContent
{
Borders = new BrandingThemeBorders
{
ButtonBorderRadius = 1.1,
ButtonBorderWeight = 1.1,
ButtonsStyle = BrandingThemeBordersButtonsStyleEnum.Pill,
InputBorderRadius = 1.1,
InputBorderWeight = 1.1,
InputsStyle = BrandingThemeBordersInputsStyleEnum.Pill,
ShowWidgetShadow = true,
WidgetBorderWeight = 1.1,
WidgetCornerRadius = 1.1,
},
Colors = new BrandingThemeColors
{
BodyText = "body_text",
Error = "error",
Header = "header",
Icons = "icons",
InputBackground = "input_background",
InputBorder = "input_border",
InputFilledText = "input_filled_text",
InputLabelsPlaceholders = "input_labels_placeholders",
LinksFocusedComponents = "links_focused_components",
PrimaryButton = "primary_button",
PrimaryButtonLabel = "primary_button_label",
SecondaryButtonBorder = "secondary_button_border",
SecondaryButtonLabel = "secondary_button_label",
Success = "success",
WidgetBackground = "widget_background",
WidgetBorder = "widget_border",
},
Fonts = new BrandingThemeFonts
{
BodyText = new BrandingThemeFontBodyText { Bold = true, Size = 1.1 },
ButtonsText = new BrandingThemeFontButtonsText { Bold = true, Size = 1.1 },
FontUrl = "font_url",
InputLabels = new BrandingThemeFontInputLabels { Bold = true, Size = 1.1 },
Links = new BrandingThemeFontLinks { Bold = true, Size = 1.1 },
LinksStyle = BrandingThemeFontLinksStyleEnum.Normal,
ReferenceTextSize = 1.1,
Subtitle = new BrandingThemeFontSubtitle { Bold = true, Size = 1.1 },
Title = new BrandingThemeFontTitle { Bold = true, Size = 1.1 },
},
PageBackground = new BrandingThemePageBackground
{
BackgroundColor = "background_color",
BackgroundImageUrl = "background_image_url",
PageLayout = BrandingThemePageBackgroundPageLayoutEnum.Center,
},
Widget = new BrandingThemeWidget
{
HeaderTextAlignment = BrandingThemeWidgetHeaderTextAlignmentEnum.Center,
LogoHeight = 1.1,
LogoPosition = BrandingThemeWidgetLogoPositionEnum.Center,
LogoUrl = "logo_url",
SocialButtonsLayout = BrandingThemeWidgetSocialButtonsLayoutEnum.Bottom,
},
}
);
DeleteAsync(string, RequestOptions?, CancellationToken)
Delete branding theme.
public Task DeleteAsync(string themeId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
themeIdstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Branding.Themes.DeleteAsync("themeId");
GetAsync(string, RequestOptions?, CancellationToken)
Retrieve branding theme.
public WithRawResponseTask<GetBrandingThemeResponseContent> GetAsync(string themeId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
themeIdstringoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Branding.Themes.GetAsync("themeId");
GetDefaultAsync(RequestOptions?, CancellationToken)
Retrieve default branding theme.
public WithRawResponseTask<GetBrandingDefaultThemeResponseContent> GetDefaultAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
optionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Branding.Themes.GetDefaultAsync();
UpdateAsync(string, UpdateBrandingThemeRequestContent, RequestOptions?, CancellationToken)
Update branding theme.
public WithRawResponseTask<UpdateBrandingThemeResponseContent> UpdateAsync(string themeId, UpdateBrandingThemeRequestContent request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
themeIdstringrequestUpdateBrandingThemeRequestContentoptionsRequestOptionscancellationTokenCancellationToken
Returns
Examples
await client.Branding.Themes.UpdateAsync(
"themeId",
new UpdateBrandingThemeRequestContent
{
Borders = new BrandingThemeBorders
{
ButtonBorderRadius = 1.1,
ButtonBorderWeight = 1.1,
ButtonsStyle = BrandingThemeBordersButtonsStyleEnum.Pill,
InputBorderRadius = 1.1,
InputBorderWeight = 1.1,
InputsStyle = BrandingThemeBordersInputsStyleEnum.Pill,
ShowWidgetShadow = true,
WidgetBorderWeight = 1.1,
WidgetCornerRadius = 1.1,
},
Colors = new BrandingThemeColors
{
BodyText = "body_text",
Error = "error",
Header = "header",
Icons = "icons",
InputBackground = "input_background",
InputBorder = "input_border",
InputFilledText = "input_filled_text",
InputLabelsPlaceholders = "input_labels_placeholders",
LinksFocusedComponents = "links_focused_components",
PrimaryButton = "primary_button",
PrimaryButtonLabel = "primary_button_label",
SecondaryButtonBorder = "secondary_button_border",
SecondaryButtonLabel = "secondary_button_label",
Success = "success",
WidgetBackground = "widget_background",
WidgetBorder = "widget_border",
},
Fonts = new BrandingThemeFonts
{
BodyText = new BrandingThemeFontBodyText { Bold = true, Size = 1.1 },
ButtonsText = new BrandingThemeFontButtonsText { Bold = true, Size = 1.1 },
FontUrl = "font_url",
InputLabels = new BrandingThemeFontInputLabels { Bold = true, Size = 1.1 },
Links = new BrandingThemeFontLinks { Bold = true, Size = 1.1 },
LinksStyle = BrandingThemeFontLinksStyleEnum.Normal,
ReferenceTextSize = 1.1,
Subtitle = new BrandingThemeFontSubtitle { Bold = true, Size = 1.1 },
Title = new BrandingThemeFontTitle { Bold = true, Size = 1.1 },
},
PageBackground = new BrandingThemePageBackground
{
BackgroundColor = "background_color",
BackgroundImageUrl = "background_image_url",
PageLayout = BrandingThemePageBackgroundPageLayoutEnum.Center,
},
Widget = new BrandingThemeWidget
{
HeaderTextAlignment = BrandingThemeWidgetHeaderTextAlignmentEnum.Center,
LogoHeight = 1.1,
LogoPosition = BrandingThemeWidgetLogoPositionEnum.Center,
LogoUrl = "logo_url",
SocialButtonsLayout = BrandingThemeWidgetSocialButtonsLayoutEnum.Bottom,
},
}
);