fbi-cde/crime-data-frontend

View on GitHub
src/util/api/agency.js

Summary

Maintainability
A
0 mins
Test Coverage
import { get } from '../http'
import { API } from './constants'

const getAgencies = params => get(`${API}/agencies`, params)
const getAgency = ori => get(`${API}/agencies/${ori}`)
const getAgencyOffenses = (ori, params) =>
  get(`${API}/agencies/${ori}/offenses`, params)
const getAgenciesForState = placeId =>
  get(`${API}/agencies/byStateAbbr/raw/${placeId}`)
export default {
  getAgencies,
  getAgency,
  getAgencyOffenses,
  getAgenciesForState
}