Add isWord check to domains

This commit is contained in:
2023-09-05 11:45:23 -06:00
parent cc2a1971f0
commit 9b9953e807
5 changed files with 18 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import {
} from './types';
import axios from 'axios';
import { filter, map, pipe } from 'ramda';
import { IswordService } from 'src/isword/isword.service';
const parkIoEndpoints = {
domains: 'https://park.io/domains.json',
@@ -22,6 +23,10 @@ const parkIoEndpoints = {
@Injectable()
export class ParkioService {
constructor(
private readonly isWordService: IswordService
) {}
fetchDomainsForTld = async (tld: ParkioTld) => {};
fetchAllDomains = async (limit: number = 10_000): Promise<ParsedDomain[]> => {
@@ -75,6 +80,7 @@ export class ParkioService {
date_registered: domain.date_registered
? this.parseDate(domain.date_registered)
: undefined,
is_word: this.isWordService.isWord(domainName)
};
};
@@ -100,6 +106,7 @@ export class ParkioService {
created: this.parseDate(auction.created),
domain,
domain_length: domain.length,
is_word: this.isWordService.isWord(domain),
tld,
};
};