GENDER API TYPESCRIPT

أولاً قم بتثبيت مكتبتنا باستخدام composer:

شاهد وثائق العميل الكاملة هنا:

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

أولاً قم بتثبيت مكتبتنا باستخدام npm:

npm install gender-api.com-client --save
import { Client } from 'gender-api.com-client';

const client = new Client('your-api-key');

// Simple gender lookup
const result = await client.getByFirstName('Theresa');
console.log(`${result.first_name} is ${result.gender} (Probability: ${result.probability}`);

// First name with country (e.g., "Andrea" varies by country)
const resultWithCountry = await client.getByFirstName('Andrea', { country: 'IT' });
console.log(`${resultWithCountry.first_name} in Italy is ${resultWithCountry.gender}`);

// Full name with automatic first/last name splitting
const fullResult = await client.getByFullName('John Smith');
console.log(`${fullResult.first_name} ${fullResult.last_name} is ${fullResult.gender}`);

// Email address analysis
const emailResult = await client.getByEmailAddress('marie.curie@example.com');
console.log(`Email gender: ${emailResult.gender}`);

// Batch processing - multiple names in one call
const names = [
  { id: '1', first_name: 'Theresa', country: 'US' },
  { id: '2', first_name: 'John', country: 'US' }
];
const batchResults = await client.getByFirstNameMultiple(names);

batchResults.forEach(r => {
  console.log(`ID: ${r.input.id}, Gender: ${r.gender}`);
});

// Account statistics
const stats = await client.getStatistics();
console.log(`Credits Remaining: ${stats.remaining_credits}`);

شاهد وثائق العميل الكاملة هنا:

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

أولاً قم بتثبيت مكتبتنا باستخدام npm:

شاهد وثائق العميل الكاملة هنا:

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

أولاً، ثبّت مكتبتنا باستخدام pip:

شاهد وثائق العميل الكاملة هنا:

https://github.com/markus-perl/gender-api-client-python
https://pypi.org/project/gender-api-client/

محادثة