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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"labels":[{"slug":"String","organizationId":0,"description":"String","color":"String"}],"members":[{"id":0,"organizationId":0,"userId":0,"userName":"String","isOwner":false,"isModerator":false,"denyAll":false,"denyPosts":false,"denyComments":false,"notes":"String"}],"memberInvites":[{"id":0,"organizationId":0,"userId":0,"userName":"String","dismissed":"0001-01-01T00:00:00.0000000"}],"reportedPosts":[{"id":0,"organizationId":0,"postId":0,"userId":0,"userName":"String","flagType":"Violation","reportNotes":"String","created":"0001-01-01T00:00:00.0000000","acknowledged":"0001-01-01T00:00:00.0000000","acknowledgedBy":"String","dismissed":"0001-01-01T00:00:00.0000000","dismissedBy":"String","title":"String","reportCount":0,"createdBy":"String"}],"reportedPostComments":[{"id":0,"organizationId":0,"postId":0,"postCommentId":0,"userId":0,"userName":"String","flagType":"Violation","reportNotes":"String","created":"0001-01-01T00:00:00.0000000","acknowledged":"0001-01-01T00:00:00.0000000","acknowledgedBy":"String","dismissed":"0001-01-01T00:00:00.0000000","dismissedBy":"String","contentHtml":"String","reportCount":0,"createdBy":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}