Skip navigation
hibou38
Currently Being Moderated

deletePublishedCollection : No info.photoIds

Feb 26, 2012 6:50 AM

Hello,

 

I'm trying to use deletePublishedCollection function.

 

However i don't retrieve  info.photoIds . I have always nil in this element of info structure.

 

I did'nt retrieve in the documentation that this element of structure exist. But all examples are using it ???

 

I don't understand.

 

Do I do initialize something when I did the export as i did it to retrieve info.remoteId ? 

 

some help will be pleasant

 

The code I copyed from sample (ZenPhoto/Flicker) isbelow  (I reduced in maximum the function and delte all test. But I never go inside the 'for' loop)

 

function publishServiceProvider.deletePublishedCollection( publishSettings, info )

import 'LrFunctionContext'.callWithContext( 'publishServiceProvider.deletePublishedCollection', function( context )

   

        local progressScope = LrDialogs.showModalProgressDialog {

                            title = LOC( "$$$/Chouette38/DeletingCollectionAndContents=Deleting photoset ^[^1^]", info.name ),

                            functionContext = context }

                           

            for i, photoId in ipairs( info.photoIds ) do

                Chouette38API.deletePhoto( publishSettings, { photoId = photoId } )

            end

        end )

end

 
Replies
  • Currently Being Moderated
    Feb 26, 2012 3:01 PM   in reply to hibou38

    Hi,

     

    If you look at the documentation for the deletePublishedCollection() callback you are using, the info table does not contain a photoIds field.

     

    To get the list of images you are looking for I think you will need to use something like:

         info.publishedCollection:getPhotos()

    or

         info.publishedCollection:getPublishedPhotos()

     

    Matt

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 6:35 PM   in reply to hibou38

    info.publishedCollection:getPublishedPhotos() returns an array of LrPublishedPhoto.  publishedPhoto:getRemoteId() returns the remote id.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 2, 2012 7:19 PM   in reply to hibou38

    Hi,

     

    John has answered question 2. As to question 1, that looks like an error in

    the sample code. Hopefully it will be fixed soon.

     

    Thanks, Matt

    (Apologies for the brevity - sent from my Android)

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points