code: public void editPhotos(String photosetId, String primaryPhotoId, String[] photoIds) throws FlickrException {
          Map<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("method", METHOD_EDIT_PHOTOS);
  
          parameters.put("photoset_id", photosetId);
          parameters.put("primary_photo_id", primaryPhotoId);
          parameters.put("photo_ids", StringUtilities.join(photoIds, ","));
  
          Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
          if (response.isError()) {
              throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
          }
      }
docs: Edit which photos are in the photoset.
  
  @param photosetId
  The photoset ID
  @param primaryPhotoId
  The primary photo Id
  @param photoIds
  The photo IDs for the photos in the set
  @throws FlickrException