TechStacks!

<back to all web services

GetOrganizationBySlug

Organization
The following routes are available for this service:
GET/organizations/{Slug}
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using TechStacks.ServiceModel;
using TechStacks.ServiceModel.Types;

namespace TechStacks.ServiceModel
{
    public partial class GetOrganizationBySlug
        : IGet
    {
        public virtual string Slug { get; set; }
    }

    public partial class GetOrganizationResponse
    {
        public virtual long Cache { get; set; }
        public virtual int Id { get; set; }
        public virtual string Slug { get; set; }
        public virtual Organization Organization { get; set; }
        public virtual List<OrganizationLabel> Labels { get; set; }
        public virtual List<Category> Categories { get; set; }
        public virtual List<OrganizationMember> Owners { get; set; }
        public virtual List<OrganizationMember> Moderators { get; set; }
        public virtual long MembersCount { get; set; }
        public virtual ResponseStatus ResponseStatus { get; set; }
    }

}

namespace TechStacks.ServiceModel.Types
{
    public partial class Category
    {
        public virtual int Id { get; set; }
        public virtual int OrganizationId { get; set; }
        public virtual string Name { get; set; }
        public virtual string Slug { get; set; }
        public virtual string Description { get; set; }
        public virtual string Color { get; set; }
        public virtual int[] TechnologyIds { get; set; }
        public virtual int CommentsCount { get; set; }
        public virtual int PostsCount { get; set; }
        public virtual int Score { get; set; }
        public virtual int Rank { get; set; }
    }

    public partial class Organization
    {
        public virtual int Id { get; set; }
        public virtual string Name { get; set; }
        public virtual string Slug { get; set; }
        public virtual string Description { get; set; }
        public virtual string DescriptionHtml { get; set; }
        public virtual string Color { get; set; }
        public virtual string TextColor { get; set; }
        public virtual string LinkColor { get; set; }
        public virtual string BackgroundColor { get; set; }
        public virtual string BackgroundUrl { get; set; }
        public virtual string LogoUrl { get; set; }
        public virtual string HeroUrl { get; set; }
        public virtual string Lang { get; set; }
        public virtual string DefaultPostType { get; set; }
        public virtual string[] DefaultSubscriptionPostTypes { get; set; }
        public virtual string[] PostTypes { get; set; }
        public virtual string[] ModeratorPostTypes { get; set; }
        public virtual int DeletePostsWithReportCount { get; set; }
        public virtual bool? DisableInvites { get; set; }
        public virtual long UpVotes { get; set; }
        public virtual long DownVotes { get; set; }
        public virtual long Views { get; set; }
        public virtual long Favorites { get; set; }
        public virtual int Subscribers { get; set; }
        public virtual int CommentsCount { get; set; }
        public virtual int PostsCount { get; set; }
        public virtual int Score { get; set; }
        public virtual int Rank { get; set; }
        public virtual long? RefId { get; set; }
        public virtual string RefSource { get; set; }
        public virtual DateTime? Hidden { get; set; }
        public virtual string HiddenBy { get; set; }
        public virtual DateTime? Locked { get; set; }
        public virtual string LockedBy { get; set; }
        public virtual DateTime? Deleted { get; set; }
        public virtual string DeletedBy { get; set; }
        public virtual DateTime Created { get; set; }
        public virtual string CreatedBy { get; set; }
        public virtual DateTime Modified { get; set; }
        public virtual string ModifiedBy { get; set; }
    }

    public partial class OrganizationLabel
    {
        public virtual string Slug { get; set; }
        public virtual int OrganizationId { get; set; }
        public virtual string Description { get; set; }
        public virtual string Color { get; set; }
    }

    public partial class OrganizationMember
    {
        public virtual int Id { get; set; }
        public virtual int OrganizationId { get; set; }
        public virtual int UserId { get; set; }
        public virtual string UserName { get; set; }
        public virtual bool IsOwner { get; set; }
        public virtual bool IsModerator { get; set; }
        public virtual bool DenyAll { get; set; }
        public virtual bool DenyPosts { get; set; }
        public virtual bool DenyComments { get; set; }
        public virtual string Notes { get; set; }
    }

}

C# GetOrganizationBySlug 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 /organizations/{Slug} 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
		}
	}
}