Ejemplo n.º 1
0
  /*
   * Gets a Category item assuming that tags can only have one category
   */
  public RESTCategoryV1 getCategoryByTagId(final int tagId) {
    final RESTTagV1 tag = getTagById(tagId);
    if (tag == null) return null;

    return tag.getCategories().getItems().size() > 0 ? tag.getCategories().getItems().get(0) : null;
  }