From 00291ce2e1816cda8d62126a54864a7c90b2d61f Mon Sep 17 00:00:00 2001 From: adieu Date: Sun, 4 Dec 2011 22:49:33 +0800 Subject: [PATCH] Improve readme --- README.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 753a9ee..702ef29 100644 --- a/README.rst +++ b/README.rst @@ -1,24 +1,24 @@ API Usage ========= -Create a Xunlei object +Create a Xunlei object:: import xunlei xunlei_obj = xunlei.Xunlei(USERNAME, PASSWORD, COOKIE_FILE_PATH) -List Xunlei lixian tasks +List Xunlei lixian tasks:: items = xunlei_obj.dashboard() -List a bittorrent task +List a bittorrent task:: items = xunlei_obj.list_bt(url, task_id) # url and task_id are from dashboard() function -Download a task +Download a task:: xunlei_obj.dowload(url, filename) -Download a task with file size checking and resume +Download a task with file size checking and resume:: xunlei_obj.smart_download(url, filename, size) @@ -26,13 +26,13 @@ Download a task with file size checking and resume CLI Usage ========= -Edit config file at `~/xunleirc`, add settings for `username` and `password` +Edit config file at ``~/xunleirc``, add settings for ``username`` and ``password`` -List xunlei tasks +List xunlei tasks:: xunlei_cli dashboard -Download a task +Download a task:: xunlei_cli download TASK_ID