You are not logged in.

#1 2005-07-29 18:33:17

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

freshmeat xmlrpc

so... I came across this little gem:
http://freshmeat.net/faq/view/49/

freshmeat has an xmlrpc interface... which should allow things (like the AUR, hint hint) to query freshmeat's version of a package....

however... it doesn't like me...

import xmlrcplib
srv=xmlrpclib.Server('http://freshmeat.net/xmlrpc/')
srv.login('phrakture','XXXXXXXXXXX')

produces: xmlrpclib.Fault: <Fault 10: 'Login incorrect'>... which is totally wrong because my login is valid... no ideas... can anyone get this to login?

for the record you want to do something like so:

session=srv.login('user','pass')
print srv.fetch_branch_list(session['SID'],'some_project_name')

Offline

#2 2005-07-29 21:13:35

tmaynard
Member
Registered: 2005-07-29
Posts: 34

Re: freshmeat xmlrpc

Hey phrakture, try using a dictionary for the login username & password

>>> import xmlrpclib
>>> srv=xmlrpclib.Server('http://freshmeat.net/xmlrpc/')
>>> srv.login({'username':'tmaynard','password':'XXXXXXXXXX'})
{'Lifetime': 600, 'API Version': '1.03', 'SID': '0535d169f82838bbbb8e9c7f785c0282'}
>>>                                                                   

Happy Hacking

--Todd

Offline

#3 2005-07-29 21:39:53

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: freshmeat xmlrpc

crap! I knew it was something like that... must have skipped that part in the docs 8)

And damn... it doesn't seem to work as expected... I can't get info on anything because I get permission denied errors... which sucks - I was hoping I'd be able to use this interface as a little AUR plugin to "check current version" or something like that.... could be an automatic way to flag things out of date....

/me shrugs

Offline

Board footer

Powered by FluxBB