-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactions.service.ts
More file actions
34 lines (31 loc) · 823 Bytes
/
actions.service.ts
File metadata and controls
34 lines (31 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type {
StoreCategory,
StoreTag,
} from '../schemas/responses/actions.schemas'
import { BaseService } from './_base.service'
export class ActionsService extends BaseService {
constructor(apiKey: string) {
super(apiKey, 'store', 'actions')
}
/**
*
* @returns Returns all categories for the store
*/
async getCategories(): Promise<StoreCategory[]> {
const url = this.generateSteamUrl(`/ajaxgetstorecategories`, {}, false)
const response = await this.sendGETRequest<StoreCategory[]>(url)
return response
}
/**
*
* @returns Returns all tags for the store
*/
async getTags(): Promise<StoreTag[]> {
const url = this.generateSteamUrl(`/ajaxgetstoretags`, {}, false)
const response = await this.sendGETRequest<{
tags: StoreTag[]
success: number
}>(url)
return response.tags
}
}