handwriting.js icon indicating copy to clipboard operation
handwriting.js copied to clipboard

[Feature] Add alternative service endpoint URLs

Open cbrender-deploy1 opened this issue 2 years ago • 3 comments

Currently, handwriting.js only POSTs to one service endpoint, that is https://www.google.com.tw/inputtools/request?ime=handwriting&app=mobilesearch&cs=1&oe=UTF-8. I propose that we add alternative service endpoint URLs which the user could pick from. This will reduce the load off Google's servers, and will circumvent (or at least alleviate the restrictions of) Google's API usage limits.

Here are the possible alternative service endpoint URLs the could choose from:

let serviceEndpointURLs = {
    "default": "https://www.google.com.tw/inputtools/request?ime=handwriting&app=mobilesearch&cs=1&oe=UTF-8",
    "google_tw": "https://www.google.com.tw/inputtools/request?ime=handwriting",
    "google_jp": "https://www.google.co.jp/inputtools/request?ime=handwriting",
    "google": "https://www.google.com/inputtools/request?ime=handwriting",
    "inputtools": "https://inputtools.google.com/request?ime=handwriting"
}

I will try to create a pull request to day to implement these. What do you think?

cbrender-deploy1 avatar Mar 18 '23 02:03 cbrender-deploy1

I have a question, where do I see these requests, can you give docs? Thanks 🙂

ddloo avatar Apr 06 '23 09:04 ddloo

I have a question, where do I see these requests, can you give docs? Thanks 🙂

No docs, it's in the page source of Google Translate.

cbrender-deploy1 avatar May 06 '23 02:05 cbrender-deploy1

Can you tell me which page I can see the "Google's API usage limits" for this handwriting API? I want to check and confirm. Thank you very much!

pkpeterkwok avatar Jul 06 '23 01:07 pkpeterkwok