Recent

Author Topic: xmlrpc question  (Read 5833 times)

a.atalla

  • Jr. Member
  • **
  • Posts: 82
xmlrpc question
« on: June 04, 2010, 09:29:27 pm »
hey guys
new to lazarus and i want to interact with aria2c download manager via xmlrpc
 
i used to do it in python like this
Code: [Select]
>>> import xmlrpclib
>>> s = xmlrpclib.ServerProxy('http://localhost:6800/rpc')
>>> s.aria2.addUri(['http://chromeos.hexxeh.net/ChromeOS-Zero.torrent'],{'dir':'/mydownloads'})
'3'
>>> from pprint import pprint
>>> pprint(s.aria2.tellActive())
[{'bitfield': '00000300002000020000002002000000000004400004000048000002002108000420101100000000
40000000400000000000000014040000000000000800040000800400000000040000000002080000000402010800444
00040000000008000a040000002840240200008000000000001000000001000000800020080042400',
  'completedLength': '16859136',
  'connections': '49',
  'dir': '/mydownloads',
  'downloadSpeed': '554196',
  'files': [{'index': '1',
             'length': '267328301',
             'path': '/mydownloads/ChromeOS-Zero.tar.gz',
             'selected': 'true',
             'uris': []}],
  'gid': '4',
  'infoHash': '0dcbd7b411b70da1f8a6025c70f6bbb890d36546',
  'numPieces': '1020',
  'numSeeders': '17',
  'pieceLength': '262144',
  'status': 'active',
  'totalLength': '267328301',
  'uploadLength': '0',
  'uploadSpeed': '0'}]

i downloaded the web service toolkit but i couldnot compile ws_helper and i dont know what to do  ????????
i have lazarus from svn  0.9.29 and fpc 2.4
Lazarus 1.0.8 | FPC 2.6.2 x64  | Arch Linux x64 | Windows 7-x86

 

TinyPortal © 2005-2018