Coder Social home page Coder Social logo

Comments (4)

hermannschwaerzlerUIBK avatar hermannschwaerzlerUIBK commented on August 22, 2024

Are you still interested in mediawikibot?
If yes you might look at my fork. I more or less fixed this issue by moving away from defining global constants.
This changes the use of mediawikibot. With these changes you have to use it like this:

require_once('mediawikibot.class.php');

$api = 'http://your.mediawiki.installation/wiki/api.php';
$wiki = new MediaWikiBot($api);

$success = $wiki->login(null, 'bot', 'password');

Do you want to give it a try?

from mediawikibot.

dereckson avatar dereckson commented on August 22, 2024

Looks good to me.


I see you contributed to a Jeroen de Dauw's repository.

You could like this presentation he made about short functions if you wish to further improve the class: http://jeroendedauw.github.io/slides/craftmanship/functions/#/1

Especially slide 23 about function arguments http://jeroendedauw.github.io/slides/craftmanship/functions/#/23

According this pattern, bot and password could be class properties to define before to call the login method, method without any argument.

from mediawikibot.

hermannschwaerzlerUIBK avatar hermannschwaerzlerUIBK commented on August 22, 2024

Thanks for the hint for further improving the code!
For the records: I did not really contribute to one of Jeroen de Dauws project. I just pointed out a small issue with the composer requirements of ParamProcessor.
But I am interested in writing good code and I did consider making user name and password a parameter of the constructor but decided to go for parameters of login. But I think you (and Jeroen) have a point and I will change that.

In the meantime I made some other changes that make the class really work for me (there were some issues). I will push them as soon as possible to my fork (and create some pull requests in this repo).

from mediawikibot.

kalebheitzman avatar kalebheitzman commented on August 22, 2024

Send the requests and I'll pull them in. I'll also be updating this over the next week or 2.

from mediawikibot.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.