TechStacks!

<back to all web services

GetUserOrganizations

Posts
Requires Authentication
The following routes are available for this service:
All Verbs/user/organizations
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class GetUserOrganizations implements IGet
    {
        
    }

    public static class GetUserOrganizationsResponse
    {
        public ArrayList<OrganizationMember> members = null;
        public ArrayList<OrganizationMemberInvite> memberInvites = null;
        public ArrayList<OrganizationSubscription> subscriptions = null;
        
        public ArrayList<OrganizationMember> getMembers() { return members; }
        public GetUserOrganizationsResponse setMembers(ArrayList<OrganizationMember> value) { this.members = value; return this; }
        public ArrayList<OrganizationMemberInvite> getMemberInvites() { return memberInvites; }
        public GetUserOrganizationsResponse setMemberInvites(ArrayList<OrganizationMemberInvite> value) { this.memberInvites = value; return this; }
        public ArrayList<OrganizationSubscription> getSubscriptions() { return subscriptions; }
        public GetUserOrganizationsResponse setSubscriptions(ArrayList<OrganizationSubscription> value) { this.subscriptions = value; return this; }
    }

    public static class OrganizationMember
    {
        public Integer id = null;
        public Integer organizationId = null;
        public Integer userId = null;
        public String userName = null;
        public Boolean isOwner = null;
        public Boolean isModerator = null;
        public Boolean denyAll = null;
        public Boolean denyPosts = null;
        public Boolean denyComments = null;
        public String notes = null;
        
        public Integer getId() { return id; }
        public OrganizationMember setId(Integer value) { this.id = value; return this; }
        public Integer getOrganizationId() { return organizationId; }
        public OrganizationMember setOrganizationId(Integer value) { this.organizationId = value; return this; }
        public Integer getUserId() { return userId; }
        public OrganizationMember setUserId(Integer value) { this.userId = value; return this; }
        public String getUserName() { return userName; }
        public OrganizationMember setUserName(String value) { this.userName = value; return this; }
        public Boolean getIsOwner() { return isOwner; }
        public OrganizationMember setIsOwner(Boolean value) { this.isOwner = value; return this; }
        public Boolean getIsModerator() { return isModerator; }
        public OrganizationMember setIsModerator(Boolean value) { this.isModerator = value; return this; }
        public Boolean isDenyAll() { return denyAll; }
        public OrganizationMember setDenyAll(Boolean value) { this.denyAll = value; return this; }
        public Boolean isDenyPosts() { return denyPosts; }
        public OrganizationMember setDenyPosts(Boolean value) { this.denyPosts = value; return this; }
        public Boolean isDenyComments() { return denyComments; }
        public OrganizationMember setDenyComments(Boolean value) { this.denyComments = value; return this; }
        public String getNotes() { return notes; }
        public OrganizationMember setNotes(String value) { this.notes = value; return this; }
    }

    public static class OrganizationMemberInvite
    {
        public Integer id = null;
        public Integer organizationId = null;
        public Integer userId = null;
        public String userName = null;
        public Date dismissed = null;
        
        public Integer getId() { return id; }
        public OrganizationMemberInvite setId(Integer value) { this.id = value; return this; }
        public Integer getOrganizationId() { return organizationId; }
        public OrganizationMemberInvite setOrganizationId(Integer value) { this.organizationId = value; return this; }
        public Integer getUserId() { return userId; }
        public OrganizationMemberInvite setUserId(Integer value) { this.userId = value; return this; }
        public String getUserName() { return userName; }
        public OrganizationMemberInvite setUserName(String value) { this.userName = value; return this; }
        public Date getDismissed() { return dismissed; }
        public OrganizationMemberInvite setDismissed(Date value) { this.dismissed = value; return this; }
    }

    public static class OrganizationSubscription
    {
        public Long id = null;
        public Integer organizationId = null;
        public Integer userId = null;
        public String userName = null;
        public ArrayList<String> postTypes = null;
        public Integer frequencyDays = null;
        public Long lastSyncedId = null;
        public Date lastSynced = null;
        public Date created = null;
        
        public Long getId() { return id; }
        public OrganizationSubscription setId(Long value) { this.id = value; return this; }
        public Integer getOrganizationId() { return organizationId; }
        public OrganizationSubscription setOrganizationId(Integer value) { this.organizationId = value; return this; }
        public Integer getUserId() { return userId; }
        public OrganizationSubscription setUserId(Integer value) { this.userId = value; return this; }
        public String getUserName() { return userName; }
        public OrganizationSubscription setUserName(String value) { this.userName = value; return this; }
        public ArrayList<String> getPostTypes() { return postTypes; }
        public OrganizationSubscription setPostTypes(ArrayList<String> value) { this.postTypes = value; return this; }
        public Integer getFrequencyDays() { return frequencyDays; }
        public OrganizationSubscription setFrequencyDays(Integer value) { this.frequencyDays = value; return this; }
        public Long getLastSyncedId() { return lastSyncedId; }
        public OrganizationSubscription setLastSyncedId(Long value) { this.lastSyncedId = value; return this; }
        public Date getLastSynced() { return lastSynced; }
        public OrganizationSubscription setLastSynced(Date value) { this.lastSynced = value; return this; }
        public Date getCreated() { return created; }
        public OrganizationSubscription setCreated(Date value) { this.created = value; return this; }
    }

}

Java GetUserOrganizations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<GetUserOrganizations xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetUserOrganizationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel">
  <MemberInvites xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationMemberInvite>
      <d2p1:Dismissed>0001-01-01T00:00:00</d2p1:Dismissed>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:UserId>0</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:OrganizationMemberInvite>
  </MemberInvites>
  <Members xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationMember>
      <d2p1:DenyAll>false</d2p1:DenyAll>
      <d2p1:DenyComments>false</d2p1:DenyComments>
      <d2p1:DenyPosts>false</d2p1:DenyPosts>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:IsModerator>false</d2p1:IsModerator>
      <d2p1:IsOwner>false</d2p1:IsOwner>
      <d2p1:Notes>String</d2p1:Notes>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:UserId>0</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:OrganizationMember>
  </Members>
  <Subscriptions xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechStacks.ServiceModel.Types">
    <d2p1:OrganizationSubscription>
      <d2p1:Created>0001-01-01T00:00:00</d2p1:Created>
      <d2p1:FrequencyDays>0</d2p1:FrequencyDays>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:LastSynced>0001-01-01T00:00:00</d2p1:LastSynced>
      <d2p1:LastSyncedId>0</d2p1:LastSyncedId>
      <d2p1:OrganizationId>0</d2p1:OrganizationId>
      <d2p1:PostTypes xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:PostTypes>
      <d2p1:UserId>0</d2p1:UserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:OrganizationSubscription>
  </Subscriptions>
</GetUserOrganizationsResponse>