Package com.podio.org

Class OrgAPI


  • public class OrgAPI
    extends BaseAPI
    • Method Detail

      • createOrganization

        public OrganizationCreateResponse createOrganization​(OrganizationCreate data)
        Creates a new organization
        Parameters:
        data - The data for the new organization
        Returns:
        The data for the newly created organization
      • updateOrganization

        public void updateOrganization​(int orgId,
                                       OrganizationCreate data)
        Updates an organization with new name and logo. Note that the URL of the organization will not change even though the name changes.
        Parameters:
        orgId - The id of the organization
        data - The new data
      • getOrganization

        public Organization getOrganization​(int orgId)
        Gets the organization with the given id.
        Parameters:
        orgId - The id of the organization
        Returns:
        The organization
      • getOrganizations

        public List<OrganizationWithSpaces> getOrganizations()
        Returns a list of all the organizations and spaces the user is member of.
        Returns:
        The organizations the user is member of
      • getOrganizationByURL

        public OrganizationMini getOrganizationByURL​(String url)
        Returns the organization with the given full URL. The URL does not have to be truncated to the root, it can be to any resource on the URL.
        Parameters:
        url - The URL to find the organization for
        Returns:
        The organization
      • getSharedOrganizations

        public List<OrganizationWithSpaces> getSharedOrganizations​(int userId)
        Returns the organizations and spaces that the logged in user shares with the specified user. The organizations and spaces will be returned sorted by name.
        Parameters:
        userId - The id of the user
        Returns:
        The organizations with spaces that are shared with the user
      • getSpaceByURL

        public Space getSpaceByURL​(int orgId,
                                   String url)
        Return the space with the given URL on the space. To get the space related to http://company.podio.com/intranet, first lookup the organization on "company" and then the space using this function using the URL "intranet".
        Parameters:
        orgId - The id of the organization
        url - The url fragment for the space
        Returns:
        The matching space
      • getSpaces

        public List<Space> getSpaces​(int orgId)
        Returns all the spaces for the organization.
        Parameters:
        orgId - The id of the organization
        Returns:
        The spaces in the organization
      • getMembers

        public List<OrganizationMember> getMembers​(int orgId)
        Returns the members, both invited and active, of the given organization. This method is only available for organization administrators. For users only invited, only very limited information will be returned for the user and profile.
        Parameters:
        orgId - The id of the organization
        Returns:
        The list of members on the organization with detailed information
      • getMembers

        public List<OrganizationMember> getMembers​(int orgId,
                                                   int offset,
                                                   int limit)
        Returns the members, both invited and active, of the given organization. This method is only available for organization administrators. For users only invited, only very limited information will be returned for the user and profile.
        Parameters:
        orgId - The id of the organization
        offset - The offset into the user list
        limit - The number of results to return (max 500)
        Returns:
        The list of members on the organization with detailed information
      • getMembers

        public List<OrganizationMember> getMembers​(int orgId,
                                                   Map<String,​String> options)
        Returns the members, both invited and active, of the given organization. This method is only available for organization administrators. For users only invited, only very limited information will be returned for the user and profile.
        Parameters:
        orgId - The id of the organization
        options - The parameters for get organization members
        Returns:
        The list of members on the organization with detailed information
      • getMember

        public OrganizationMember getMember​(int orgId,
                                            int userId)
        Returns the member data for the given user in the given organization.
        Parameters:
        orgId - The id of the organization
        userId - The id of the user
        Returns:
        The details of the users membership of the organization
      • getMemberByMail

        public OrganizationMember getMemberByMail​(int orgId,
                                                  String mail)
        Returns the member data for the given user in the given organization.
        Parameters:
        orgId - The id of the organization
        mail - The mail of the users account
        Returns:
        The details of the users membership of the organization
      • getEndMemberInfo

        public EndMemberInfo getEndMemberInfo​(int orgId,
                                              int userId)
        Returns information about what would happen if this user would be removed from the org
        Parameters:
        orgId - The id of the organization
        userId - The id of the user
        Returns:
        The information about the users workspace memberships in the org
      • endMember

        public void endMember​(int orgId,
                              int userId)
        Ends the users membership of all spaces in the organization. In workspaces in the organization where the user is the last admin, other users will be promoted to admins. Workspaces where the user is the only member will be deleted.
        Parameters:
        orgId - The id of the organization
        userId - The id of the user