diff options
author | João Victor Duarte Martins <jvictor@mandriva.com> | 2010-05-13 18:51:28 +0000 |
---|---|---|
committer | João Victor Duarte Martins <jvictor@mandriva.com> | 2010-05-13 18:51:28 +0000 |
commit | 6cfd95a49b0c0df8b334f43b3e6e3df9d1806778 (patch) | |
tree | b4604dd13c7c76281c0a17b580b78687be26419b /mdkonline.pm | |
parent | d1d202c7a9a264f4025c60d993f383c7a0ebbe89 (diff) | |
download | mgaonline-6cfd95a49b0c0df8b334f43b3e6e3df9d1806778.tar mgaonline-6cfd95a49b0c0df8b334f43b3e6e3df9d1806778.tar.gz mgaonline-6cfd95a49b0c0df8b334f43b3e6e3df9d1806778.tar.bz2 mgaonline-6cfd95a49b0c0df8b334f43b3e6e3df9d1806778.tar.xz mgaonline-6cfd95a49b0c0df8b334f43b3e6e3df9d1806778.zip |
* mdkonline.pm (get_my_mdv_profile): Moved from authenticate_callback
for reusability.
* mdkapplet-add-media-helper (authenticate_callback): renamed for
readability.
Diffstat (limited to 'mdkonline.pm')
-rw-r--r-- | mdkonline.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mdkonline.pm b/mdkonline.pm index 6c67b54c..02399a66 100644 --- a/mdkonline.pm +++ b/mdkonline.pm @@ -50,6 +50,7 @@ our @EXPORT = qw(find_current_distro $config_file $product_id $root); +our @EXPORT_OK = qw(get_my_mdv_profile); our (%config, $product_id, $root); our $version = 1; @@ -211,6 +212,13 @@ sub get_from { $response; } +sub get_my_mdv_profile { + my ($email, $password) = @_; + xml2perl(mdkonline::get_from('https://my.mandriva.com/rest/authenticate', + [ 'username', $email, 'password', $password, + 'return', 'userdata' ])); +} + # callers need to require XML::Simple sub xml2perl { my ($res) = @_; |