All Verbs | /user/organizations |
---|
import Foundation
import ServiceStack
public class GetUserOrganizations : IGet, Codable
{
required public init(){}
}
public class GetUserOrganizationsResponse : Codable
{
public var members:[OrganizationMember]
public var memberInvites:[OrganizationMemberInvite]
public var subscriptions:[OrganizationSubscription]
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(){}
}
public class OrganizationMemberInvite : Codable
{
public var id:Int
public var organizationId:Int
public var userId:Int
public var userName:String
public var dismissed:Date?
required public init(){}
}
public class OrganizationSubscription : Codable
{
public var id:Int
public var organizationId:Int
public var userId:Int
public var userName:String
public var postTypes:[String]
public var frequencyDays:Int?
public var lastSyncedId:Int?
public var lastSynced:Date?
public var created:Date
required public init(){}
}
Swift GetUserOrganizations 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.
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 } ] }