<commit_before>import ApiBase from "./../../common/apiBase";
import { constants } from "./../constants/constants";

export default class SpSearchApi extends ApiBase {

}<commit_msg>Initial Api Request<commit_after>import ApiBase from "./../../common/apiBase";
import { constants } from "./../constants/constants";
import { IInitialState, ISearchResult } from "../interfaces/spSearchInterfaces";

export default class SpSearchApi extends ApiBase {
    public getResults(state: IInitialState): Promise<ISearchResult[]> {
        return new Promise((resolve, reject) => {
            this.getWebUrl().then(webUrl => {
                const reqUrl = `${webUrl}/_api/search/query?querytext='*'&trimduplicates=false&selectproperties='Title%2cId%2cRefinableString43%2cPath'&refinementfilters='RefinableString43:test'&clienttype='ContentSearchRegular'`;
                this.getRequest(reqUrl).then((response: any) => {
                    const results: ISearchResult[] = [];

                    resolve(results);
                }).catch((error: any) => {
                    reject(error);
                });
            });
        });
    }
}
{'fraction_non_alphanumeric': 0.14636283961437335, 'fraction_numerical': 0.006134969325153374, 'mean_word_length': 2.819397993311037, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2551582', 'n_tokens_mistral': 310, 'n_tokens_neox': 307, 'n_words': 56}