Package com.podio.tag

Class TagAPI


  • public class TagAPI
    extends BaseAPI
    Tags are words or short sentences that are used as metadata for objects. For a more detailed explanation, see this wikipedia article: http://en.wikipedia.org/wiki/Tag_(metadata) Podio supports tags on statuses and items and tags that include spaces.
    • Method Detail

      • createTags

        public void createTags​(Reference reference,
                               Collection<String> tags)
        Add a new set of tags to the object. If a tag with the same text is already present, the tag will be ignored.
        Parameters:
        reference - The object the tags should be added to
        tags - The tags that should be added
      • createTags

        public void createTags​(Reference reference,
                               String... tags)
        Add a new set of tags to the object. If a tag with the same text is already present, the tag will be ignored.
        Parameters:
        reference - The object the tags should be added to
        tags - The tags that should be added
      • updateTags

        public void updateTags​(Reference reference,
                               Collection<String> tags)
        Update the tags on the objects
        Parameters:
        reference - The object the tags should be updated on
        tags - The tags that should now be set on the object
      • updateTags

        public void updateTags​(Reference reference,
                               String... tags)
        Update the tags on the objects
        Parameters:
        reference - The object the tags should be updated on
        tags - The tags that should now be set on the object
      • removeTag

        public void removeTag​(Reference reference,
                              String tag)
        Removes a single tag from an object.
        Parameters:
        reference - The object the tag should be removed from
        tag - The tag to remove
      • getTagsOnApp

        public List<TagCount> getTagsOnApp​(int appId)
        Returns the tags on the given app. This includes only items. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        appId - The id of the app to return tags from *
        Returns:
        The list of tags with their count
      • getTagsOnApp

        public List<TagCount> getTagsOnApp​(int appId,
                                           Map<String,​String> options)
        Returns the tags on the given app. This includes only items. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        appId - The id of the app to return tags from *
        options - The options for this operation, including limit on number of tags returned and/or text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnApp

        public List<TagCount> getTagsOnApp​(int appId,
                                           int limit,
                                           String text)
        Returns the tags on the given app. This includes only items. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        appId - The id of the app to return tags from
        limit - limit on number of tags returned (max 250)
        text - text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnOrg

        public List<TagCount> getTagsOnOrg​(int orgId)
        Returns the tags on the given org. This includes both items and statuses on all spaces in the organization that the user is part of. The tags are first limited ordered by their frequency of use, and then returned sorted alphabetically.
        Parameters:
        orgId - The id of the org to return tags from
        Returns:
        The list of tags with their count
      • getTagsOnOrg

        public List<TagCount> getTagsOnOrg​(int orgId,
                                           Map<String,​String> options)
        Returns the tags on the given org. This includes both items and statuses on all spaces in the organization that the user is part of. The tags are first limited ordered by their frequency of use, and then returned sorted alphabetically.
        Parameters:
        orgId - The id of the org to return tags from
        options - The options for this operation, including limit on number of tags returned and/or text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnOrg

        public List<TagCount> getTagsOnOrg​(int orgId,
                                           int limit,
                                           String text)
        Returns the tags on the given org. This includes both items and statuses on all spaces in the organization that the user is part of. The tags are first limited ordered by their frequency of use, and then returned sorted alphabetically.
        Parameters:
        orgId - The id of the org to return tags from
        limit - limit on number of tags returned (max 250)
        text - text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnSpace

        public List<TagCount> getTagsOnSpace​(int spaceId)
        Returns the tags on the given space. This includes both items and statuses. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        spaceId - The id of the space to return tags from
        Returns:
        The list of tags with their count
      • getTagsOnSpace

        public List<TagCount> getTagsOnSpace​(int spaceId,
                                             Map<String,​String> options)
        Returns the tags on the given space. This includes both items and statuses. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        spaceId - The id of the space to return tags from
        options - The options for this operation, including limit on number of tags returned and/or text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnSpace

        public List<TagCount> getTagsOnSpace​(int spaceId,
                                             int limit,
                                             String text)
        Returns the tags on the given space. This includes both items and statuses. The tags are ordered firstly by the number of uses, secondly by the tag text.
        Parameters:
        spaceId - The id of the space to return tags from
        limit - limit on number of tags returned (max 250)
        text - text of tag to search for
        Returns:
        The list of tags with their count
      • getTagsOnAppWithText

        public List<TagReference> getTagsOnAppWithText​(int appId,
                                                       String text)
        Returns the objects that are tagged with the given text on the app. The objects are returned sorted descending by the time the tag was added.
        Parameters:
        appId - The id of the app to search within
        text - The tag to search for
        Returns:
        The list of objects in the app that have the given tag
      • getTagsOnOrgWithText

        public List<TagReference> getTagsOnOrgWithText​(int orgId,
                                                       String text)
        Returns the objects that are tagged with the given text on the org. The objects are returned sorted descending by the time the tag was added.
        Parameters:
        orgId - The id of the org to search within
        text - The tag to search for
        Returns:
        The list of objects in the org that have the given tag
      • getTagsOnSpaceWithText

        public List<TagReference> getTagsOnSpaceWithText​(int spaceId,
                                                         String text)
        Returns the objects that are tagged with the given text on the space. The objects are returned sorted descending by the time the tag was added.
        Parameters:
        spaceId - The id of the space to search within
        text - The tag to search for
        Returns:
        The list of objects in the space that have the given tag