code: public Response editPhotos(String galleryId, String primaryPhotoId, List<String> photoIds) throws JinxException {
      JinxUtils.validateParams(galleryId, primaryPhotoId, photoIds);
      Map<String, String> params = new TreeMap<>();
      params.put("method", "flickr.galleries.editPhotos");
      params.put("gallery_id", galleryId);
      params.put("primary_photo_id", primaryPhotoId);
      params.put("photo_ids", JinxUtils.buildCommaDelimitedList(photoIds));
      return jinx.flickrPost(params, Response.class);
    }
docs: Modify the photos in a gallery. Use this method to add, remove and re-order photos.
  <br>
  This method requires authentication with 'write' permission.
  
  @param galleryId      Required. The id of the gallery to modify. The gallery must belong to the calling user.
  @param primaryPhotoId Required. The id of the photo to use as the 'primary' photo for the gallery. This id must also be passed along in photo_ids list argument.
  @param photoIds       Required. A list of photo ids to include in the gallery. They will appear in the set in the order sent. This list must contain the primary photo id. This list of photos replaces the existing list.
  @return object with response from Flickr indicating ok or fail.
  @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.editPhotos.html">flickr.galleries.editPhotos</a>