StreetCrimesService

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable()
export class StreetCrimesService {

  constructor(private http: HttpClient ) {}

  search(lat: number, long: number, yearMonth: string) {
    return this.http
      .get(`https://data.police.uk/api/crimes-street/all-crime?lat=${lat}&lng=${long}&date=${yearMonth}`)
      .toPromise();

  }
}