TechStacks!

<back to all web services

GetOrganizationAdmin

Organization
Requires Authentication
The following routes are available for this service:
GET/orgs/{Id}/admin
import 'package:servicestack/servicestack.dart';

class OrganizationLabel implements IConvertible
{
    String? slug;
    int? organizationId;
    String? description;
    String? color;

    OrganizationLabel({this.slug,this.organizationId,this.description,this.color});
    OrganizationLabel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        slug = json['slug'];
        organizationId = json['organizationId'];
        description = json['description'];
        color = json['color'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'slug': slug,
        'organizationId': organizationId,
        'description': description,
        'color': color
    };

    getTypeName() => "OrganizationLabel";
    TypeContext? context = _ctx;
}

class OrganizationMember implements IConvertible
{
    int? id;
    int? organizationId;
    int? userId;
    String? userName;
    bool? isOwner;
    bool? isModerator;
    bool? denyAll;
    bool? denyPosts;
    bool? denyComments;
    String? notes;

    OrganizationMember({this.id,this.organizationId,this.userId,this.userName,this.isOwner,this.isModerator,this.denyAll,this.denyPosts,this.denyComments,this.notes});
    OrganizationMember.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        organizationId = json['organizationId'];
        userId = json['userId'];
        userName = json['userName'];
        isOwner = json['isOwner'];
        isModerator = json['isModerator'];
        denyAll = json['denyAll'];
        denyPosts = json['denyPosts'];
        denyComments = json['denyComments'];
        notes = json['notes'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'organizationId': organizationId,
        'userId': userId,
        'userName': userName,
        'isOwner': isOwner,
        'isModerator': isModerator,
        'denyAll': denyAll,
        'denyPosts': denyPosts,
        'denyComments': denyComments,
        'notes': notes
    };

    getTypeName() => "OrganizationMember";
    TypeContext? context = _ctx;
}

class OrganizationMemberInvite implements IConvertible
{
    int? id;
    int? organizationId;
    int? userId;
    String? userName;
    DateTime? dismissed;

    OrganizationMemberInvite({this.id,this.organizationId,this.userId,this.userName,this.dismissed});
    OrganizationMemberInvite.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        organizationId = json['organizationId'];
        userId = json['userId'];
        userName = json['userName'];
        dismissed = JsonConverters.fromJson(json['dismissed'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'organizationId': organizationId,
        'userId': userId,
        'userName': userName,
        'dismissed': JsonConverters.toJson(dismissed,'DateTime',context!)
    };

    getTypeName() => "OrganizationMemberInvite";
    TypeContext? context = _ctx;
}

enum FlagType
{
    Violation,
    Spam,
    Abusive,
    Confidential,
    OffTopic,
    Other,
}

class PostReportInfo implements IConvertible
{
    int? id;
    int? organizationId;
    int? postId;
    int? userId;
    String? userName;
    FlagType? flagType;
    String? reportNotes;
    DateTime? created;
    DateTime? acknowledged;
    String? acknowledgedBy;
    DateTime? dismissed;
    String? dismissedBy;
    String? title;
    int? reportCount;
    String? createdBy;

    PostReportInfo({this.id,this.organizationId,this.postId,this.userId,this.userName,this.flagType,this.reportNotes,this.created,this.acknowledged,this.acknowledgedBy,this.dismissed,this.dismissedBy,this.title,this.reportCount,this.createdBy});
    PostReportInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        organizationId = json['organizationId'];
        postId = json['postId'];
        userId = json['userId'];
        userName = json['userName'];
        flagType = JsonConverters.fromJson(json['flagType'],'FlagType',context!);
        reportNotes = json['reportNotes'];
        created = JsonConverters.fromJson(json['created'],'DateTime',context!);
        acknowledged = JsonConverters.fromJson(json['acknowledged'],'DateTime',context!);
        acknowledgedBy = json['acknowledgedBy'];
        dismissed = JsonConverters.fromJson(json['dismissed'],'DateTime',context!);
        dismissedBy = json['dismissedBy'];
        title = json['title'];
        reportCount = json['reportCount'];
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'organizationId': organizationId,
        'postId': postId,
        'userId': userId,
        'userName': userName,
        'flagType': JsonConverters.toJson(flagType,'FlagType',context!),
        'reportNotes': reportNotes,
        'created': JsonConverters.toJson(created,'DateTime',context!),
        'acknowledged': JsonConverters.toJson(acknowledged,'DateTime',context!),
        'acknowledgedBy': acknowledgedBy,
        'dismissed': JsonConverters.toJson(dismissed,'DateTime',context!),
        'dismissedBy': dismissedBy,
        'title': title,
        'reportCount': reportCount,
        'createdBy': createdBy
    };

    getTypeName() => "PostReportInfo";
    TypeContext? context = _ctx;
}

class PostCommentReportInfo implements IConvertible
{
    int? id;
    int? organizationId;
    int? postId;
    int? postCommentId;
    int? userId;
    String? userName;
    FlagType? flagType;
    String? reportNotes;
    DateTime? created;
    DateTime? acknowledged;
    String? acknowledgedBy;
    DateTime? dismissed;
    String? dismissedBy;
    String? contentHtml;
    int? reportCount;
    String? createdBy;

    PostCommentReportInfo({this.id,this.organizationId,this.postId,this.postCommentId,this.userId,this.userName,this.flagType,this.reportNotes,this.created,this.acknowledged,this.acknowledgedBy,this.dismissed,this.dismissedBy,this.contentHtml,this.reportCount,this.createdBy});
    PostCommentReportInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        organizationId = json['organizationId'];
        postId = json['postId'];
        postCommentId = json['postCommentId'];
        userId = json['userId'];
        userName = json['userName'];
        flagType = JsonConverters.fromJson(json['flagType'],'FlagType',context!);
        reportNotes = json['reportNotes'];
        created = JsonConverters.fromJson(json['created'],'DateTime',context!);
        acknowledged = JsonConverters.fromJson(json['acknowledged'],'DateTime',context!);
        acknowledgedBy = json['acknowledgedBy'];
        dismissed = JsonConverters.fromJson(json['dismissed'],'DateTime',context!);
        dismissedBy = json['dismissedBy'];
        contentHtml = json['contentHtml'];
        reportCount = json['reportCount'];
        createdBy = json['createdBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'organizationId': organizationId,
        'postId': postId,
        'postCommentId': postCommentId,
        'userId': userId,
        'userName': userName,
        'flagType': JsonConverters.toJson(flagType,'FlagType',context!),
        'reportNotes': reportNotes,
        'created': JsonConverters.toJson(created,'DateTime',context!),
        'acknowledged': JsonConverters.toJson(acknowledged,'DateTime',context!),
        'acknowledgedBy': acknowledgedBy,
        'dismissed': JsonConverters.toJson(dismissed,'DateTime',context!),
        'dismissedBy': dismissedBy,
        'contentHtml': contentHtml,
        'reportCount': reportCount,
        'createdBy': createdBy
    };

    getTypeName() => "PostCommentReportInfo";
    TypeContext? context = _ctx;
}

class GetOrganizationAdminResponse implements IConvertible
{
    List<OrganizationLabel>? labels;
    List<OrganizationMember>? members;
    List<OrganizationMemberInvite>? memberInvites;
    List<PostReportInfo>? reportedPosts;
    List<PostCommentReportInfo>? reportedPostComments;
    ResponseStatus? responseStatus;

    GetOrganizationAdminResponse({this.labels,this.members,this.memberInvites,this.reportedPosts,this.reportedPostComments,this.responseStatus});
    GetOrganizationAdminResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        labels = JsonConverters.fromJson(json['labels'],'List<OrganizationLabel>',context!);
        members = JsonConverters.fromJson(json['members'],'List<OrganizationMember>',context!);
        memberInvites = JsonConverters.fromJson(json['memberInvites'],'List<OrganizationMemberInvite>',context!);
        reportedPosts = JsonConverters.fromJson(json['reportedPosts'],'List<PostReportInfo>',context!);
        reportedPostComments = JsonConverters.fromJson(json['reportedPostComments'],'List<PostCommentReportInfo>',context!);
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'labels': JsonConverters.toJson(labels,'List<OrganizationLabel>',context!),
        'members': JsonConverters.toJson(members,'List<OrganizationMember>',context!),
        'memberInvites': JsonConverters.toJson(memberInvites,'List<OrganizationMemberInvite>',context!),
        'reportedPosts': JsonConverters.toJson(reportedPosts,'List<PostReportInfo>',context!),
        'reportedPostComments': JsonConverters.toJson(reportedPostComments,'List<PostCommentReportInfo>',context!),
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "GetOrganizationAdminResponse";
    TypeContext? context = _ctx;
}

class GetOrganizationAdmin implements IGet, IConvertible
{
    int? id;

    GetOrganizationAdmin({this.id});
    GetOrganizationAdmin.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id
    };

    getTypeName() => "GetOrganizationAdmin";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
    'OrganizationLabel': TypeInfo(TypeOf.Class, create:() => OrganizationLabel()),
    'OrganizationMember': TypeInfo(TypeOf.Class, create:() => OrganizationMember()),
    'OrganizationMemberInvite': TypeInfo(TypeOf.Class, create:() => OrganizationMemberInvite()),
    'FlagType': TypeInfo(TypeOf.Enum, enumValues:FlagType.values),
    'PostReportInfo': TypeInfo(TypeOf.Class, create:() => PostReportInfo()),
    'PostCommentReportInfo': TypeInfo(TypeOf.Class, create:() => PostCommentReportInfo()),
    'GetOrganizationAdminResponse': TypeInfo(TypeOf.Class, create:() => GetOrganizationAdminResponse()),
    'List<OrganizationLabel>': TypeInfo(TypeOf.Class, create:() => <OrganizationLabel>[]),
    'List<OrganizationMember>': TypeInfo(TypeOf.Class, create:() => <OrganizationMember>[]),
    'List<OrganizationMemberInvite>': TypeInfo(TypeOf.Class, create:() => <OrganizationMemberInvite>[]),
    'List<PostReportInfo>': TypeInfo(TypeOf.Class, create:() => <PostReportInfo>[]),
    'List<PostCommentReportInfo>': TypeInfo(TypeOf.Class, create:() => <PostCommentReportInfo>[]),
    'GetOrganizationAdmin': TypeInfo(TypeOf.Class, create:() => GetOrganizationAdmin()),
});

Dart GetOrganizationAdmin DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /orgs/{Id}/admin HTTP/1.1 
Host: techstacks.io 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetOrganizationAdminResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel">
  <Labels xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationLabel>
      <d2p1:Color>String</d2p1:Color>
      <d2p1:Description>String</d2p1:Description>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:Slug>String</d2p1:Slug>
    </d2p1:OrganizationLabel>
  </Labels>
  <MemberInvites xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationMemberInvite>
      <d2p1:Dismissed>0001-01-01T00:00:00</d2p1:Dismissed>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:UserId>0</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:OrganizationMemberInvite>
  </MemberInvites>
  <Members xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationMember>
      <d2p1:DenyAll>false</d2p1:DenyAll>
      <d2p1:DenyComments>false</d2p1:DenyComments>
      <d2p1:DenyPosts>false</d2p1:DenyPosts>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:IsModerator>false</d2p1:IsModerator>
      <d2p1:IsOwner>false</d2p1:IsOwner>
      <d2p1:Notes>String</d2p1:Notes>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:UserId>0</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:OrganizationMember>
  </Members>
  <ReportedPostComments>
    <PostCommentReportInfo>
      <Acknowledged>0001-01-01T00:00:00</Acknowledged>
      <AcknowledgedBy>String</AcknowledgedBy>
      <ContentHtml>String</ContentHtml>
      <Created>0001-01-01T00:00:00</Created>
      <CreatedBy>String</CreatedBy>
      <Dismissed>0001-01-01T00:00:00</Dismissed>
      <DismissedBy>String</DismissedBy>
      <FlagType>Violation</FlagType>
      <Id>0</Id>
      <OrganizationId>0</OrganizationId>
      <PostCommentId>0</PostCommentId>
      <PostId>0</PostId>
      <ReportCount>0</ReportCount>
      <ReportNotes>String</ReportNotes>
      <UserId>0</UserId>
      <UserName>String</UserName>
    </PostCommentReportInfo>
  </ReportedPostComments>
  <ReportedPosts>
    <PostReportInfo>
      <Acknowledged>0001-01-01T00:00:00</Acknowledged>
      <AcknowledgedBy>String</AcknowledgedBy>
      <Created>0001-01-01T00:00:00</Created>
      <CreatedBy>String</CreatedBy>
      <Dismissed>0001-01-01T00:00:00</Dismissed>
      <DismissedBy>String</DismissedBy>
      <FlagType>Violation</FlagType>
      <Id>0</Id>
      <OrganizationId>0</OrganizationId>
      <PostId>0</PostId>
      <ReportCount>0</ReportCount>
      <ReportNotes>String</ReportNotes>
      <Title>String</Title>
      <UserId>0</UserId>
      <UserName>String</UserName>
    </PostReportInfo>
  </ReportedPosts>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</GetOrganizationAdminResponse>