mistval / unofficial-jisho-api

Encapsulates the official Jisho.org API and also provides kanji, example, and stroke diagram search.
MIT License
139 stars 14 forks source link

Adds TS typings for unofficial-jisho-api #11

Closed damien-mcmahon closed 5 years ago

damien-mcmahon commented 5 years ago

Hi, Thanks for the work you've put in on this API. I've added an initial TypeScript definitions file that others may find useful.

Thanks!

mistval commented 5 years ago

Hiya again 👋 It looks pretty good, but the searchForPhrase function actually returns very different results from the scrapeForPhrase function. The searchForPhrase function returns the official API results which are undocumented and look like this: https://jisho.org/api/v1/search/words?keyword=house

I'd be okay with just having it return any for now, then maybe I would add proper definitions for it later on, or if you'd like to take a shot at it you're more than welcome to.

damien-mcmahon commented 5 years ago

Hey Mistval, thanks for getting back to me. I'll make the changes and then we can get this merged.

mistval commented 5 years ago

Looks good 👍 I made a couple of small changes and merged. I'll push a new version to NPM shortly. Thanks for your contribution.