TechStacks!

<back to all web services

GetUserOrganizations

Posts
Requires Authentication
The following routes are available for this service:
All Verbs/user/organizations
using System;
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 GetUserOrganizations
        : IGet
    {
    }

    public partial class GetUserOrganizationsResponse
    {
        public GetUserOrganizationsResponse()
        {
            Members = new List<OrganizationMember>{};
            MemberInvites = new List<OrganizationMemberInvite>{};
            Subscriptions = new List<OrganizationSubscription>{};
        }

        public virtual List<OrganizationMember> Members { get; set; }
        public virtual List<OrganizationMemberInvite> MemberInvites { get; set; }
        public virtual List<OrganizationSubscription> Subscriptions { get; set; }
    }

}

namespace TechStacks.ServiceModel.Types
{
    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; }
    }

    public partial class OrganizationMemberInvite
    {
        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 DateTime? Dismissed { get; set; }
    }

    public partial class OrganizationSubscription
    {
        public OrganizationSubscription()
        {
            PostTypes = new string[]{};
        }

        public virtual long Id { get; set; }
        public virtual int OrganizationId { get; set; }
        public virtual int UserId { get; set; }
        public virtual string UserName { get; set; }
        public virtual string[] PostTypes { get; set; }
        public virtual int? FrequencyDays { get; set; }
        public virtual long? LastSyncedId { get; set; }
        public virtual DateTime? LastSynced { get; set; }
        public virtual DateTime Created { get; set; }
    }

}

C# GetUserOrganizations 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.

POST /user/organizations HTTP/1.1 
Host: techstacks.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	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-01
		}
	],
	subscriptions: 
	[
		{
			id: 0,
			organizationId: 0,
			userId: 0,
			userName: String,
			postTypes: 
			[
				String
			],
			frequencyDays: 0,
			lastSyncedId: 0,
			lastSynced: 0001-01-01,
			created: 0001-01-01
		}
	]
}