All Verbs | /RestApi/Sitefinity/Analytics/GetAnalyticsAccounts | ||
---|---|---|---|
All Verbs | /RestApi/GetAnalyticsAccounts |
import 'package:servicestack/servicestack.dart';
class GetAnalyticsAccountsMessage implements IConvertible
{
String? SiteId;
GetAnalyticsAccountsMessage({this.SiteId});
GetAnalyticsAccountsMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SiteId = json['SiteId'];
return this;
}
Map<String, dynamic> toJson() => {
'SiteId': SiteId
};
getTypeName() => "GetAnalyticsAccountsMessage";
TypeContext? context = _ctx;
}
// @DataContract
class AnalyticsAccountInfo implements IGoogleAnalyticsProviderConfiguration, IConvertible
{
// @DataMember(Name="id")
String? id;
// @DataMember(Name="accountId")
String? accountId;
// @DataMember(Name="name")
String? name;
// @DataMember(Name="webPropertyId")
String? webPropertyId;
AnalyticsAccountInfo({this.id,this.accountId,this.name,this.webPropertyId});
AnalyticsAccountInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['Id'];
accountId = json['AccountId'];
name = json['AccountName'];
webPropertyId = json['WebPropertyId'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'accountId': accountId,
'name': name,
'webPropertyId': webPropertyId
};
getTypeName() => "AnalyticsAccountInfo";
TypeContext? context = _ctx;
}
class GetAnalyticsAccountsData implements IConvertible
{
List<AnalyticsAccountInfo>? Accounts;
String? SelectedAccount;
String? SelectedProfileId;
GetAnalyticsAccountsData({this.Accounts,this.SelectedAccount,this.SelectedProfileId});
GetAnalyticsAccountsData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Accounts = JsonConverters.fromJson(json['Accounts'],'List<AnalyticsAccountInfo>',context!);
SelectedAccount = json['SelectedAccount'];
SelectedProfileId = json['SelectedProfileId'];
return this;
}
Map<String, dynamic> toJson() => {
'Accounts': JsonConverters.toJson(Accounts,'List<AnalyticsAccountInfo>',context!),
'SelectedAccount': SelectedAccount,
'SelectedProfileId': SelectedProfileId
};
getTypeName() => "GetAnalyticsAccountsData";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
'GetAnalyticsAccountsMessage': TypeInfo(TypeOf.Class, create:() => GetAnalyticsAccountsMessage()),
'AnalyticsAccountInfo': TypeInfo(TypeOf.Class, create:() => AnalyticsAccountInfo()),
'GetAnalyticsAccountsData': TypeInfo(TypeOf.Class, create:() => GetAnalyticsAccountsData()),
'List<AnalyticsAccountInfo>': TypeInfo(TypeOf.Class, create:() => <AnalyticsAccountInfo>[]),
});
Dart GetAnalyticsAccountsMessage 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.
POST /RestApi/Sitefinity/Analytics/GetAnalyticsAccounts HTTP/1.1
Host: www.asg.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Accounts: [ { id: String, accountId: String, name: String, webPropertyId: String } ], SelectedAccount: String, SelectedProfileId: String }