Help with smugmug.categories.create
dilbert
Registered Users Posts: 8 Beginner grinner
I am trying to use smugmug.categories.create and smugmug.subcategories.create with XMLPRC::Lite and perl and neither one is working.
Currently I am able to login.withPassword and get albums, categories and subcategories, and create albums.
However, neither of the above calls seem to work, the categories.create creates categories with blank names, and the subcategories.create doesn't seem to do anything. I can't seem to get a result from either call. Below is the perl code for each that I am using:
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.categories.create', $sessionid, "SomeCategory")
-> result;
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.subcategories.create', $sessionid, "SomeSubCategory", 0)
-> result;
This is the album create and it does work:
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.albums.create', $sessionid, $name, $category_id)
-> result;
Currently I am able to login.withPassword and get albums, categories and subcategories, and create albums.
However, neither of the above calls seem to work, the categories.create creates categories with blank names, and the subcategories.create doesn't seem to do anything. I can't seem to get a result from either call. Below is the perl code for each that I am using:
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.categories.create', $sessionid, "SomeCategory")
-> result;
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.subcategories.create', $sessionid, "SomeSubCategory", 0)
-> result;
This is the album create and it does work:
my $picresult = XMLRPC::Lite
-> proxy($proxyurl)
-> call('smugmug.albums.create', $sessionid, $name, $category_id)
-> result;
0
Comments
here is a dump of the xml etc. I removed sessionid for security reasons, and added newline to <methodCall> section for readability, otherwise unchanged:
POST http://api.smugmug.com/hack/xmlrpc/
Accept: text/xml
Accept: multipart/*
Content-Length: 319
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>smugmug.subcategories.create</methodName>
<params>
<param>
<value>
<string>my_session_id_removed</string>
</value>
</param>
<param>
<value>
<string>SomeSubCategory</string>
</value>
</param>
<param>
<value>
<int>0</int>
</value>
</param>
</params>
</methodCall>
HTTP/1.1 200 OK
Cache-Control: private, max-age=1, must-revalidate
Date: Sat, 07 May 2005 06:55:46 GMT
Pragma:
Accept-Ranges: bytes
Server: Apache
Content-Type: text/xml
Client-Date: Sat, 07 May 2005 06:53:56 GMT
Client-Peer: 63.81.134.23:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Set-Cookie: SMSESS=removed; path=/; domain=.smugmug.com
X-Powered-By: smugmug/1.1.0
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<params>
<param>
<value>
<string/>
</value>
</param>
</params>
</methodResponse>