-
Notifications
You must be signed in to change notification settings - Fork 28
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
Wordcheck API returning bad words with levels #1379
Conversation
Sandbox updated |
@70ray - can you please update your sandbox? |
The Some samples for other reviewers. Example files:
API calls: export API_KEY=review
curl -i -H "Accept: application/json" -H "X-API-KEY: $API_KEY" \
-d @data.json \
-X PUT "https://www.pgdp.org/~rp31/c.branch/api_wc3/api/v1/projects/projectID45c225f598e32/wordcheck"
curl -i -H "Accept: application/json" -H "X-API-KEY: $API_KEY" \
-d @data_with_language.json \
-X PUT "https://www.pgdp.org/~rp31/c.branch/api_wc3/api/v1/projects/projectID45c225f598e32/wordcheck"
curl -i -H "Accept: application/json" -H "X-API-KEY: $API_KEY" \
-d @data_with_accepted.json \
-X PUT "https://www.pgdp.org/~rp31/c.branch/api_wc3/api/v1/projects/projectID45c225f598e32/wordcheck" |
Sandbox updated now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The v1/projects/{projectid}/pages/{pagename}/wordcheck
also looks good. I tested it with a page I wasn't allowed to change, one that I was but in the wrong state, and one that I was and had checked out.
Sample data files:
cpeel@test:~$ cat wc_report.json
{
}
cpeel@test:~$ cat wc_report_accepted.json
{
"accepted_words": ["uno"]
}
And API calls I used -- note that you have to have the page saved as in-progress by the user with the API key for this to work or you'll (correctly) get errors.
export API_KEY=something
curl -i -H "Accept: application/json" -H "X-API-KEY: $API_KEY" \
-d @wc_report.json \
-X PUT "https://www.pgdp.org/~rp31/c.branch/api_wc3/api/v1/projects/projectID45c225f598e32/pages/123.png/wordcheck"
curl -i -H "Accept: application/json" -H "X-API-KEY: $API_KEY" \
-d @wc_report_accepted.json \
-X PUT "https://www.pgdp.org/~rp31/c.branch/api_wc3/api/v1/projects/projectID45c225f598e32/pages/123.png/wordcheck"
I used your examples, customized for myself, but I'm not entirely sure what sort of data I should have in my file, or what results I should be getting on success. |
This endpoint is inserting records into the select * from wordcheck_events where username='srjfoo' order by timestamp desc limit 10; The |
Thanks, this was exactly what I needed! |
Sandbox at: https://www.pgdp.org/~rp31/c.branch/api_wc3
There are two endpoints: