code: public GalleryList getList(String userId, int perPage, int page, EnumSet<JinxConstants.PhotoExtras> extras) throws JinxException {
      JinxUtils.validateParams(userId);
      Map<String, String> params = new TreeMap<>();
      params.put("method", "flickr.galleries.getList");
      params.put("user_id", userId);
      if (perPage > 0) {
        params.put("per_page", Integer.toString(perPage));
      }
      if (page > 0) {
        params.put("page", Integer.toString(page));
      }
      if (!JinxUtils.isNullOrEmpty(extras)) {
        params.put("primary_photo_extras", JinxUtils.buildCommaDelimitedList(extras));
      }
      return jinx.flickrGet(params, GalleryList.class);
    }
docs: Return the list of galleries created by a user. Sorted from newest to oldest.
  <br>
  This method does not require authentication.
  
  @param userId  Required. The NSID of the user to get a galleries list for. If none is specified, the calling user is assumed.
  @param perPage Optional. Number of galleries to return per page. If this argument is &le;= 0, it defaults to 100. The maximum allowed value is 500.
  @param page    Optional. The page of results to return. If this argument is &le;= 0, it defaults to 1.
  @param extras  Optional. Extra information to fetch for the primary photo.
  @return list of galleries for the user.
  @throws JinxException if required parameters are null or empty, or if there are any errors.
  @see <a href="https://www.flickr.com/services/api/flickr.galleries.getList.html">flickr.galleries.getList</a>