Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/UmamiApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ export class UmamiApiClient {
region?: string;
city?: string;
limit?: number;
tag?: string;
},
): Promise<ApiResponse<SearchResult<Umami.WebsiteMetric[]>>> {
return this.get(`websites/${websiteId}/metrics`, params);
Expand All @@ -372,6 +373,7 @@ export class UmamiApiClient {
country?: string;
region?: string;
city?: string;
tag?: string;
},
): Promise<ApiResponse<Umami.WebsitePageviews>> {
return this.get(`websites/${websiteId}/pageviews`, params);
Expand All @@ -393,6 +395,7 @@ export class UmamiApiClient {
country?: string;
region?: string;
city?: string;
tag?: string;
},
): Promise<ApiResponse<Umami.WebsiteStats>> {
return this.get(`websites/${websiteId}/stats`, params);
Expand Down Expand Up @@ -994,6 +997,7 @@ export class UmamiApiClient {
city?: string | undefined;
language?: string | undefined;
limit?: number | undefined;
tag?: string | undefined;
},
) => this.getWebsiteMetrics(id, data),
},
Expand All @@ -1015,6 +1019,7 @@ export class UmamiApiClient {
country?: string | undefined;
region?: string | undefined;
city?: string | undefined;
tag?: string | undefined;
},
) => this.getWebsitePageviews(id, data),
},
Expand Down Expand Up @@ -1112,6 +1117,7 @@ export class UmamiApiClient {
country?: string | undefined;
region?: string | undefined;
city?: string | undefined;
tag?: string | undefined;
},
) => this.getWebsiteStats(id, data),
},
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('Testing all get functions', () => {
const results = await apiClient.client.getWebsiteMetrics(process.env.UMAMI_WEBSITE_ID, {
startAt: START_AT,
endAt: END_AT,
unit: 'hour',
type: 'url',
});

Expand All @@ -49,6 +50,7 @@ describe('Testing all get functions', () => {
const results = await apiClient.client.getWebsitePageviews(process.env.UMAMI_WEBSITE_ID, {
startAt: START_AT,
endAt: END_AT,
unit: 'hour',
url: '/',
timezone: 'America/Los_Angeles',
});
Expand Down