Package com.podio.tag
Class TagAPI
- java.lang.Object
-
- com.podio.BaseAPI
-
- com.podio.tag.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.
-
-
Constructor Summary
Constructors Constructor Description TagAPI(ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateTags(Reference reference, String... tags)Add a new set of tags to the object.voidcreateTags(Reference reference, Collection<String> tags)Add a new set of tags to the object.List<TagCount>getTagsOnApp(int appId)Returns the tags on the given app.List<TagCount>getTagsOnApp(int appId, int limit, String text)Returns the tags on the given app.List<TagCount>getTagsOnApp(int appId, Map<String,String> options)Returns the tags on the given app.List<TagReference>getTagsOnAppWithText(int appId, String text)Returns the objects that are tagged with the given text on the app.List<TagCount>getTagsOnOrg(int orgId)Returns the tags on the given org.List<TagCount>getTagsOnOrg(int orgId, int limit, String text)Returns the tags on the given org.List<TagCount>getTagsOnOrg(int orgId, Map<String,String> options)Returns the tags on the given org.List<TagReference>getTagsOnOrgWithText(int orgId, String text)Returns the objects that are tagged with the given text on the org.List<TagCount>getTagsOnSpace(int spaceId)Returns the tags on the given space.List<TagCount>getTagsOnSpace(int spaceId, int limit, String text)Returns the tags on the given space.List<TagCount>getTagsOnSpace(int spaceId, Map<String,String> options)Returns the tags on the given space.List<TagReference>getTagsOnSpaceWithText(int spaceId, String text)Returns the objects that are tagged with the given text on the space.voidremoveTag(Reference reference, String tag)Removes a single tag from an object.voidupdateTags(Reference reference, String... tags)Update the tags on the objectsvoidupdateTags(Reference reference, Collection<String> tags)Update the tags on the objects-
Methods inherited from class com.podio.BaseAPI
getResourceFactory
-
-
-
-
Constructor Detail
-
TagAPI
public TagAPI(ResourceFactory resourceFactory)
-
-
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 totags- 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 totags- 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 ontags- 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 ontags- 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 fromtag- 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 fromlimit- 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 fromoptions- 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 fromlimit- 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 fromoptions- 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 fromlimit- 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 withintext- 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 withintext- 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 withintext- The tag to search for- Returns:
- The list of objects in the space that have the given tag
-
-