login(conf=None,
klass=<class 'pysmug.smugmug.SmugMug'>,
proxy=None)
| source code
|
Login to smugmug using the contents of the configuration file.
If no configuration file specified then a file named
.pysmugrc in the user's home directory is used if it
exists.
The following order determines the login method used:
-
In all cases
APIKey is required.
-
If
PasswordHash is in configuration, then
login_withHash is used.
-
UserID is additionally required.
-
If
Password is in configuration, then
login_withPassword is used.
-
EmailAddress is additionally required.
-
Else
login_anonymously is used.
- Parameters:
conf - path to a configuration file
klass (SmugMug class) - class to instantiate
proxy - address of proxy server if one is required
(http[s]://localhost[:8080])
- Raises:
ValueError - if no configuration file is found
|