Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-194) was last changed on 29-Nov-2007 14:37 by JohnGill  

This page was created on 27-Jan-2002 12:58 by 212.90.75.172

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 8 removed 12 lines
!!Interface
I'm thinking of the following interfaces:
* __getRecentChanges( long timestamp )__: Get list of changed pages since ''timestamp''.
* __getPage( String pagename, int version )__: Get the raw Wiki text of page.
* __getPageText( String pagename, int version )__: Get page data rendered as plain text, with most of formatting removed (this should be really good for when you actually send wiki pages via email or something).
* __getPageHTML( String pagename, int version )__: Return page in rendered HTML. This is of course required because you can never know how the [WikiText|TextFormattingRules] should be applied, since it varies from Wiki to Wiki.
I don't know whether writing would be such a good idea. But with these you could get somewhere anyway.
--[JanneJalkanen]
At line 9 added one line
At line 33 removed 59 lines
This was almost too easy. JSPWiki 1.6.6-cvs now supports an XML-RPC interface at URL http://www.ecyrd.com/JSPWiki/RPC2/ (note the trailing slash).
To try this one out, go download the Apache [XML-RPC] package from [http://xml.apache.org/dist/xmlrpc/], then type in the following command:
{{java -cp xmlrpc.jar org.apache.xmlrpc.XmlRpcClient http://www.ecyrd.com/JSPWiki/RPC2/ jspwiki.getPage Main}}
See below for the available methods.
(NB: You can't use the command line to get RecentChanges, you'll have to write a script of your own.)
Please test this and see how it works out.
--[JanneJalkanen]
----
Nifty! Works really well.
My only quibble is that you allow me to ask by specific version, but i have no idea what versions are acually available. It's current behavior is nice in that if I use a non-existant version number it just uses the most recent, but wouldn't a call like:
* int __getLatestVersion(String pagename)__
help? Just so my program don't have to guess at version numbers.
In fact, could you add a version number to the struct that getRecentChanges() returns? Then an email alerting program could diff between the oldest and the current within the time period, since a page may have changed multiple times in the time period requested (I know i have a tendancy to save a page, and then immediately have another thought).
I agree on using XML-RPC. Much nicer.
-- [MahlenMorris]
----
You __can__ use just plain __getPage( string )__ to get the latest version.
--[JanneJalkanen]
----
The getPageInfo() method has been implemented now. The current API looks thus like this:
* __getRecentChanges( Date timestamp )__: Get list of changed pages since ''timestamp''. The result is an array, where each element is a struct:
** ''name'' (string) : Name of the page.
** ''lastModified'' (date) : Date of last modification.
** ''author'' (string) : Name of the author (if available).
** ''version'' (int) : Current version.
* __getPage( String pagename )__: Get the raw Wiki text of page, latest version.
* __getPage( String pagename, int version )__: Get the raw Wiki text of page.
* __getPageHTML( String pagename )__: Return page in rendered HTML.
* __getPageHTML( String pagename, int version )__: Return page in rendered HTML.
* __getAllPages()__: Returns a list of all pages. The result is an array of strings.
* __struct getPageInfo( string pagename )__ : returns a struct with elements
** ''name'' (string): the canonical page name
** ''lastModified'' (date): Last modification date
** ''version'' (int): current version
** ''author'' (string): author name
* __struct getPageInfo( string pagename, int version )__ : returns a struct
just like plain ''getPageInfo()'', but this time for a specific version.
There is still a known problem with Date handling... It should probably be UTC, but at the moment all times seem to be local time.
--[JanneJalkanen].
----
At line 124 changed one line
Be prepared: The API __will__ change in the next release! Return values will be UTF-8 strings wrapped in base64, and input will likely be URL-encoded UTF-8 strings (to be compatible with the [JSPWiki URL scheme]). --[JanneJalkanen]
Here is now the API as of v1.6.11 (the command prefix being ''jspwiki.''):
At line 126 removed 4 lines
----
Here is now the new API as of v1.6.9 (the command prefix being ''jspwiki.''):
At line 57 added one line
* __getRPCVersionSupported()__: Returns 1 with this version of the JSPWiki API.
At line 139 removed 4 lines
At line 164 removed 4 lines
''10-Feb-02: I think I fixed the date problem in 1.6.10. Please test it,
o ye who live on other timezones. :-)''
[MahlenMorris] This appears to be working now.
At line 194 added 2 lines
''(I cleaned some older stuff away, BTW...)''
Version Date Modified Size Author Changes ... Change note
194 29-Nov-2007 14:37 5.787 kB JohnGill to previous Someone replaced the page content with "wo"
193 28-Nov-2007 18:49 0.004 kB 60.190.240.76 to previous | to last
192 12-Oct-2007 06:43 5.787 kB JanneJalkanen to previous | to last
191 12-Oct-2007 05:32 5.797 kB 203.69.39.251 to previous | to last
190 06-Oct-2007 11:28 5.787 kB 141.7.56.2 to previous | to last restore
189 06-Oct-2007 03:10 0.007 kB 217.16.16.218 to previous | to last t922t
188 26-Sep-2007 23:47 5.787 kB JanneJalkanen to previous | to last
187 26-Sep-2007 02:58 5.796 kB SitriCelra to previous | to last
186 21-Jul-2007 03:09 5.787 kB MurrayAltheim to previous | to last removed noise
185 20-Jul-2007 23:57 5.864 kB 1001������ to previous | to last Comment by 1001������
184 20-Jul-2007 23:57 0.008 kB 60.191.36.91 to previous | to last Comment by 1001������
183 21-Jan-2007 17:15 5.815 kB 62.99.252.218 to previous | to last old phpwiki version
182 11-Jan-2007 09:13 5.801 kB GusHome to previous | to last
181 11-Jan-2007 09:10 5.894 kB GusHome to previous | to last Comment by GusHome
« This page (revision-194) was last changed on 29-Nov-2007 14:37 by JohnGill