Closed fanchylee closed 10 years ago
Can you give me the version of MediaWiki and the debug output of a failed request? apfrom
is still listed in the documentation:
Sorry, it is the function category_members that causes the problem http://www.mediawiki.org/wiki/API:Categorymembers there is no 'apfrom'
mediawiki info : http://zh.wikipedia.org/w/api.php?action=query&meta=siteinfo&format=xmlfm
error output:
irb(main):014:0> mem=zhwikimw.category_members('分类:含未完成ISBN标签的页面')
MediaWiki::APIError: MediaWiki::APIError: API error: code 'warning', info 'API warning: Unrecognized parameter: 'apfrom''
from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:828:in warning' from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:808:in
get_response'
from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:763:in block in make_api_request' from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in
call'
from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in process_result' from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in
block in transmit'
from /usr/lib/ruby/1.9.1/net/http.rb:745:in start' from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in
transmit'
from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in execute' from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in
execute'
from /var/lib/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient.rb:68:in get' from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:783:in
http_send'
from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:755:in make_api_request' from /var/lib/gems/1.9.1/gems/mediawiki-gateway-0.5.1/lib/media_wiki/gateway.rb:293:in
category_members'
from (irb):14
from /usr/bin/irb:12:in `
Fixed in pull #58.
I am using this library in Chinese wikipedia, but the apfrom causes an error . It works after I remove it.