jpatokal / mediawiki-gateway

Ruby framework for MediaWiki API manipulation
Other
133 stars 50 forks source link

apfrom cause error #44

Closed fanchylee closed 10 years ago

fanchylee commented 11 years ago

I am using this library in Chinese wikipedia, but the apfrom causes an error . It works after I remove it.

jpatokal commented 11 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:

http://www.mediawiki.org/wiki/API:Allpages

fanchylee commented 11 years ago

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:inget_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:incall' 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:inblock 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:intransmit' 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:inexecute' 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:inhttp_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:incategory_members' from (irb):14 from /usr/bin/irb:12:in `

'

jpatokal commented 10 years ago

Fixed in pull #58.