All Verbs | /user/organizations |
---|
namespace TechStacks.ServiceModel
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type OrganizationMember() =
member val Id:Int32 = new Int32() with get,set
member val OrganizationId:Int32 = new Int32() with get,set
member val UserId:Int32 = new Int32() with get,set
member val UserName:String = null with get,set
member val IsOwner:Boolean = new Boolean() with get,set
member val IsModerator:Boolean = new Boolean() with get,set
member val DenyAll:Boolean = new Boolean() with get,set
member val DenyPosts:Boolean = new Boolean() with get,set
member val DenyComments:Boolean = new Boolean() with get,set
member val Notes:String = null with get,set
[<AllowNullLiteral>]
type OrganizationMemberInvite() =
member val Id:Int32 = new Int32() with get,set
member val OrganizationId:Int32 = new Int32() with get,set
member val UserId:Int32 = new Int32() with get,set
member val UserName:String = null with get,set
member val Dismissed:Nullable<DateTime> = new Nullable<DateTime>() with get,set
[<AllowNullLiteral>]
type OrganizationSubscription() =
member val Id:Int64 = new Int64() with get,set
member val OrganizationId:Int32 = new Int32() with get,set
member val UserId:Int32 = new Int32() with get,set
member val UserName:String = null with get,set
member val PostTypes:String[] = null with get,set
member val FrequencyDays:Nullable<Int32> = new Nullable<Int32>() with get,set
member val LastSyncedId:Nullable<Int64> = new Nullable<Int64>() with get,set
member val LastSynced:Nullable<DateTime> = new Nullable<DateTime>() with get,set
member val Created:DateTime = new DateTime() with get,set
[<AllowNullLiteral>]
type GetUserOrganizationsResponse() =
member val Members:ResizeArray<OrganizationMember> = null with get,set
member val MemberInvites:ResizeArray<OrganizationMemberInvite> = null with get,set
member val Subscriptions:ResizeArray<OrganizationSubscription> = null with get,set
[<AllowNullLiteral>]
type GetUserOrganizations() =
interface IGet
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.
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 } ] }