Hi everyone,
I would like to obtain the list of recently added albums via javascript interface. I have used the google api to query blogs and maps, but haven't seen any javascript code that connects to piwigo.
Is this possible? And if yes, are there any examples to follow, or guides?
Thanks
Norbert
Offline
Hello
it is called an API, and for Piwigo we've called it WebServices. Doc, Skeleton plugin, forum, tool/ws.html... many info around there
Offline
Hi Flop25,
thanks for your answer, but ...
flop25 wrote:
Doc, Skeleton plugin, forum, tool/ws.html
Docs I have checked, there is a minimal example in perl and hardly any documentation.
Forum I have searched for javascript, and javascript API, without any success.
tool/ws.html I do know, but that does not help for javascript coding.
So, although you say there are many information around here, I have to disagree slightly. Surely you can convince me by providing actual links.
Anyway, I will try myself to create some javascript code and will post it at some point.
Norbert
Offline
Hi norbusan,
Take a look at admin/themes/default/template/user_list.tpl and you will find examples of javascript calls to API (search "ajax"), such as http://piwigo.org/dev/browser/branches/ … st.tpl#L56
Offline
OK so the problem is not about piwigo but on how to make ajax call
Offline
there is no Javascript API for Piwigo, only a HTTP API (actually what you call Google API is just a Javascript wrapper arround the Google HTTP API)
so you have to make requests manually
Offline
Hi
plg wrote:
Take a look at admin/themes/default/template/user_list.tpl ...
thanks for the hint to look into user_list.tlp. I finally found time to do this and managed what I wanted to do, namely display the thumbnails and titles of the latest three galleries on my front page. I have written a blog post concerning which includes the actual javascript source code if anyone is interested. Of course it is hand waving and amateur programming, but at least for me it works ;-)
Here is the link: http://www.preining.info/blog/2014/04/j … o-web-api/
Thanks a lot
Norbert
Offline