ANNOUNCE: osaxen.com supports XML-RPC
ANNOUNCE: osaxen.com supports XML-RPC
- Subject: ANNOUNCE: osaxen.com supports XML-RPC
- From: email@hidden
- Date: Wed, 31 Oct 2001 14:17:04 +0100
I'm proud to announce the addition of XML-RPC support to osaxen.com, a
database of scripting additions at macscripter.net. This means that you
can search for information about scripting additions from within
AppleScript. OS X 10.1 has native support for XML-RPC and Mark
Alldritt's XML-RPC library for OS 8/9 works as well (with a few
limitations). The following six methods are supported:
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.findCommand",
parameters:"mail"}
end tell
the findCommand method takes a search string as parameter and returns a
struct (i.e. record) with basic information about the found command.
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.getCommand",
parameters:"sysoGMT "}
end tell
The getCommand method takes the class and event of a command and returns
a struct (i.e. record) with command information. This includes the name
and osaxen.com ID of the scripting addition package so that the package
can easily be downloaded.
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.findAddition",
parameters:"mail"}
end tell
the findAddition method takes a search string as parameter and returns a
struct (i.e. record) with basic information about the found scripting
addition file.
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.getAddition",
parameters:"sysoGMT "}
end tell
The getAddition method takes the class and event of a the first command
in a scripting addition file and returns a struct (i.e. record) with
osax information. This includes the name and osaxen.com ID of the
scripting addition package so that the package can easily be downloaded.
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.findPackage",
parameters:"mail"}
end tell
the findPackage method takes a search string as parameter and returns a
struct (i.e. record) with basic information about the found osaxen.
Similar to the list view at osaxen.com.
tell application "
http://www.osaxen.com/xmlrpc.php"
return call xmlrpc {method name:"osaxen.getPackage",
parameters:"xml_tools"}
end tell
the getPackage method takes a osax ID as parameter and returns a struct
(i.e. record) with detailed information about the osax. Similar to the
detail view at osaxen.com.
For more information, call system.listMethods (without parameters),
system.methodHelp (with the name of the method) and
system.method.Signature (with the name of the method).
XML-RPC offers a number of very interesting possibilities. A script
could automatically locate and download a scripting addition that it
needs to work properly. Or XML-RPC could provide additional
functionality to AppleScript (sort of like a web scripting addition).
- Martin