Photo-Uploader module
Dictionary holding all available services.
Returns information about service.
Parameters: | name (string) – Name of service. |
---|
Returns list of available services.
Registration handler for adding service.
Parameters handler, url and features should be allways filled, rest is optional.
Parameters: |
|
---|
Uploads photos to defined service.
Photo-Uploader core. Generic class for uploading photos, no real functionality, just wrapping cURL and image uploading.
Raised when configuration is missing.
Raised when some functionality not implemented by plugin.
Generic photo uploader class for handling photo uploads.
Connects if you are not already connected.
Performs request using current cURL configuration.
Dumps request data if debug is enabled.
Performs GET request on URL.
Returns list of supported features. You should implement this in subclass.
Features are described in README.
Returns URL suitable for review/finishing order. You should implement this in subclass.
Returns currently used session.
Returns URL with information about service. You should implement this in subclass.
This function can return either string of list of strings.
Prints message to user.
Performs POST request on URL with parameters.
Upload images listed in images parameter. List should contain paths to files.
Raised when upload fails.
Photo-Uploader configuration manager.
Configuration handler for photo-uploader. It only wraps ConfigParser to make it more convenient to use.
Reads string value from configuration, if it is not found, it tries to apply defaults, if even this fails, exception is raised.
Reads boolean value from configuration, if it is not found, it tries to apply defaults, if even this fails, exception is raised.
Reads integer value from configuration, if it is not found, it tries to apply defaults, if even this fails, exception is raised.