Sha256: 00b5e1eb3a3aea622a7e8f1322cb1899ed031c378b7b7b63b7760808ea32874e
Contents?: true
Size: 575 Bytes
Versions: 27
Compression:
Stored size: 575 Bytes
Contents
module DiscourseApi module API module Backups def backups response = get("/admin/backups.json") response.body end def create_backup post("/admin/backups", with_uploads: true) end def restore_backup(file_name) post("/admin/backups/#{file_name}/restore") end def download_backup(file_name, destination) response = get("/admin/backups/#{file_name}") # write file File.open("#{destination}/#{file_name}", 'wb') { |fp| fp.write(response.body) } end end end end
Version data entries
27 entries across 27 versions & 1 rubygems