Class | Trac::Wiki |
In: |
lib/wiki.rb
|
Parent: | Object |
returns a list of all attachments of a page
# File lib/wiki.rb, line 64 64: def attachments page 65: @trac.query("wiki.listAttachments",page) 66: end
deletes page with given name, returning true on success.
# File lib/wiki.rb, line 59 59: def delete name 60: @trac.query('wiki.deletePage',name) 61: end
deletes attachment with given `path‘
# File lib/wiki.rb, line 82 82: def delete_attachment path 83: @trac.query("wiki.deleteAttachment",path) 84: end
returns the content of an attachment
# File lib/wiki.rb, line 69 69: def get_attachment path 70: @trac.query("wiki.getAttachment",path) 71: end
returns a whole page in HTML
# File lib/wiki.rb, line 43 43: def get_html name 44: @trac.query('wiki.getPageHTML',name) 45: end
returns a whole page in raw format
# File lib/wiki.rb, line 48 48: def get_raw name 49: @trac.query('wiki.getPage',name) 50: end
uploads given `data’ as an attachment to given `page’. returns true on success. unlike the XMLRPC-Call this method defaults `replace’ to false as we don‘t want to destroy anything.
# File lib/wiki.rb, line 77 77: def put_attachment page,filename,description,data,replace=false 78: @trac.query("wiki.putAttachmentEx",page,filename,description,data,replace) 79: end