def main(): api = webfaction.login() api['server'].delete_app(api['session_id'], 'webfactionapi') api['server'].delete_website(api['session_id'], 'webfactionapi_web', '75.125.135.130', False,)
def main(): api = webfaction.login() apps = api['server'].list_apps(api['session_id']) list_apps = [] for app in apps: list_apps.append(app['name']) list_apps.sort() for app in list_apps: print app
def main(): api = webfaction.login() api['server'].create_app(api['session_id'], 'webfactionapi', 'static', False, '') text = '<h1>Welcome from the Webfaction API!!1eleven</h1>' api['server'].write_file(api['session_id'], 'index.html', text) api['server'].create_website(api['session_id'], 'webfactionapi_web', '75.125.135.130', False, ['djingodjango.com', 'www.djingodjango.com'], ['webfactionapi', '/'])
def main(): api = webfaction.login() cmd = "cd ~/webapps/webfactionapi/" api["server"].system(api["session_id"], cmd) text = "<h1>This was edited from the API, you guys.</h1>" api["server"].write_file(api["session_id"], "webapps/webfactionapi/index.html", text)