forum.coppermine-gallery.net

No Support => Modifications/Add-Ons/Hacks => Mods: content syndication (cpmFetch) => Topic started by: Aditya Mooley on April 19, 2005, 08:24:37 am

Title: CPG Remote Access API V 0.3
Post by: Aditya Mooley on April 19, 2005, 08:24:37 am
To satisfy the demand of desktop client writers we have hacked a Remote Access API for Coppermine 1.4.x which is very loosely modeled on the Flickr API (in terms of responses etc).

Currently only two methods have been implemented to
#1 Upload a picture
#2 Get Category and Album list with IDs

A PHP client is provided as an example for the devs BUT it is expected that we will soon see desktop clients which can post to pictures directly to your Coppermine install

Read the README to get started :)

[Edit]
We have released a new version with some minor bug fixes.
[/Edit]

[Edit April 20, 2006]
Version 0.4
There was a bug in the debugging module of API. It is now fixed in this version.
[/Edit]

[Edit April 18, 2006]
More changes: Version 0.3
* Allows normal users to upload photos. Reads the User Galleries properly while listing the categories and albums.
* User uploads respects the quotas allocated to them.
[/Edit]
Title: Re: CPG Remote Access API V 0.1
Post by: willdenniss on April 20, 2005, 05:30:58 am
Thanks for adding this feature, I can see how it works and it is certainly possible to utilise this in Gallery Mage (http://tanksoftware.com/gallmage/).

Before I commit the time to adding this feature, are there plans to add information about these tools in the Coppermine documentation?  I'm willing to author some text if that is all that's needed.  I ask because currently there are few Gallery Mage users who are using Coppermine.  Adding this feature will make Gallery Mage much more useful to Coppermine users than it currently is, but unless Coppermine users know about the existance of the tool, there is little point in me improving it for them.

Cheers,

Will.
Title: Re: CPG Remote Access API V 0.1
Post by: Aditya Mooley on April 20, 2005, 07:00:58 am
This is an add-on atleast for CPG 1.4.x but if you author a few paragraph we will add it in the documentation as appropriate.
Title: Re: CPG Remote Access API V 0.1
Post by: Tarique Sani on April 20, 2005, 08:54:51 am
and like we have said in the README your code will me more or less future proof even for later version - So you can code and be free of worries :)
Title: Re: CPG Remote Access API V 0.1
Post by: willdenniss on April 21, 2005, 10:23:17 am
ok, sounds good.

I've found an API that should make the task of submitting data via post fairly easy.  It's then just a matter getting a list of galleries so the user can pick which one to upload to.

I'll put this on my TODO list.  If there are people now who want this support, make sure you let me know and I'll bump it up the list.

Thanks,

Will.
Title: Re: CPG Remote Access API V 0.1
Post by: Tarique Sani on May 02, 2005, 09:54:11 am
Most people do not know what Gallery mage will do for their Coppermine when used in addition with the new API... Seems like a chicken and egg situation.

Some of the uses of new API can be

#1 Desktop Upload Client (obvious)
#2 Replicate and keep in Sync a Coppermine Installation with your desktop archieve (the Categories can Albums can be folders in the local system)
#3 Create funky screen savers showing latest pictures from a Coppermine install.
#4 Create Flash based frontends...
#5 Create all kinds of remote access Kool stuff - eg: cpmFetch based on a single API - this frees the application developer from maintaining / writing the access libraries
Title: Re: CPG Remote Access API V 0.1
Post by: sigepjedi on January 03, 2006, 09:52:27 pm
have any updates been made to this, or the available methods"?
Title: Re: CPG Remote Access API V 0.1
Post by: Tarique Sani on January 04, 2006, 08:01:20 am
Interest has been very low on this one, hence no further work was done - what methods would you like to see?
Title: Re: CPG Remote Access API V 0.3
Post by: r_f_o_t on April 23, 2006, 11:49:50 pm
Hello,

Silly question. Where does the API get installed? There is no README in the tarball.

Thanks

Chuck
Title: Re: CPG Remote Access API V 0.3
Post by: r_f_o_t on April 24, 2006, 02:44:08 am
OK, after some trial and error, figured it out. Just install it someplace in cpg directory, then point koppemine to that directory.

Chuck
Title: Re: CPG Remote Access API V 0.3
Post by: eric.com.my on May 15, 2006, 03:15:23 pm
OK, after some trial and error, figured it out. Just install it someplace in cpg directory, then point koppemine to that directory.

Chuck

May I know how can I do that?

Thank you.
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on May 16, 2006, 07:14:27 am
Download the tarball from the first post, untar in your Coppermine's root directory.
Now, in Koppermine's Host URL use this format -> http://mydomain.com/cpgIntallation/api/index.php
Title: Re: CPG Remote Access API V 0.3
Post by: ve.ru on June 08, 2006, 10:14:56 pm
Is there an ongoing development on this feature? I am just interested if it is possible to create a new album via this API.
Title: Re: CPG Remote Access API V 0.3
Post by: jonplqs on July 24, 2006, 07:33:41 pm
Download the tarball from the first post, untar in your Coppermine's root directory.
Now, in Koppermine's Host URL use this format -> http://mydomain.com/cpgIntallation/api/index.php

Hi when i try to install I got this error. 

 <?xml version="1.0" encoding="utf-8" ?>
- <cpg>
  <status>fail</status>
  <error>100</error>
  <verbose>Invalid function name passed</verbose>
  </cpg>

Thanks
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on July 25, 2006, 07:01:16 am
Is there an ongoing development on this feature? I am just interested if it is possible to create a new album via this API.
Currently it is not possible to create new albums via API. But we are considering this option and you may see it in next release.
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on July 25, 2006, 07:05:34 am
@jonplqs
Are you trying to access the API through your browser? API's cannnot be accessed directly. You need API client like Koppermine (http://koppermine.sourceforge.net/wikka.php?wakka=Koppermine) which allows you to upload/rotate/resize your image directly from your desktop.
Title: Re: CPG Remote Access API V 0.3
Post by: jonplqs on July 25, 2006, 07:25:31 pm
ok thanks a lot.
Title: Re: CPG Remote Access API V 0.3
Post by: pax on January 06, 2007, 12:33:19 pm
Currently it is not possible to create new albums via API. But we are considering this option and you may see it in next release.

I'll add my vote to that suggestion :)
Title: Re: CPG Remote Access API V 0.3
Post by: gmichels on January 09, 2007, 05:33:26 pm
I really don't know what's wrong, but I can't have Koppermine working. My settings and the error after trying to refresh the album list.

(http://i16.tinypic.com/2uygd3s.png)

I'm using Coppermine 1.4.9. Any ideas?

Thanks!
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on January 11, 2007, 05:56:51 pm
Please post all the Koppermine related problems on Koppermine's support forum sf.net
Also provide more details like which KDE version are you using and flavor of Linux.
Title: Re: CPG Remote Access API V 0.3
Post by: Deus on January 22, 2007, 02:35:21 pm
Hi Aditya, how are you and Abbas? I hope you are both well.

I have an installation question, where do I install this mod? I cannot install it in the root because the index.php would be overwritten with the one from the mod.
Is there a way of integrating the mod into the default index.php in the root or does is need to be installed elsewhere?
Thankyou.
Deus.
Title: Re: CPG Remote Access API V 0.3
Post by: Nibbler on January 22, 2007, 02:53:29 pm
You extract the file into a subdir of your Coppermine directory, such as api.
Title: Re: CPG Remote Access API V 0.3
Post by: Deus on January 22, 2007, 06:04:34 pm
Hey Nibbler, yeah, got it working, not really anything to do other than extract into it's own folder is there :D

I've got a programmer working on an executable that uploads to my site using this API, I'm wondering if there is a way to get the users album numbers because the form.htm he's working on requires the album ID. Now I know what it is, and so do a lot of other people, but there will be some who will never figure it out. I just wondered if there is a way to simplifie the process for these users?

He's damn good at coding so he might figure it out himself, but I thought i'd ask the question and see if there's an answer already.

Thanks in advance,
Deus.
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on January 23, 2007, 06:07:06 am
When you make an API call to get the album list, an XML is returned by the server which contains the names and id's of albums and categories. Once you have that XML, loop through it and get the desired album's id.
API call for getting album/cat list is "cpgAPI.catList"
Title: Re: CPG Remote Access API V 0.3
Post by: Deus on January 23, 2007, 08:47:23 am
I shall pass this on, thankyou Aditya.
Title: Re: CPG Remote Access API V 0.3
Post by: KurtAlden on January 24, 2007, 05:58:07 pm
Hey there

Is there any plans for adding functionality to overwrite an existing picture? I'm writing an app to generate and upload images that are used as forum sigs - the sigs are changed by the users pretty frequently - however, when they upload via my app to their gallery, it add the sig as a new image, meaning the url to that image would change every time, meaning they'd have to modify the url to their sig on all the boards they visit every time they upload. What I really want is for them to be able to overwrite their existing sig with the newer version (the sig contains game stats and they change frequently) instead of adding a new file.

Is this possible / in progress / easily hackable?

Thanks

Title: Re: CPG Remote Access API V 0.3
Post by: Nibbler on January 24, 2007, 07:07:20 pm
What does this have to do with the API?

I have already written a plugin to do this, check the plugin contributions section.
Title: Re: CPG Remote Access API V 0.3
Post by: KurtAlden on January 25, 2007, 10:03:13 am
What does this have to do with the API?

I'm using the API to upload and this is a function I cannot find in the API, hence the post.

I have already written a plugin to do this, check the plugin contributions section.

Oh ok - I've looked in there but can't find the plugin - would you be kind enough to give me the url please?
Title: Re: CPG Remote Access API V 0.3
Post by: Nibbler on January 25, 2007, 12:31:04 pm
http://forum.coppermine-gallery.net/index.php?topic=21193.0
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on August 07, 2007, 09:06:16 pm
Hi all!

i'm using API (installed from tarball posted by Aditya) and writing client using C++.

so, files upload successfully on a server, but i have error: "Error in Inserting or Resizing image"
i was check out file, all is okay, it's a valid Jpeg/Gif.... but i still have this error :(

help me, what i can do for fix this problem?

PS: sorry for my English... it's poor  ::) :-[

Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on August 08, 2007, 06:53:22 am
Thanks for your efforts. BUT this API will soon become history and will be replaced with a complete and better API. So I would suggest you to wait till the mid of next month and then program your client according to new API specs.

Regarding your error, are you able to upload the same file by using coppermine's upload method?
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on August 08, 2007, 07:58:37 am
thanks for you attention!  :)

if i upload files using my Browser (IE, FF or Opera) then all is okay...

so, i insert debug in some files of current API... API can't create thumbnail :( on this opeartion function resize_image return FALSE :(

but, how it's possible? through browser - okay, and same POST request, with same fields, with same data.... and bad result :((
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on August 08, 2007, 09:43:16 am
hmmm. The API is unattained for sometime now. So it might not be compatible to the latest CPG version. As I said above, we will soon have a new API so I strongly suggest to stop working with old API for now and write your client for new API once it goes LIVE.
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on August 08, 2007, 09:50:50 am
okay. Thanks for your attention again, Aditya! :)

PS: my Coppermine version is 1.4.10 (Stable) and API v. 0.3
Title: Re: CPG Remote Access API V 0.3
Post by: Joachim Müller on August 09, 2007, 07:26:38 am
Most recent stable release is cpg1.4.12, upgrading is mandatory for security reasons.
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on August 09, 2007, 07:31:24 am
thanks GauGau!

Aditya, problem was found - GD (on my server) can't find and change images by relative path, it's fixed. Now is no problems ;)

PS: so, i'll wait for new REmote Access API :)

Thanks a lot!
Title: Re: CPG Remote Access API V 0.3
Post by: maurosirigu on August 24, 2007, 12:43:08 am
Hi, i'd like to use Koppermine to upload my photos from my Linux partition. Could you tell me if it's possible to have a Koppermine version (and Coppermine API) good for coppermine v1.3.2? I'm very very lazy, and would prefer not to upgrade the entire photogallery ( ??? could the upgrading be  dangerous for my pics database?) Thanks....
Mauro
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on August 24, 2007, 06:55:33 am
I am lazy as well to check with unsupported versions So just install koppermine and check whether it works. If not then only alternative is to upgrade. Upgrade won't affect your pics database if you follow the instructions properly.
Title: Re: CPG Remote Access API V 0.3
Post by: Joachim Müller on August 24, 2007, 08:52:33 am
coppermine v1.3.2? I'm very very lazy, and would prefer not to upgrade the entire photogallery
This is not a question of laziness - cpg1.3.x has got severe security vulnerabilities. Wether to upgrade or not is not a matter of taste. It is absolutely mandatory to upgrade no matter what.
Support for cpg1.3.x has been abandoned long ago, so you're not allowed to post questions related to cpg1.3.x except matters of upgrading. This mod is clearly marked for cpg1.4.x - asking questions about another, unsupported version is showing disrespect of board rules. Do not clutter threads with such discussions.

Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on December 20, 2007, 12:06:20 pm
Hi All!

What's about new version API? is it released?  :)
Title: Re: CPG Remote Access API V 0.3
Post by: Aditya Mooley on December 20, 2007, 12:28:09 pm
Not yet. We may release it with 1.5 and there's no date for 1.5's release yet :)
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on December 20, 2007, 12:32:48 pm
so, and what you may release it with 1.5 is not strong too?  ;D
Title: Re: CPG Remote Access API V 0.3
Post by: Joachim Müller on December 21, 2007, 08:36:18 am
The term "new" is a bit vague. If you refer to cpg1.5.x, then no: the API designed during the GSoC 2007 has not been released in a package nor documentation-wise, although it is publicly accessible by checking out the subversion repository. If you refer to cpg1.4.x, then yes: the API exists and has been released (it ships with the package), however there is only little documentation available.
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on December 21, 2007, 08:58:06 am
I just asked about "new" API. Aditya said (in August 08):
Quote
Thanks for your efforts. BUT this API will soon become history and will be replaced with a complete and better API. So I would suggest you to wait till the mid of next month and then program your client according to new API specs.

and I just curious about this :)

Thanks!

WBR, Anton.
Title: Re: CPG Remote Access API V 0.3
Post by: Joachim Müller on December 21, 2007, 09:23:00 am
There is no point in this speculation: the devs are not sure wether the new api will go into cpg1.5.x or not. Currently, the cpg1.5.x projected has two branches: the main one under development (the trunk) and the one that was designed during GSoC2007 that yet needs to be merged with the trunk. The only point of adding an improved API would be the additional benefit: if there is no benefit, we won't add it. Currently, the API exists in a rough stage, but neither the coppermine core code makes use of it, nor are there any external programs that make use of the API (not even a demonstration).
We (the coppermine devs) are willing to integrate the new API before the release of cpg1.5.x, but we're not sure if this will happen in time.
Bottom line: we can't give you any news on this that are worth mentioning in terms of coding coppermine add-ons.
Title: Re: CPG Remote Access API V 0.3
Post by: WatchDog on December 21, 2007, 09:27:07 am
okay. Thanks a lot!

WBR, Anton.
Title: Re: CPG Remote Access API V 0.3
Post by: stwf on February 11, 2008, 05:30:29 pm
Hi,

Just so you know. I'm a Coppermine user/fan and I'm developing a Mac photo app and I'd like it to integrate with Coppermine. I will support the  current API as best I can. It's difficult to find the docs at all (even sparse ones would be a help). Any links would be appreciated.

From what I've reade it doesn't let you creare folders. That would be one feature I'd like to see. Its a common practice, when returning to vacation to upload a bunch of pics into a new folder. So this would be a needed feature for a desktop front end to be really useful.

Thanks
steve
Title: Re: CPG Remote Access API V 0.3
Post by: Joachim Müller on February 12, 2008, 08:19:10 am
The API will be completely overhauled for cpg1.5.x, so if you're starting a fresh work I suggest looking into the future release cpg1.5.x. For a start, please perform a checkout of the cpg1.5.x trunk of the subversion repository. Alas, there is still little documentation available.