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

Add Protect API #333

Merged
merged 1 commit into from
May 6, 2022
Merged

Add Protect API #333

merged 1 commit into from
May 6, 2022

Conversation

andrewnicols
Copy link
Contributor

@andrewnicols andrewnicols commented May 5, 2022

Add an API call for the Protect API endpoint.
https://www.mediawiki.org/wiki/API:Protect

This takes all of the arguments available for the Protect API.

I have provided tests where possible, but unfortunately vows provides no way to mock the Client to do any more than the very basics. I've tested this locally with my own site, though I'm not sure of the format for the timestamp to be able to verify that (though it is just passing in the value).

I've opted to only support the alternative expiry format - that is that where multiple protections exist, each has its own expiry date.

AUTHORS Show resolved Hide resolved
@macbre
Copy link
Owner

macbre commented May 5, 2022

Thanks! I'm planning to migrate tests suite to jest. This will make mocking way easier.

@andrewnicols
Copy link
Contributor Author

I shall look forward to it!

How often do you usually tag and release after new features land?

Add an API call for the Protect API endpoint.

This takes all of the arguments available for the Protect API.
@macbre
Copy link
Owner

macbre commented May 6, 2022

There hasn't been any active development in this repo recently. But I'll merge your changes soon and tag a release & publish it to npm.

Thanks again for your fixes :) Welcome on board.

@macbre macbre merged commit 486da1b into macbre:devel May 6, 2022
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.

2 participants