TechStacks!

<back to all web services

GetOrganization

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

class Organization implements IConvertible
{
    int? id;
    String? name;
    String? slug;
    String? description;
    String? descriptionHtml;
    String? color;
    String? textColor;
    String? linkColor;
    String? backgroundColor;
    String? backgroundUrl;
    String? logoUrl;
    String? heroUrl;
    String? lang;
    String? defaultPostType;
    List<String>? defaultSubscriptionPostTypes;
    List<String>? postTypes;
    List<String>? moderatorPostTypes;
    int? deletePostsWithReportCount;
    bool? disableInvites;
    int? upVotes;
    int? downVotes;
    int? views;
    int? favorites;
    int? subscribers;
    int? commentsCount;
    int? postsCount;
    int? score;
    int? rank;
    int? refId;
    String? refSource;
    DateTime? hidden;
    String? hiddenBy;
    DateTime? locked;
    String? lockedBy;
    DateTime? deleted;
    String? deletedBy;
    DateTime? created;
    String? createdBy;
    DateTime? modified;
    String? modifiedBy;

    Organization({this.id,this.name,this.slug,this.description,this.descriptionHtml,this.color,this.textColor,this.linkColor,this.backgroundColor,this.backgroundUrl,this.logoUrl,this.heroUrl,this.lang,this.defaultPostType,this.defaultSubscriptionPostTypes,this.postTypes,this.moderatorPostTypes,this.deletePostsWithReportCount,this.disableInvites,this.upVotes,this.downVotes,this.views,this.favorites,this.subscribers,this.commentsCount,this.postsCount,this.score,this.rank,this.refId,this.refSource,this.hidden,this.hiddenBy,this.locked,this.lockedBy,this.deleted,this.deletedBy,this.created,this.createdBy,this.modified,this.modifiedBy});
    Organization.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        name = json['name'];
        slug = json['slug'];
        description = json['description'];
        descriptionHtml = json['descriptionHtml'];
        color = json['color'];
        textColor = json['textColor'];
        linkColor = json['linkColor'];
        backgroundColor = json['backgroundColor'];
        backgroundUrl = json['backgroundUrl'];
        logoUrl = json['logoUrl'];
        heroUrl = json['heroUrl'];
        lang = json['lang'];
        defaultPostType = json['defaultPostType'];
        defaultSubscriptionPostTypes = JsonConverters.fromJson(json['defaultSubscriptionPostTypes'],'List<String>',context!);
        postTypes = JsonConverters.fromJson(json['postTypes'],'List<String>',context!);
        moderatorPostTypes = JsonConverters.fromJson(json['moderatorPostTypes'],'List<String>',context!);
        deletePostsWithReportCount = json['deletePostsWithReportCount'];
        disableInvites = json['disableInvites'];
        upVotes = json['upVotes'];
        downVotes = json['downVotes'];
        views = json['views'];
        favorites = json['favorites'];
        subscribers = json['subscribers'];
        commentsCount = json['commentsCount'];
        postsCount = json['postsCount'];
        score = json['score'];
        rank = json['rank'];
        refId = json['refId'];
        refSource = json['refSource'];
        hidden = JsonConverters.fromJson(json['hidden'],'DateTime',context!);
        hiddenBy = json['hiddenBy'];
        locked = JsonConverters.fromJson(json['locked'],'DateTime',context!);
        lockedBy = json['lockedBy'];
        deleted = JsonConverters.fromJson(json['deleted'],'DateTime',context!);
        deletedBy = json['deletedBy'];
        created = JsonConverters.fromJson(json['created'],'DateTime',context!);
        createdBy = json['createdBy'];
        modified = JsonConverters.fromJson(json['modified'],'DateTime',context!);
        modifiedBy = json['modifiedBy'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'name': name,
        'slug': slug,
        'description': description,
        'descriptionHtml': descriptionHtml,
        'color': color,
        'textColor': textColor,
        'linkColor': linkColor,
        'backgroundColor': backgroundColor,
        'backgroundUrl': backgroundUrl,
        'logoUrl': logoUrl,
        'heroUrl': heroUrl,
        'lang': lang,
        'defaultPostType': defaultPostType,
        'defaultSubscriptionPostTypes': JsonConverters.toJson(defaultSubscriptionPostTypes,'List<String>',context!),
        'postTypes': JsonConverters.toJson(postTypes,'List<String>',context!),
        'moderatorPostTypes': JsonConverters.toJson(moderatorPostTypes,'List<String>',context!),
        'deletePostsWithReportCount': deletePostsWithReportCount,
        'disableInvites': disableInvites,
        'upVotes': upVotes,
        'downVotes': downVotes,
        'views': views,
        'favorites': favorites,
        'subscribers': subscribers,
        'commentsCount': commentsCount,
        'postsCount': postsCount,
        'score': score,
        'rank': rank,
        'refId': refId,
        'refSource': refSource,
        'hidden': JsonConverters.toJson(hidden,'DateTime',context!),
        'hiddenBy': hiddenBy,
        'locked': JsonConverters.toJson(locked,'DateTime',context!),
        'lockedBy': lockedBy,
        'deleted': JsonConverters.toJson(deleted,'DateTime',context!),
        'deletedBy': deletedBy,
        'created': JsonConverters.toJson(created,'DateTime',context!),
        'createdBy': createdBy,
        'modified': JsonConverters.toJson(modified,'DateTime',context!),
        'modifiedBy': modifiedBy
    };

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

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 Category implements IConvertible
{
    int? id;
    int? organizationId;
    String? name;
    String? slug;
    String? description;
    String? color;
    List<int>? technologyIds;
    int? commentsCount;
    int? postsCount;
    int? score;
    int? rank;

    Category({this.id,this.organizationId,this.name,this.slug,this.description,this.color,this.technologyIds,this.commentsCount,this.postsCount,this.score,this.rank});
    Category.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        organizationId = json['organizationId'];
        name = json['name'];
        slug = json['slug'];
        description = json['description'];
        color = json['color'];
        technologyIds = JsonConverters.fromJson(json['technologyIds'],'List<int>',context!);
        commentsCount = json['commentsCount'];
        postsCount = json['postsCount'];
        score = json['score'];
        rank = json['rank'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'organizationId': organizationId,
        'name': name,
        'slug': slug,
        'description': description,
        'color': color,
        'technologyIds': JsonConverters.toJson(technologyIds,'List<int>',context!),
        'commentsCount': commentsCount,
        'postsCount': postsCount,
        'score': score,
        'rank': rank
    };

    getTypeName() => "Category";
    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 GetOrganizationResponse implements IConvertible
{
    int? cache;
    int? id;
    String? slug;
    Organization? organization;
    List<OrganizationLabel>? labels;
    List<Category>? categories;
    List<OrganizationMember>? owners;
    List<OrganizationMember>? moderators;
    int? membersCount;
    ResponseStatus? responseStatus;

    GetOrganizationResponse({this.cache,this.id,this.slug,this.organization,this.labels,this.categories,this.owners,this.moderators,this.membersCount,this.responseStatus});
    GetOrganizationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        cache = json['cache'];
        id = json['id'];
        slug = json['slug'];
        organization = JsonConverters.fromJson(json['organization'],'Organization',context!);
        labels = JsonConverters.fromJson(json['labels'],'List<OrganizationLabel>',context!);
        categories = JsonConverters.fromJson(json['categories'],'List<Category>',context!);
        owners = JsonConverters.fromJson(json['owners'],'List<OrganizationMember>',context!);
        moderators = JsonConverters.fromJson(json['moderators'],'List<OrganizationMember>',context!);
        membersCount = json['membersCount'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'cache': cache,
        'id': id,
        'slug': slug,
        'organization': JsonConverters.toJson(organization,'Organization',context!),
        'labels': JsonConverters.toJson(labels,'List<OrganizationLabel>',context!),
        'categories': JsonConverters.toJson(categories,'List<Category>',context!),
        'owners': JsonConverters.toJson(owners,'List<OrganizationMember>',context!),
        'moderators': JsonConverters.toJson(moderators,'List<OrganizationMember>',context!),
        'membersCount': membersCount,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

class GetOrganization implements IGet, IConvertible
{
    int? id;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
    'Organization': TypeInfo(TypeOf.Class, create:() => Organization()),
    'OrganizationLabel': TypeInfo(TypeOf.Class, create:() => OrganizationLabel()),
    'Category': TypeInfo(TypeOf.Class, create:() => Category()),
    'OrganizationMember': TypeInfo(TypeOf.Class, create:() => OrganizationMember()),
    'GetOrganizationResponse': TypeInfo(TypeOf.Class, create:() => GetOrganizationResponse()),
    'List<OrganizationLabel>': TypeInfo(TypeOf.Class, create:() => <OrganizationLabel>[]),
    'List<Category>': TypeInfo(TypeOf.Class, create:() => <Category>[]),
    'List<OrganizationMember>': TypeInfo(TypeOf.Class, create:() => <OrganizationMember>[]),
    'GetOrganization': TypeInfo(TypeOf.Class, create:() => GetOrganization()),
});

Dart GetOrganization DTOs

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

HTTP + JSV

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

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

{
	cache: 0,
	id: 0,
	slug: String,
	organization: 
	{
		id: 0,
		name: String,
		slug: String,
		description: String,
		descriptionHtml: String,
		color: String,
		textColor: String,
		linkColor: String,
		backgroundColor: String,
		backgroundUrl: String,
		logoUrl: String,
		heroUrl: String,
		lang: String,
		defaultPostType: String,
		defaultSubscriptionPostTypes: 
		[
			String
		],
		postTypes: 
		[
			String
		],
		moderatorPostTypes: 
		[
			String
		],
		deletePostsWithReportCount: 0,
		disableInvites: False,
		upVotes: 0,
		downVotes: 0,
		views: 0,
		favorites: 0,
		subscribers: 0,
		commentsCount: 0,
		postsCount: 0,
		score: 0,
		rank: 0,
		refId: 0,
		refSource: String,
		hidden: 0001-01-01,
		hiddenBy: String,
		locked: 0001-01-01,
		lockedBy: String,
		deleted: 0001-01-01,
		deletedBy: String,
		created: 0001-01-01,
		createdBy: String,
		modified: 0001-01-01,
		modifiedBy: String
	},
	labels: 
	[
		{
			slug: String,
			organizationId: 0,
			description: String,
			color: String
		}
	],
	categories: 
	[
		{
			id: 0,
			organizationId: 0,
			name: String,
			slug: String,
			description: String,
			color: String,
			technologyIds: 
			[
				0
			],
			commentsCount: 0,
			postsCount: 0,
			score: 0,
			rank: 0
		}
	],
	owners: 
	[
		{
			id: 0,
			organizationId: 0,
			userId: 0,
			userName: String,
			isOwner: False,
			isModerator: False,
			denyAll: False,
			denyPosts: False,
			denyComments: False,
			notes: String
		}
	],
	moderators: 
	[
		{
			id: 0,
			organizationId: 0,
			userId: 0,
			userName: String,
			isOwner: False,
			isModerator: False,
			denyAll: False,
			denyPosts: False,
			denyComments: False,
			notes: String
		}
	],
	membersCount: 0,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}