UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
78 lines (77 loc) 2.92 kB
/** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.21.1 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { RedditResponse } from '../models/index'; export interface SearchRedditRequest { keywords: Array<string>; nThreads?: number; method?: SearchRedditMethodEnum; deep?: boolean; returnType?: SearchRedditReturnTypeEnum; timeFilter?: SearchRedditTimeFilterEnum; sort?: SearchRedditSortEnum; } /** * */ export declare class RedditApi extends runtime.BaseAPI { /** * Go to Reddit, search threads, summarize the threads, return analysis. `deep`=True is a live web scrape, AskNews searches Reddit, finds threads, summarizes them, analyzes them, and returns the results. `deep`=False is a search in AskNews\' existing database of Reddit threads. * Search Reddit, summarize threads, and return analysis. */ searchRedditRaw(requestParameters: SearchRedditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RedditResponse>>; /** * Go to Reddit, search threads, summarize the threads, return analysis. `deep`=True is a live web scrape, AskNews searches Reddit, finds threads, summarizes them, analyzes them, and returns the results. `deep`=False is a search in AskNews\' existing database of Reddit threads. * Search Reddit, summarize threads, and return analysis. */ searchReddit(requestParameters: SearchRedditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RedditResponse>; } /** * @export */ export declare const SearchRedditMethodEnum: { readonly Nl: "nl"; readonly Kw: "kw"; }; export type SearchRedditMethodEnum = typeof SearchRedditMethodEnum[keyof typeof SearchRedditMethodEnum]; /** * @export */ export declare const SearchRedditReturnTypeEnum: { readonly Dicts: "dicts"; readonly String: "string"; readonly Both: "both"; }; export type SearchRedditReturnTypeEnum = typeof SearchRedditReturnTypeEnum[keyof typeof SearchRedditReturnTypeEnum]; /** * @export */ export declare const SearchRedditTimeFilterEnum: { readonly Hour: "hour"; readonly Day: "day"; readonly Week: "week"; readonly Month: "month"; readonly Year: "year"; readonly All: "all"; }; export type SearchRedditTimeFilterEnum = typeof SearchRedditTimeFilterEnum[keyof typeof SearchRedditTimeFilterEnum]; /** * @export */ export declare const SearchRedditSortEnum: { readonly Relevance: "relevance"; readonly Hot: "hot"; readonly Top: "top"; readonly New: "new"; readonly Comments: "comments"; }; export type SearchRedditSortEnum = typeof SearchRedditSortEnum[keyof typeof SearchRedditSortEnum];