Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample code for API: Options module #51

Merged
merged 4 commits into from Mar 7, 2019
Merged

Conversation

reefagirl
Copy link
Contributor

I wrote sample code to change user options which is done via the Options module which can be viewed at https://www.mediawiki.org/wiki/API:Options.

As the code wasn't in the current repository or in the wiki page, I wrote a sample code for it.

I tested it by obtaining credentials via Special:BotPasswords, for a login token.

@silkypriya
Copy link
Contributor

Based on #55

@srish
Copy link
Member

srish commented Feb 21, 2019

@reefagirl Thanks for your contribution to this project! But, this is not related to any microtask that I've added to the task description on Phabricator T215682 :-/

I will try to create a microtask around the Options module and then will get back to you in a day or so!

In the future, before starting work on a topic / sending a pull request, I would appreciate it if you discuss it with me on Zulip or Phabricator. That way I can verify if the particular contribution would be helpful or not for the project at the moment.

@reefagirl
Copy link
Contributor Author

My apologies, I will make sure to discuss topics before starting them in future.

Thank you for your help, I greatly appreciate it.

@srish
Copy link
Member

srish commented Feb 25, 2019

@reefagirl I don't know your Phabricator username, but I've added your Github username next to API:Options module in the task description https://phabricator.wikimedia.org/T215682. I will be reviewing your pull request soon!

@reefagirl
Copy link
Contributor Author

Thank you, I edited the Phabricator task description with my Phabricater username :)
Kindly let me know your feedback and suggested improvements.
I will start creating the API Documentation page in my sandbox as instructed in Phabricator.

Copy link
Member

@srish srish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reefagirl Overall your sample code looks great! Only thing I would add is that you can demonstrate in the same code how to change a few more settings maybe skin, nickname, etc.

I would like to merge this code sample when your documentation is ready to go live on MediaWiki too. I will also take another look at your code sample then. Make sure that you've actually tested it on test.wikipedia.org.

Before submitting final changes, run it with Pylint (https://www.pylint.org) to eliminate any indentation errors.

@reefagirl
Copy link
Contributor Author

Thank you. I will do the updates and commit them soon :)

@reefagirl
Copy link
Contributor Author

reefagirl commented Feb 27, 2019

@srish thank you for your feedback. I made the commits to update the code.

The documentation I created can be found at https://www.mediawiki.org/wiki/User:Areefat/Sandbox/API:Options

Kindly let me know your feedback and any improvements to be made.

Appreciate the opportunity to contribute!

@srish
Copy link
Member

srish commented Mar 3, 2019

@reefagirl Thanks a lot for your work! Here is first round of feedback https://www.mediawiki.org/wiki/Topic:Uv9lt04gmcv10ggl :)

@reefagirl
Copy link
Contributor Author

@srish Thank you for taking your time to provide feedback.
I made the changes accordingly. I was a bit confused with the parameters section, I referred to the page suggested as well as a few other pages with a parameters section and edited it. If there are any changes let me know.
Hope it is as expected.
Thank you :)

@srish
Copy link
Member

srish commented Mar 7, 2019

@reefagirl Mostly looking good :) You can remove all the translation markers as they are generated by the software... read more about it here: #74 (comment). When you are done, I will review your document one more time.

@reefagirl
Copy link
Contributor Author

@srish Thank you,
I removed all the translation markers :)
Appreciate all the help.

@srish srish merged commit 447c3c0 into wikimedia:master Mar 7, 2019
@srish
Copy link
Member

srish commented Mar 7, 2019

Thanks a lot for your work on this! I've made some fixes to documentation here:
https://www.mediawiki.org/wiki/User:Areefat/Sandbox/API:Options

You can copy paste the changes to MediaWiki.org. When you publish your changes make sure to say in the comment: "updated as per the improving the action API documentation project". For reference check following page's history as it recently got updated: https://www.mediawiki.org/w/index.php?title=API:Move&action=history. Let me know if you've any trouble while doing so :)

@reefagirl
Copy link
Contributor Author

Thank you @srish , very grateful to be a part of this project.
I made the changes on MediaWiki.org :)
I would love to make more contributions to this project and hope to get the opportunity to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants