GENDER API TYPESCRIPT

먼저 composer로 우리 라이브러리를 설치해 줘:

전체 클라이언트 문서는 여기에서 확인해 줘:

https://github.com/markus-perl/gender-api-client

먼저 npm으로 우리 라이브러리를 설치해 줘:

$ npm i gender-api.com-client --save
import {Client as GenderApiClient, ResultSingleName} from "gender-api.com-client";

const genderApiClient = new GenderApiClient("your API key");

try {
    genderApiClient.getByFirstName('theresa', (response: ResultSingleName) => {
      console.log(response.gender); //female
      console.log(response.accuracy); //98
    });

    genderApiClient.getByFirstNameAndCountry('john', 'US', (response: ResultSingleName) => {
      console.log(response.gender); //male
      console.log(response.accuracy); //99
    });
}
catch(e) {
  console.log('Error:', e);
}

전체 클라이언트 문서는 여기에서 확인해 줘:

https://github.com/markus-perl/gender-api-client-npm

먼저 npm으로 우리 라이브러리를 설치해 줘:

전체 클라이언트 문서는 여기에서 확인해 줘:

https://github.com/markus-perl/gender-api-client-npm

채팅