[dev] Ansel Gallery IDs vs. Names

Ben Klang ben at alkaloid.net
Wed Feb 20 16:07:34 UTC 2008


On Feb 20, 2008, at 10:49 AM, Michael Rubinsky wrote:

>
> | So I'm stuck.  I think it's clear that the galleryExists() API
> | documentation needs to be amended to reference the gallery ID  
> instead
> | of a name.  But does it cause any problems to restore the old API
> | functionality of allowing the gallery ID to be specified via the API
> | rather than forcing a random ID?  Why was this option removed?
>
> Unfortunately, that's not possible since the gallery id is the key for
> the gallery in the gallery table.
>
> Maybe if you outline your specific needs/use case we can work to  
> get the
> ~ functionality you need into the current api structure...
>
What I'm doing is creating a module for social networking.  One of  
the features is to allow per-user photo galleries.  It occurs to me  
that perhaps instead of gallery IDs I can now use the gallery slugs.   
I need two functions basically:

1) Check whether a gallery already exists for this particular user  
($app is set to the profiles app and not Ansel so it should be a  
private set of galleries)
2) If the gallery is determined not to exist, automatically create a  
gallery for the user.

Perhaps slugs are the best way to check this?  If so I would need to  
modify the API call to check gallery existence by slug.  I don't  
think that the galleryExists() method as it functions today (by  
internal gallery ID) is very useful.

/BAK/


More information about the dev mailing list