16 lines
358 B
TypeScript
16 lines
358 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class OedbApi {
|
|
private baseUrl = 'https://api.openeventdatabase.org';
|
|
|
|
constructor(private http: HttpClient) {
|
|
}
|
|
|
|
getEvents(params: any) {
|
|
return this.http.get(`${this.baseUrl}/event`, { params });
|
|
}
|
|
}
|