-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wow] Begin the creation of @blizzard-api/wow with achievement API types
- Loading branch information
Showing
6 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@blizzard-api/wow': patch | ||
--- | ||
|
||
Begin the creation of @blizzard-api/wow with achievement API types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Resource } from '@blizzard-api/core'; | ||
import { base, mediaBase } from './base'; | ||
|
||
const achievementBase = `${base}/achievement`; | ||
const achievementCategoryBase = `${base}/achievement-category`; | ||
|
||
export const achievement = { | ||
achievementCategory: (achievementCategoryId?: number): Resource => { | ||
return { | ||
path: achievementCategoryId | ||
? `${achievementCategoryBase}/${achievementCategoryId}` | ||
: `${achievementCategoryBase}/index`, | ||
namespace: 'static', | ||
}; | ||
}, | ||
achievement: (achievementId?: number): Resource => { | ||
return { | ||
path: achievementId ? `${achievementBase}/${achievementId}` : `${achievementBase}/index`, | ||
namespace: 'static', | ||
}; | ||
}, | ||
media: (achievementId: number): Resource => { | ||
return { path: `${mediaBase}/achievement/${achievementId}`, namespace: 'static' }; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const base = '/data/wow' as const; | ||
|
||
export const mediaBase = `${base}/media` as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { achievement } from './achievement'; | ||
|
||
export const gameDataApi = { | ||
achievement, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
console.log('coool???'); | ||
import { gameDataApi } from './game-data'; | ||
|
||
export const wow = { | ||
...gameDataApi, | ||
}; |