TechStacks!

<back to all web services

GetOrganization

Organization
The following routes are available for this service:
GET/orgs/{Id}
import Foundation
import ServiceStack

public class GetOrganization : IGet, Codable
{
    public var id:Int?

    required public init(){}
}

public class GetOrganizationResponse : Codable
{
    public var cache:Int
    public var id:Int
    public var slug:String
    public var organization:Organization
    public var labels:[OrganizationLabel]
    public var categories:[Category]
    public var owners:[OrganizationMember]
    public var moderators:[OrganizationMember]
    public var membersCount:Int
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class Organization : Codable
{
    public var id:Int
    public var name:String
    public var slug:String
    public var Description:String
    public var descriptionHtml:String
    public var color:String
    public var textColor:String
    public var linkColor:String
    public var backgroundColor:String
    public var backgroundUrl:String
    public var logoUrl:String
    public var heroUrl:String
    public var lang:String
    public var defaultPostType:String
    public var defaultSubscriptionPostTypes:[String]
    public var postTypes:[String]
    public var moderatorPostTypes:[String]
    public var deletePostsWithReportCount:Int
    public var disableInvites:Bool?
    public var upVotes:Int
    public var downVotes:Int
    public var views:Int
    public var favorites:Int
    public var subscribers:Int
    public var commentsCount:Int
    public var postsCount:Int
    public var score:Int
    public var rank:Int
    public var refId:Int?
    public var refSource:String
    public var hidden:Date?
    public var hiddenBy:String
    public var locked:Date?
    public var lockedBy:String
    public var deleted:Date?
    public var deletedBy:String
    public var created:Date
    public var createdBy:String
    public var modified:Date
    public var modifiedBy:String

    required public init(){}
}

public class OrganizationLabel : Codable
{
    public var slug:String
    public var organizationId:Int
    public var Description:String
    public var color:String

    required public init(){}
}

public class Category : Codable
{
    public var id:Int
    public var organizationId:Int
    public var name:String
    public var slug:String
    public var Description:String
    public var color:String
    public var technologyIds:[Int]
    public var commentsCount:Int
    public var postsCount:Int
    public var score:Int
    public var rank:Int

    required public init(){}
}

public class OrganizationMember : Codable
{
    public var id:Int
    public var organizationId:Int
    public var userId:Int
    public var userName:String
    public var isOwner:Bool
    public var isModerator:Bool
    public var denyAll:Bool
    public var denyPosts:Bool
    public var denyComments:Bool
    public var notes:String

    required public init(){}
}


Swift 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
		}
	}
}