Skip to content

Commit

Permalink
load search key lazily
Browse files Browse the repository at this point in the history
mostly a copy of ckatzorke#64,
plus a typescript upgrade
  • Loading branch information
xavdid committed Aug 30, 2024
1 parent 33a1f2f commit 5375d74
Show file tree
Hide file tree
Showing 11 changed files with 329 additions and 152 deletions.
36 changes: 34 additions & 2 deletions dist/main/hltbsearch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,43 @@
* Takes care about the http connection and response handling
*/
export declare class HltbSearch {
protected searchKey: string;
static BASE_URL: string;
static DETAIL_URL: string;
static SEARCH_URL: string;
static IMAGE_URL: string;
payload: any;
private static readonly SEARCH_KEY_PATTERN;
payload: {
searchType: string;
searchTerms: any[];
searchPage: number;
size: number;
searchOptions: {
games: {
userId: number;
platform: string;
sortCategory: string;
rangeCategory: string;
rangeTime: {
min: number;
max: number;
};
gameplay: {
perspective: string;
flow: string;
genre: string;
};
modifier: string;
};
users: {
sortCategory: string;
};
filter: string;
sort: number;
randomizer: number;
};
};
detailHtml(gameId: string, signal?: AbortSignal): Promise<string>;
search(query: Array<string>, signal?: AbortSignal): Promise<any>;
search(query: Array<string>, signal?: AbortSignal, retry?: boolean): Promise<any>;
private getSearchKey;
}
140 changes: 96 additions & 44 deletions dist/main/hltbsearch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main/hltbsearch.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/main/howlongtobeat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5375d74

Please sign in to comment.