weebly
Python functions to simplify interfacing with weebly cloud api
The client must be instantiated as an object which is initialized with the API_KEY and API_SECRET from your Weebly Cloud Dashboard.
Example:
wclient = WeeblyClient(api_key='your-api-key-here', api_secret='your-api-secret-here')
To run the unittests, you must create a user account set the global variable such as:
WEEBLY_TEST_ACCOUNT_ID = 'your-user-id-here'
The following methods are provided:
* hash = wclient_hash(content)
* response = wclient.get(url)
* response = wclient.post(url, data)
* response = wclient.put(url, data)
* response = wclient.patch(url, data)
* response = wclient.delete(url)
* response = wclient.loginlink(user_id)
https://api.weeblycloud.com.
The URL should NOT include the base urlCheck Weebly documentation for specifics on format of data.
Example usage:
# create new user account
from weebly.utils import *
wclient = WeeblyClient(api_key='your-api-key-here', api_secret='your-api-secret-here')
my_url = 'user/'
my_data = {'email': 'tester@fake.com'}
resp = wclient.post(my_url, my_data)
Unittests
To run the unittests you must edit the test.py file and include your api_key, api_secret, and test_account_id. Afterwards run nosetests.