我正在尝试使用 python 将一些参数传递给 link_clicks 和 link_countries bit.ly API,但是我不确定在此处传递参数的语法。如何向此 api 调用添加参数?
import sys
import bitly_api
import os
from config import config
#connect to bitly
conn_btly = bitly_api.Connection(access_token=config['ACCESS_TOKEN'])
#get links
links = conn_btly.user_link_history()
print 'links okay'
for link in links:
#add params to link
link_full = link['link'] + '?rollup=false'
print link_full
#get clicks
clicks = conn_btly.link_clicks(link_full)
#print results
#print link['link'], clicks
print clicks
结果输出是
links okay
http://mzl.la/19xSyCT?rollup=false
...
BitlyError: NOT_FOUND