GET | /orgs/{Id} |
---|
export class Organization
{
public id: number;
public name: string;
public slug: string;
public description: string;
public descriptionHtml: string;
public color: string;
public textColor: string;
public linkColor: string;
public backgroundColor: string;
public backgroundUrl: string;
public logoUrl: string;
public heroUrl: string;
public lang: string;
public defaultPostType: string;
public defaultSubscriptionPostTypes: string[];
public postTypes: string[];
public moderatorPostTypes: string[];
public deletePostsWithReportCount: number;
public disableInvites?: boolean;
public upVotes: number;
public downVotes: number;
public views: number;
public favorites: number;
public subscribers: number;
public commentsCount: number;
public postsCount: number;
public score: number;
public rank: number;
public refId?: number;
public refSource: string;
public hidden?: string;
public hiddenBy: string;
public locked?: string;
public lockedBy: string;
public deleted?: string;
public deletedBy: string;
public created: string;
public createdBy: string;
public modified: string;
public modifiedBy: string;
public constructor(init?: Partial<Organization>) { (Object as any).assign(this, init); }
}
export class OrganizationLabel
{
public slug: string;
public organizationId: number;
public description: string;
public color: string;
public constructor(init?: Partial<OrganizationLabel>) { (Object as any).assign(this, init); }
}
export class Category
{
public id: number;
public organizationId: number;
public name: string;
public slug: string;
public description: string;
public color: string;
public technologyIds: number[];
public commentsCount: number;
public postsCount: number;
public score: number;
public rank: number;
public constructor(init?: Partial<Category>) { (Object as any).assign(this, init); }
}
export class OrganizationMember
{
public id: number;
public organizationId: number;
public userId: number;
public userName: string;
public isOwner: boolean;
public isModerator: boolean;
public denyAll: boolean;
public denyPosts: boolean;
public denyComments: boolean;
public notes: string;
public constructor(init?: Partial<OrganizationMember>) { (Object as any).assign(this, init); }
}
export class GetOrganizationResponse
{
public cache: number;
public id: number;
public slug: string;
public organization: Organization;
public labels: OrganizationLabel[];
public categories: Category[];
public owners: OrganizationMember[];
public moderators: OrganizationMember[];
public membersCount: number;
public responseStatus: ResponseStatus;
public constructor(init?: Partial<GetOrganizationResponse>) { (Object as any).assign(this, init); }
}
export class GetOrganization implements IGet
{
public id?: number;
public constructor(init?: Partial<GetOrganization>) { (Object as any).assign(this, init); }
}
TypeScript GetOrganization DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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 } } }