code: public GroupSearch getGroups(int page, int perPage) throws JinxException {
      Map<String, String> params = new TreeMap<>();
      params.put("method", "flickr.groups.pools.getGroups");
      if (page > 0) {
        params.put("page", Integer.toString(page));
      }
      if (perPage > 0) {
        params.put("per_page", Integer.toString(perPage));
      }
      return jinx.flickrGet(params, GroupSearch.class);
    }
docs: Returns a list of groups to which you can add photos.
  <br>
  This method requires authentication with 'read' permission.
  
  @param page    The page of results to return. If this argument is less than 1, it defaults to 1.
  @param perPage Number of groups to return per page. If this argument is less than 1, it defaults to 400. The maximum allowed value is 400.
  @return object with the groups to which you can add photos.
  @throws JinxException if there are any errors.
  @see <a href="https://www.flickr.com/services/api/flickr.groups.pools.getGroups.html">flickr.groups.pools.getGroups</a>