Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
popfilemodules:xmlrpc [2009/09/06 16:24] – Added APIs which has been undocumented. amatubu | popfilemodules:xmlrpc [2010/09/09 17:46] – get_buckets returns ARRAY amatubu |
---|
# | # |
| |
my $sk = $xml->call("POPFile/API.get_session_key",'admin',//); | my $sk = $xml->call("POPFile/API.get_session_key",'admin',''); |
my $key = $sk->result; | my $key = $sk->result; |
my $method = "POPFile/API.$ARGV[0]"; | my $method = "POPFile/API.$ARGV[0]"; |
print join ("\n","TRANSPORT ERROR: ", $xml->transport->status); | print join ("\n","TRANSPORT ERROR: ", $xml->transport->status); |
} else { | } else { |
print join ("\n",$res->paramsall); | if ( ref $res->paramsall eq 'ARRAY' ) { |
| print join "\n", @{$res->paramsall}; |
| } else { |
| print $res->paramsall; |
| } |
} | } |
| print "\n"; |
| |
# | # |
| |
# say hello and get a session key | # say hello and get a session key |
my $sk = $xmlrpc-> call('POPFile/API.get_session_key','admin',//) | my $sk = $xmlrpc-> call('POPFile/API.get_session_key','admin','') |
-> result; | -> result; |
| |
||get_pseudo_buckets ||<code>call('POPFile/API.get_pseudo_buckets','session_key')</code> returns an array of pseudo-bucket names ('unclassified' bucket)|| | ||get_pseudo_buckets ||<code>call('POPFile/API.get_pseudo_buckets','session_key')</code> returns an array of pseudo-bucket names ('unclassified' bucket)|| |
||get_all_buckets ||<code>call('POPFile/API.get_all_buckets','session_key')</code> returns an array of bucket names (include 'unclassified' bucket)|| | ||get_all_buckets ||<code>call('POPFile/API.get_all_buckets','session_key')</code> returns an array of bucket names (include 'unclassified' bucket)|| |
||get_is_bucket ||<code>call('POPFile/API.is_bucket','session_key', 'bucketname')</code> returns 1 if the bucketname exists, returns 0 if the bucketname does not exist, or the bucketname is a pseudo-bucket ('unclassified' bucket)|| | ||is_bucket ||<code>call('POPFile/API.is_bucket','session_key', 'bucketname')</code> returns 1 if the bucketname exists, returns 0 if the bucketname does not exist, or the bucketname is a pseudo-bucket ('unclassified' bucket)|| |
||get_is_pseudo_bucket ||<code>call('POPFile/API.is_pseudo_bucket','session_key', 'bucketname')</code> returns 1 if the bucketname exists and it is a pseudo-bucket ('unclassified' bucket), returns 0 if the bucketname does not exist, or the bucketname is not a pseudo-bucket|| | ||is_pseudo_bucket ||<code>call('POPFile/API.is_pseudo_bucket','session_key', 'bucketname')</code> returns 1 if the bucketname exists and it is a pseudo-bucket ('unclassified' bucket), returns 0 if the bucketname does not exist, or the bucketname is not a pseudo-bucket|| |
||get_bucket_word_count ||<code>call('POPFile/API.get_bucket_word_count', 'session_key', 'bucketname')</code> returns word count of bucket|| | ||get_bucket_word_count ||<code>call('POPFile/API.get_bucket_word_count', 'session_key', 'bucketname')</code> returns word count of bucket|| |
||get_bucket_word_list||<code>call('POPFile/API.get_bucket_word_list', 'session_key', 'bucketname')</code> returns array of words found in bucket|| | ||get_bucket_word_list||<code>call('POPFile/API.get_bucket_word_list', 'session_key', 'bucketname')</code> returns array of words found in bucket|| |