typicalcrimes
Version:
25 lines (24 loc) • 1.2 kB
TypeScript
import { AgencyType } from './types';
declare class Request {
private _baseURL;
private _headers;
private _apiKey;
constructor(baseURL: string, apiKey: string);
/**
* Sends a request
* @param { string } path - Path concatenated to the base url
* @param { object? } options - Request options
*/
fetch(path?: string, options?: any): Promise<any>;
getAgencies(type: AgencyType, relevantInfo: string, page: number): Promise<any>;
getAgencyParticipation(scope: string, relevantInfo: string): Promise<any>;
getArsonStats(scope: string, relevantInfo: string): Promise<any>;
getCrimeCount(scope: string, offense: string, relevantInfo: string): Promise<any>;
getCrimeSummary(ori: string, offense: string): Promise<any>;
getEstimates(scope: string, relevantInfo: string): Promise<any>;
getParticipants(type: string, scope: string, offense: string, classification: string, relevantInfo: string): Promise<any>;
getPoliceEmployment(scope?: string, relevantInfo?: string): Promise<any>;
getRegions(region: string): Promise<any>;
getStates(state: string, page: number): Promise<any>;
}
export default Request;