コード例 #1
0
import RESTBackMeUp as BMU

TWITTER_AUTH_DATA = {
  "secret" : "WYnjIW2ymHBXI4IjPUubaeSgxaMtQ3gEv8bFdGsN7lQ",
  "oauth_token" : "n7MgvbBnL2keYejuC0FePAFuAsXmzC6P5BpeFqCZs",
  "oauth_verifier" : "igLr5JsgmQlxNcQXFoAtcFAWZoilwLPHbw1OFuRkIM",
  "token" : "843501650-3eU0c2txIX6rzNTNaPXEmHcsN7qvu7drzNNo32Sz"
}

BMU.delete_user("TestUser")
res = BMU.register_user("TestUser", "password", "password", "*****@*****.**")
BMU.verify_email(res.data["verificationKey"])

sinkId = BMU.auth_datasink("TestUser", "org.backmeup.dummy", "SrcProfile", "password").data["profileId"]
    
sourceId = BMU.auth_datasource("TestUser", "org.backmeup.twitter", "SinkProfile", "password").data["profileId"]
BMU.update_profile(sourceId, TWITTER_AUTH_DATA, "password");


res = BMU.create_backup_job("TestUser", "password", [sourceId], [], sinkId, "realtime", "Twitter to Dummy")

コード例 #2
0
import RESTBackMeUp as BMU

BMU.delete_user("TestUser")
res = BMU.register_user("TestUser", "password", "password", "*****@*****.**")
BMU.verify_email(res.data["verificationKey"])

sourceId = BMU.auth_datasource("TestUser", "org.backmeup.moodle", "SrcProfile", "password").data["profileId"]

BMU.update_profile(sourceId, {"Username" : "backmeup", "Password" : "286bafbb1a9faf4dc4e104a33e222304", "Moodle Server Url" : "http://gtn02.gtn-solutions.com/moodle20"}, "password");

sinkId = BMU.auth_datasink("TestUser", "org.backmeup.discmailing", "SinkProfile", "password").data["profileId"]

BMU.update_profile(sinkId, {"Street" : "Mariahilferstrasse 15", "City" : "Wien", "Postcode" : "1150"}, "password");

res = BMU.create_backup_job("TestUser", "password", [sourceId], ["org.backmeup.indexer", "org.backmeup.encryption"], sinkId, "daily", "Moodle to Discmail", {
	"org.backmeup.encryption.org.backmeup.encryption.password" : "myEncryptionPw"
	})

コード例 #3
0
# -*- coding: ISO-8859-1 -*-

import RESTBackMeUp as BMU

user = "******"
pw = "password"

BMU.delete_user(user)
res = BMU.register_user(user, pw, pw, user)
BMU.verify_email(res.data["verificationKey"])

res = BMU.auth_datasource(user, "org.backmeup.facebook", "SrcProfile", pw)
print "Open following URL:"
print res.data["redirectURL"]
sourceId = res.data["profileId"]
code = raw_input("Enter code: ")

print BMU.post_auth_datasource(user, sourceId, pw, {"code" : code})

print BMU.generate_datasource_options(user, sourceId, pw)
what = raw_input("Enter option to use: ")

sinkId = BMU.auth_datasink(user, "org.backmeup.dummy", "SinkProfile", pw).data["profileId"]

job = BMU.create_backup_job(user, pw, [sourceId], [], sinkId, "daily", "Facebook to dummy").data["job"]["jobId"]
print BMU.change_datasource_profile(user, job, sourceId, [what])

コード例 #4
0
#!/usr/bin/python

import RESTBackMeUp as BMU

appKey = "4pheai3cd0btkd5"
appSecret = "0sjcpoqe1jeqlat"


BMU.delete_user("Seppl")
res = BMU.register_user("Seppl", "SepplSeppl", "SepplSeppl", "*****@*****.**")
print res.data
BMU.verify_email(res.data["verificationKey"])
res = BMU.auth_datasink("Seppl", "org.backmeup.dropbox", "Dropbox", "SepplSeppl")
sinkId = res.data["profileId"]
res = BMU.update_profile(sinkId, {"token" : appKey, "secret" : appSecret}, "SepplSeppl")
res = BMU.auth_datasource("Seppl", "org.backmeup.dropbox", "Dropbox", "SepplSeppl")
sourceId = res.data["profileId"]
res = BMU.update_profile(sourceId, {"token" : appKey, "secret" : appSecret}, "SepplSeppl")
res = BMU.create_backup_job("Seppl", "SepplSeppl", [sourceId], None, sinkId, "daily", "Dropbox to Dropbox")


コード例 #5
0
register()
print BMU.delete_user("MyTestUser123")
raw_input("delete completed...")
register()
print BMU.change_user("MyTestUser123", "MyTestUser1234", "123456789", "12345678", "*****@*****.**")
raw_input("change_user completed...")
res = BMU.new_verification_email("MyTestUser1234")
BMU.verify_email(res.data["verificationKey"])
print BMU.login_user("MyTestUser1234", "12345678")
raw_input("login completed...")
print BMU.set_user_property("MyTestUser1234", "jameston", "charlston")
raw_input("set user property completed...")
print BMU.delete_user_property("MyTestUser1234", "jameston")
raw_input("delete user property completed...")
sourceId = BMU.auth_datasource("MyTestUser1234", "org.backmeup.dummy", "SrcProfile", "12345678").data["profileId"]
print BMU.delete_datasource_profile("MyTestUser1234", sourceId)
raw_input("delete datasource profile completed...")
sourceId = BMU.auth_datasource("MyTestUser1234", "org.backmeup.dummy", "SrcProfile", "12345678").data["profileId"]
print BMU.post_auth_datasource("MyTestUser1234", sourceId, "12345678", {"yep" : "hi"})
raw_input("post authorize datasource profile completed...")
sinkId = BMU.auth_datasink("MyTestUser1234", "org.backmeup.dummy", "SrcProfile", "12345678").data["profileId"]
print BMU.delete_datasink_profile("MyTestUser1234", sinkId)
raw_input("delete datasink profile completed...")
sinkId = BMU.auth_datasink("MyTestUser1234", "org.backmeup.dummy", "SrcProfile", "12345678").data["profileId"]
print BMU.post_auth_datasink("MyTestUser1234", sinkId, "12345678", {"yep" : "hi"})
raw_input("post authorize datasink profile completed...")
jobId = BMU.create_backup_job("MyTestUser1234", "12345678", [sourceId], [], sinkId, "daily", "Dummy to dummy job" ).data["job"]["jobId"]
print BMU.change_datasource_profile("MyTestUser1234", jobId, sourceId, {"key1" : "value1"})
raw_input("change datasource profile completed...")
コード例 #6
0
import RESTBackMeUp as BMU

USER = "******"
PASS = "******"

try:
  res = BMU.register_user(USER, PASS, PASS, USER)
  BMU.verify_email(res.data["verificationKey"])
except:
  pass

sourceId = BMU.auth_datasource(USER, "org.backmeup.dummy", "SrcProfile", PASS).data["profileId"]

sinkId = BMU.auth_datasink(USER, "org.backmeup.zip", "SinkProfile", PASS).data["profileId"]

res = BMU.create_backup_job(USER, PASS, [sourceId], [], sinkId, "realtime", "Dummy to Zip")

コード例 #7
0
SKYDRIVE_AUTH = {
  "secret" : "jvZDGQl1aUamXYJCpyqWCqncO5bxRpd-",
  "refreshToken" : "vEUNSAAAHgA%241uVUDAYSjCt!wxeimQCsIl!wCKVNQwvMzJl1ap9TawbDjQR1tAO7DW4rvd35HBKeMu2*svalqszcgJJDP3osO*W8e96SWsEp9oSEXxi!5vgEhoNnHkCPw2fLcgYyoHyOWzvxH4mdJ8C5toMdugYEcyKRZLJPR7BfC2",
  "token": "EwAoAq1DBAAUlbRWyAJjK5w968Ru3Cyt\/6GvwXwAAWEUR4uTb0I1nikK\/BOgJqORMRWmtnATWNyinXE47pLib87+hOTiv4kFkOlb86GwEzn69Mkup5v5Qpl4+E9OA5nVzm69ah9b6mMVlMDKqjGxdwLBxtrAi8\/kAfYh0eG+GT9gILR504RUYe5VKPYpdKBwTAvbdX9HCMct2v3oc4lG24ZMu3Z9MTXWQOOfIIFrD\/s2Mdwe\/pcZE1\/M2q6RrFEaBqKRLAEUEupmSn6TDCtTZZReAlCASjKguZPzjXm8K5icMp9ho3myLxZmDDWJZ7Jpn89QwoBLsw85wrEDOrjkrw+fpkjenQ55dzUfw9lwvzMJ\/jJsWd9qK10xX72+I6gDZgAACCCUMcDqmjjK+AAduBLN6yL4JDhjgh4nQjsP4r4pKN6fsnViobcnezTFBXyGalF7kG1T97iTjsOCxw4zR1r3b\/hIS+4aGwTlY8Z\/OSU2jqprEe6IH6Ccvpm6pT8RqFta3ODOrx1XuEBMN9e4bTbmyivzKePGLVZTa4pDWfmBwWL9qyPv\/JWXj0wqFHo6Wj4ExUG1EpjpsN807BSoplKoMQSU7izU8SOadak4T0OStHhCzSwZi6jpIQYnUuDF8Ja9cuScbnthS2wywST3yPRmKaZFLullgbqyJ1QpVkMkgQufef4eOZ+cABdfootlrtaA5J2kfHxoeW\/76lnr1sZ\/T0DfyAAA",
  "key" : "00000000480D45BC",
  "code" : "aedfdc21-d223-2fe7-d186-74f8c70ffa3b",
  "callback" : "http://www.backmeup.at/"
}
try:
  res = BMU.register_user("TestUser", "password", "password", "*****@*****.**")
  if res.code == 200:
    BMU.verify_email(res.data["verificationKey"])
except:
  pass

res = BMU.auth_datasource("TestUser", "org.backmeup.skydrive", "SrcProfile", "password")
sourceId = res.data["profileId"]
print res.data["redirectURL"]

BMU.post_auth_datasource("TestUser", sourceId, "password", {
  "code" : raw_input("Code: ")
})

res = BMU.auth_datasink("TestUser", "org.backmeup.dropbox", "SinkProfile", "password")
sinkId = res.data["profileId"]
print res.data["redirectURL"]
BMU.post_auth_datasource("TestUser", sinkId, "password", {  
  "code" : raw_input("Code: ")
})

res = BMU.create_backup_job("TestUser", "password", [sourceId], [], sinkId, "realtime", "Skydrive to Dropbox")
コード例 #8
0
import RESTBackMeUp as BMU


sourceId = BMU.auth_datasource("Rainer", "org.backmeup.dummy", "SrcProfile", "password").data["profileId"]
    
sinkId = BMU.auth_datasink("Rainer", "org.backmeup.dummy", "SinkProfile", "password").data["profileId"]


res = BMU.create_backup_job("Rainer", "password", [sourceId], ["org.backmeup.actiondummy"], sinkId, "realtime", "Dummy to Dummy")