Announcement

  •  » Requests
  •  » API Request - 2 of 2 - Assign Groups and Users to Albums

#1 2013-03-11 16:33:47

kenl
Member
2013-01-12
91

API Request - 2 of 2 - Assign Groups and Users to Albums

Hello,

Can you provide an API to "assign groups and users to albums"?  I would like to invoke this after using my tool to upload albums to Piwigo.

Thanks,
KenL

Offline

 

#2 2013-03-12 09:20:38

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Hi kenl,

It's a bit complicated because it also means that Piwigo API has to list users and groups and current permissions of any album.

Are you sure you want to manage album permissions remotely?

Offline

 

#3 2013-03-12 15:30:42

kenl
Member
2013-01-12
91

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Thanks for the reply.  Well, Yes! 

In my view, it is better for Piwigo to have as much of a complete API set as possible.  (This includes documentation of the supported API set.)

KenL

plg wrote:

Hi kenl,

It's a bit complicated because it also means that Piwigo API has to list users and groups and current permissions of any album.

Are you sure you want to manage album permissions remotely?

Offline

 

#4 2013-03-14 11:32:47

flop25
Piwigo Team
2006-07-06
7037

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

The Doc for the API is directly in yourpiwigo/tools/ws.htm . About completing the API, my point of view is that an API is not a copy of all the administration tasks Further more, as plg said, it can be technically complex


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2013-03-14 15:43:56

kenl
Member
2013-01-12
91

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Hello flop,

Thanks for the reply.  Yes, ws.htm is wonderful!  I found it very helpful.  What would be great would be to have documentation of this detail for all APIs - http://piwigo.org/doc/doku.php?id=dev:w … .addsimple

As far as technical complexity goes, I guess I can not comment.  I have been doing software development for so long that perhaps my viewpoint is biased.  Specifically, I don't see parsing lists of user/groups as very complex.  But, I leave it for you and other admins to decide.

KenL

flop25 wrote:

The Doc for the API is directly in yourpiwigo/tools/ws.htm . About completing the API, my point of view is that an API is not a copy of all the administration tasks Further more, as plg said, it can be technically complex

Offline

 

#6 2013-07-15 17:14:43

chrisa
Member
2013-06-08
11

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Hi

Thanks for piwigo - it's great!

We want to add piwigo as a module to our web app, providing the user with a single sign on experience.  The web app manages users and permissions and to keep user management in one place, we'd need to create & delete users on piwigo through the API.  We'd also need to create groups and assign them to albums as well as assign users to groups.  (We'd be hosting our own copy of piwigo).

I've taken a look at the API code and due to it's clean design, it should be reasonably easy for me to make the required changes.

Also, I see the term 'categories' is now replaced by 'albums'.  Will you be deprecating this term in the API any time soon?  As part of my changes, I'd like to rename the API terms containing 'category' and replace them with 'album'  (even if the underlying tables in the database still use 'category').  For backwards compatibility, I'd keep a copy of the 'category' API methods and point them to the new album functions with a note in the API comment that these will be deprecated.

Going forward, as new piwigo versions come out, we wouldn't want to be faced with having to integrate our changes every time.  We'd also like to contribute to your wonderful product. 

I'd be interested in any comments you have on my proposed changes as well as how I can go about submitting my new code to your code base.  I won't have the time to contribute on a regular basis so if I could forego the SVN song and dance, I'd appreciate it.  Is there someone on the project I could email my changes to, that would take responsibility for testing them and ensuring they ultimately get into the trunk code?

Regards
Chris

Offline

 

#7 2013-07-15 17:26:39

flop25
Piwigo Team
2006-07-06
7037

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Hi
We don't really want to extend the api this way. It would be better to you to write a plugin which add the wanted api functions /call


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2013-07-15 17:28:12

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

chrisa wrote:

Also, I see the term 'categories' is now replaced by 'albums'.  Will you be deprecating this term in the API any time soon?

It's not planned.

Personnaly I'm not favorable, an unknow number of tools and websites work with the API and I don't want tens of user asking for help.
Additionally the software pLoader (highly used) uses these methods are there is nobody to update it.

Finally, I don't see the interest, everywhere in the code we talk about "category" (even when I code new plugins I use "category"), "album" is just the text displayed

Offline

 

#9 2013-07-15 18:44:38

chrisa
Member
2013-06-08
11

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

flop25 wrote:

Hi
We don't really want to extend the api this way. It would be better to you to write a plugin which add the wanted api functions /call

Thanks for your fast responses!

I didn't know that plug-ins were capable of changing the API.  I've taken a quick look at your docs on writing a plug-in.

What would really help a lot is an example of a plug-in that updates the API.  Do you know of one that does this?

(BTW, it took me a while to figure out that 'albums' are actually 'categories'.  It's not an intuitive conclusion and only once I searched the forum, did I find a post that stated this.  I imagine it would be confusing to other users too).

Offline

 

#10 2013-07-15 18:54:57

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Offline

 

#11 2013-07-15 19:26:27

flop25
Piwigo Team
2006-07-06
7037

Re: API Request - 2 of 2 - Assign Groups and Users to Albums

Check out the plugin mistic100 just provided

And the categories has been quite recently renamed in albums


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 
  •  » Requests
  •  » API Request - 2 of 2 - Assign Groups and Users to Albums

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact