typicalcrimes
Version:
133 lines (132 loc) • 3.89 kB
TypeScript
import { Agency, AgencyType } from '../types';
declare class Typicalcrimes {
private _request;
constructor(apiKey: string);
/**
* Retrieves the list of agencies
* @param { string } type - Type of agencies
* @param { string } relevantInfo
* @param { number } pageNum
*/
getAgencies({ type, relevantInfo, page, }?: {
type?: AgencyType;
relevantInfo?: string;
page?: number;
}): Promise<{
[stateAbbr: string]: {
[agencyOri: string]: Agency;
};
}>;
/**
* Retrieves the list of agency participations
* @param { string } scope
* @param { string } relevantInfo
*/
getAgencyParticipation({ scope, relevantInfo, }: {
scope: string;
relevantInfo: string;
}): Promise<any>;
/**
* Retrieves detailed stats offered only for arson
* @param { string } scope
* @param { string } relevantInfo
*/
getArsonStats({ scope, relevantInfo, }: {
scope: string;
relevantInfo: string;
}): Promise<any>;
/**
* Retrieves the amount of crimes
* @param { string } scope
* @param { string } offense
* @param { string } relevantInfo
*/
getCrimeCount({ scope, offense, relevantInfo, }: {
scope: string;
offense: string;
relevantInfo: string;
}): Promise<any>;
/**
* Retrieves the summary of crimes
* @param { string } ori
* @param { string } offense
*/
getCrimeSummary({ ori, offense }: {
ori: string;
offense: string;
}): Promise<any>;
/**
* Retrieves the list of estimates
* @param { string } scope
* @param { string } relevantInfo
*/
getEstimates({ scope, relevantInfo, }: {
scope: string;
relevantInfo: string;
}): Promise<any>;
/**
* Retrieves the list of participants
* @param { string } type
* @param { string } scope
* @param { string } offense
* @param { string } classification
* @param { string } relevantInfo
*/
getParticipants({ type, scope, offense, classification, relevantInfo, }: {
type: string;
scope: string;
offense: string;
classification: string;
relevantInfo: string;
}): Promise<any>;
/**
* Retrieves the list of police employments
* @param { string } scope
* @param { string } relevantInfo
*/
getPoliceEmployment({ scope, relevantInfo }: {
scope?: string;
relevantInfo?: string;
}): Promise<any>;
/**
* Retrieve the list of regions
* @param { string } region
*/
getRegions(region?: string): Promise<any>;
/**
* Retrieve the list of states
* @param { string } state - State abbreviation
* @param { number } page - Page number to start from
*/
getStates({ state, page }: {
state: string;
page: number;
}): Promise<any>;
/**
* Validates coordinates
* @param { number } latitude
* @param { number } longitude
*/
private _validateCoords;
/**
* Returns true if the range is valid, otherwise it will return false
* @param { number } range - Range
*/
private _validateRange;
/**
* Validates the number of parameters
* @param { number } numArgs - Number of arguments
* @param { object } targetMethod
* @param { number } targetMethod.length
* @param { string } targetMethod.name
*/
private _validateNumParams;
/**
* Validates the type parameter
* @param { string } parameter
* @param { string } desiredType
* @param { string } name
*/
private _validateTypeParam;
}
export default Typicalcrimes;