GET | /homepage/settings | Get the homepage settings for the company |
---|
import 'package:servicestack/servicestack.dart';
class HomepageTemplateResponse implements IConvertible
{
/**
* The template id
*/
// @ApiMember(Description="The template id")
int? Id;
/**
* The template name
*/
// @ApiMember(Description="The template name")
String? Name;
/**
* The template description
*/
// @ApiMember(Description="The template description")
String? Description;
/**
* The template image url
*/
// @ApiMember(Description="The template image url")
Uri? ImageUrl;
HomepageTemplateResponse({this.Id,this.Name,this.Description,this.ImageUrl});
HomepageTemplateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!)
};
getTypeName() => "HomepageTemplateResponse";
TypeContext? context = _ctx;
}
class HomepageHeroSectionStyleResponse implements IConvertible
{
/**
* The hero section style id
*/
// @ApiMember(Description="The hero section style id")
int? Id;
/**
* The hero section style name
*/
// @ApiMember(Description="The hero section style name")
String? Name;
/**
* The hero section style description
*/
// @ApiMember(Description="The hero section style description")
String? Description;
HomepageHeroSectionStyleResponse({this.Id,this.Name,this.Description});
HomepageHeroSectionStyleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description
};
getTypeName() => "HomepageHeroSectionStyleResponse";
TypeContext? context = _ctx;
}
class HomepageSettingsQueryResponse implements IConvertible
{
/**
* The company id
*/
// @ApiMember(Description="The company id")
String? CompanyId;
/**
* The text for homepage heading
*/
// @ApiMember(Description="The text for homepage heading")
String? HomepageHeading;
/**
* The text for homepage startpage heading
*/
// @ApiMember(Description="The text for homepage startpage heading")
String? WelcomePageHeading;
/**
* The text for homepage startpage body
*/
// @ApiMember(Description="The text for homepage startpage body")
String? WelcomePageBody;
/**
* The text for homepage about us page heading
*/
// @ApiMember(Description="The text for homepage about us page heading")
String? AboutUsPageHeading;
/**
* The text for homepage about us page body
*/
// @ApiMember(Description="The text for homepage about us page body")
String? AboutUsPageBody;
/**
* The startpage image url
*/
// @ApiMember(Description="The startpage image url")
Uri? ImageUrl;
/**
* The template for the homepage
*/
// @ApiMember(Description="The template for the homepage")
int? HomePageTemplateId;
/**
* The hero section style for the homepage
*/
// @ApiMember(Description="The hero section style for the homepage")
int? HeroSectionStyleId;
/**
* Show rating on the page
*/
// @ApiMember(Description="Show rating on the page")
bool? ShowRating;
/**
* Enable the BokaMera Homepage
*/
// @ApiMember(Description="Enable the BokaMera Homepage")
bool? EnableHomepage;
/**
* Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.
*/
// @ApiMember(DataType="datetime", Description="Will show when the homepage settings was created, note it will only be shown if your logged in as admin for the company.")
DateTime? Updated;
/**
* Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.
*/
// @ApiMember(DataType="datetime", Description="Will show when the homepage settings was updated, note it will only be shown if your logged in as admin for the company.")
DateTime? Created;
/**
* The homepage templates options to select from
*/
// @ApiMember(DataType="boolean", Description="The homepage templates options to select from", ParameterType="query")
List<HomepageTemplateResponse>? HomePageTemplateOptions;
/**
* The homepage hero section style options to select from
*/
// @ApiMember(DataType="boolean", Description="The homepage hero section style options to select from", ParameterType="query")
List<HomepageHeroSectionStyleResponse>? HomepageHeroSectionStyleOptions;
HomepageSettingsQueryResponse({this.CompanyId,this.HomepageHeading,this.WelcomePageHeading,this.WelcomePageBody,this.AboutUsPageHeading,this.AboutUsPageBody,this.ImageUrl,this.HomePageTemplateId,this.HeroSectionStyleId,this.ShowRating,this.EnableHomepage,this.Updated,this.Created,this.HomePageTemplateOptions,this.HomepageHeroSectionStyleOptions});
HomepageSettingsQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
HomepageHeading = json['HomepageHeading'];
WelcomePageHeading = json['WelcomePageHeading'];
WelcomePageBody = json['WelcomePageBody'];
AboutUsPageHeading = json['AboutUsPageHeading'];
AboutUsPageBody = json['AboutUsPageBody'];
ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
HomePageTemplateId = json['HomePageTemplateId'];
HeroSectionStyleId = json['HeroSectionStyleId'];
ShowRating = json['ShowRating'];
EnableHomepage = json['EnableHomepage'];
Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
HomePageTemplateOptions = JsonConverters.fromJson(json['HomePageTemplateOptions'],'List<HomepageTemplateResponse>',context!);
HomepageHeroSectionStyleOptions = JsonConverters.fromJson(json['HomepageHeroSectionStyleOptions'],'List<HomepageHeroSectionStyleResponse>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'HomepageHeading': HomepageHeading,
'WelcomePageHeading': WelcomePageHeading,
'WelcomePageBody': WelcomePageBody,
'AboutUsPageHeading': AboutUsPageHeading,
'AboutUsPageBody': AboutUsPageBody,
'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!),
'HomePageTemplateId': HomePageTemplateId,
'HeroSectionStyleId': HeroSectionStyleId,
'ShowRating': ShowRating,
'EnableHomepage': EnableHomepage,
'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'HomePageTemplateOptions': JsonConverters.toJson(HomePageTemplateOptions,'List<HomepageTemplateResponse>',context!),
'HomepageHeroSectionStyleOptions': JsonConverters.toJson(HomepageHeroSectionStyleOptions,'List<HomepageHeroSectionStyleResponse>',context!)
};
getTypeName() => "HomepageSettingsQueryResponse";
TypeContext? context = _ctx;
}
class HomepageSettingsQuery implements ICompany, ICompanyRequest, IConvertible
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.", ParameterType="path")
String? CompanyId;
/**
* If you want to include the homepage template options to select from
*/
// @ApiMember(DataType="boolean", Description="If you want to include the homepage template options to select from", ParameterType="query")
bool? IncludeHomePageTemplateOptions;
/**
* If you want to include the homepage hero section style options to select from
*/
// @ApiMember(DataType="boolean", Description="If you want to include the homepage hero section style options to select from", ParameterType="query")
bool? IncludeHomePageHeroSectionStyleOptions;
/**
* The homeage sitepath.
*/
// @ApiMember(Description="The homeage sitepath.")
String? SitePath;
HomepageSettingsQuery({this.CompanyId,this.IncludeHomePageTemplateOptions,this.IncludeHomePageHeroSectionStyleOptions,this.SitePath});
HomepageSettingsQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
IncludeHomePageTemplateOptions = json['IncludeHomePageTemplateOptions'];
IncludeHomePageHeroSectionStyleOptions = json['IncludeHomePageHeroSectionStyleOptions'];
SitePath = json['SitePath'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'IncludeHomePageTemplateOptions': IncludeHomePageTemplateOptions,
'IncludeHomePageHeroSectionStyleOptions': IncludeHomePageHeroSectionStyleOptions,
'SitePath': SitePath
};
getTypeName() => "HomepageSettingsQuery";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'HomepageTemplateResponse': TypeInfo(TypeOf.Class, create:() => HomepageTemplateResponse()),
'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
'HomepageHeroSectionStyleResponse': TypeInfo(TypeOf.Class, create:() => HomepageHeroSectionStyleResponse()),
'HomepageSettingsQueryResponse': TypeInfo(TypeOf.Class, create:() => HomepageSettingsQueryResponse()),
'List<HomepageTemplateResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageTemplateResponse>[]),
'List<HomepageHeroSectionStyleResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageHeroSectionStyleResponse>[]),
'HomepageSettingsQuery': TypeInfo(TypeOf.Class, create:() => HomepageSettingsQuery()),
});
Dart HomepageSettingsQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /homepage/settings HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { HomepageHeading: String, WelcomePageHeading: String, WelcomePageBody: String, AboutUsPageHeading: String, AboutUsPageBody: String, HomePageTemplateId: 0, HeroSectionStyleId: 0, ShowRating: False, EnableHomepage: False, Updated: "0001-01-01T00:00:00", Created: "0001-01-01T00:00:00", HomePageTemplateOptions: [ { Id: 0, Name: String, Description: String } ], HomepageHeroSectionStyleOptions: [ { Id: 0, Name: String, Description: String } ] }