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 .csv suffix or ?format=csv
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/csv
Content-Type: text/csv
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/csv 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-01T00:00:00.0000000"}],"subscriptions":[{"id":0,"organizationId":0,"userId":0,"userName":"String","postTypes":["String"],"frequencyDays":0,"lastSyncedId":0,"lastSynced":"0001-01-01T00:00:00.0000000","created":"0001-01-01T00:00:00.0000000"}]}