Skip to content

stjordanis/dym

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DYM – Did You Mean...

What is this?

I needed a simple way to fix user mispelling on one of my apps and I thought it would be neat if I could leverage suggestions from Google, so I created this open API. It could not be simpler now to get suggestions on mispellings.

Google blocks their suggestion API from cross origin calls, so DYM allows you to easily get a suggestion array from anywhere.

How to use the API

  • DYM only accepts GET Requests.
  • Header Accept must be set to application/json
  • Query must be formatted for URL.
  • Request must be sent to http://dym.show/QUERY

Javascript Example 

    const request = new XMLHttpRequest();
    request.open('GET', 'http://dym.show/'+QUERY, true);
    request.setRequestHeader('Accept', 'application/json');

    request.onreadystatechange = function() {
        if (request.readyState === 4) {
            const response = JSON.parse(request.responseText);
            // do stuff here
        }
    };

    request.send();

About

Did You Mean

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 47.9%
  • CSS 32.7%
  • JavaScript 19.4%