JAVA API - uploadSlideshow(...) parametr problem

18 views
Skip to first unread message

Mike

unread,
Dec 22, 2008, 3:14:38 PM12/22/08
to SlideShare Developers
Hi,
I have a problem with uploading a presentation via JAVA API.
Here is source code:

SlideShareAPI ssapi = SlideShareAPIFactory.getSlideShareAPI (apiKey,
sharedSecret);

ssapi = uploadSlideshow (username, password, title, srcFile,
description, tags, boolean MAKE_SRC_PUBLIC, ..... );


MAKE_SRC_PUBLIC - Should be true if you want users to be able to
download the ppt file later.

Uploading is ok but problem is the parametr MAKE_SRC_PUBLIC.
It doesn't seems to be function. Even though MAKE_SRC_PUBLIC = FALSE
users are still able to download the ppt file.

Can be the problem on the server side?

PS: Sorry for my English ;-)


Gee Chuang

unread,
Dec 22, 2008, 3:18:04 PM12/22/08
to SlideShare Developers

Hi Mike,

In our documentation (http://www.slideshare.net/developers/
documentation), it notes that make_src_public should be set to either
'Y' or 'N' ('Y' is the default).

Instead of make_src_public = false, please try make_src_public='N'.

Let me know if you still have problems.

Thanks
Gee

Mike

unread,
Dec 22, 2008, 3:51:08 PM12/22/08
to SlideShare Developers
He Gee,

I'm not allowed to use - char make_src_public = 'N', because the java
API function
uploadSlideshow() needs boolean value.

Gee Chuang

unread,
Dec 22, 2008, 3:58:13 PM12/22/08
to SlideShare Developers

Hi Mike,

Unfortunately the Java API was not written by us, and is not
immediately supported by us.

It shouldn't be too difficult to modify the implementation to suit
your needs. In SlideShareAPIImpl.java:153, you see the parameter
being set:

addParameter(parameters, "make_src_public", makeSrcPublic);

Instead of using makeSrcPublic directly, you might want to convert it
from bool to 'Y'/'N'.

Thanks
Gee

Mike

unread,
Dec 22, 2008, 5:11:45 PM12/22/08
to SlideShare Developers
Hi Gee,

I'm sorry, I should have had a look at the implementation.

In SlideShareAPIImpl.java.153 the parameter is being set:

addParameter(parameters, "make_src_public", makeSrcPublic);

In the same file at line 182 this function is declared:

private Map<String, String> addParameter(Map<String, String>
parameters,
String name, boolean value) {

parameters.put(name, value ? "Y" : "N");
return parameters;
}

So "N"/"Y" is used. I know, it's not char but String.

But the other parameters (make_slideshow_private,
generate_secret_url, ...) work
in the same way and all is OK. So I suppose that on the server side
all these parameters
are accepted in the same way too. Or Am I wrong?

Thank you
Mike

Lucio Benfante

unread,
Dec 22, 2008, 10:15:52 PM12/22/08
to slideshare...@googlegroups.com
Hi,
I'm the implementer of the JSlideShare API.

Yes, The parameters are setted following the SlideShare API...so I think it's a server side problem, not an API problem. If you discover I'm wrong, please advice me and I will correct the problem with a new version of the Java API.

Kind regards,
  Lucio

Mike ha scritto:
-- 
Lucio Benfante
JUG Padova           http://www.parancoe.org ...have a look at it!
www.jugpadova.it     http://www.jugevents.org

Gee Chuang

unread,
Jan 2, 2009, 8:47:35 PM1/2/09
to SlideShare Developers

Hi Mike, Lucio,

Sorry about the delayed response.. the holidays have been very busy
here at SlideShare!

I just checked out our API and I believe it may be our problem... I've
put out a fix, so please let me know if it works now. No changes need
to be made to the JSlideShare API.

Lucio, for my info, do you know if the make_src_public parameter had
ever been working for you? I'd be very surprised if it did.

Thanks for using the SlideShare API!
Gee


On Dec 22 2008, 7:15 pm, Lucio Benfante <lucio.benfa...@gmail.com>
wrote:

Lucio Benfante

unread,
Jan 2, 2009, 10:54:53 PM1/2/09
to slideshare...@googlegroups.com
Gee Chuang ha scritto:

> Lucio, for my info, do you know if the make_src_public parameter had
> ever been working for you? I'd be very surprised if it did.
>

Hi Gee,
I don't know. I think I never really tested the effects of that part
because I never used that feature of the SlideShare API for my own projects.

Surely I tested the correctness of the XML messages that are sent and
returned, but not the real effect on the SlideShare server side.

Lucio

--
Lucio Benfante

Reply all
Reply to author
Forward
Message has been deleted
0 new messages