Menu

#10 Adding Signature To People Upload Status

open
nobody
None
5
2008-08-30
2008-08-30
Matt
No

I was received errors regarding an invalid sig when trying to get upload status.. Looked and the code, added a signature parameters, and the code is working now. Suggest you add the below.

sh-3.2# cvs diff -u8p PeopleInterface.java
Index: PeopleInterface.java
===================================================================
RCS file: /cvsroot/flickrj/api/src/com/aetrion/flickr/people/PeopleInterface.java,v
retrieving revision 1.25
diff -u -8 -p -r1.25 PeopleInterface.java
--- PeopleInterface.java 5 Jul 2008 22:16:22 -0000 1.25
+++ PeopleInterface.java 30 Aug 2008 23:17:45 -0000
@@ -281,16 +281,23 @@ public class PeopleInterface {
* @throws IOException
* @throws SAXException
* @throws FlickrException
*/
public User getUploadStatus() throws IOException, SAXException, FlickrException {
List parameters = new ArrayList();
parameters.add(new Parameter("method", METHOD_GET_UPLOAD_STATUS));
parameters.add(new Parameter("api_key", apiKey));
+ parameters.add(
+ new Parameter(
+ "api_sig",
+ AuthUtilities.getSignature(sharedSecret, parameters)
+ )
+ );
+

Response response = transportAPI.get(transportAPI.getPath(), parameters);
if (response.isError()) {
throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
}
Element userElement = response.getPayload();
User user = new User();
user.setId(userElement.getAttribute("id"));

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.