diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 14:13:42 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 14:13:42 -0600 |
commit | 52e38809212133ef673d11bfa96ba3bb43c3644c (patch) | |
tree | f54408afd41cc64b64d5e82a3ad814b1bb55d4a7 /cleaners/player.ts | |
parent | a23103ec24128f2e24b93ad101ade6dfdd4758c3 (diff) | |
download | skyblock-api-52e38809212133ef673d11bfa96ba3bb43c3644c.tar.gz skyblock-api-52e38809212133ef673d11bfa96ba3bb43c3644c.tar.bz2 skyblock-api-52e38809212133ef673d11bfa96ba3bb43c3644c.zip |
move stuff into src folder
Diffstat (limited to 'cleaners/player.ts')
-rw-r--r-- | cleaners/player.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/cleaners/player.ts b/cleaners/player.ts deleted file mode 100644 index c3afd6f..0000000 --- a/cleaners/player.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { CleanBasicProfile, cleanPlayerSkyblockProfiles, Included } from '../hypixel' -import { CleanSocialMedia, parseSocialMedia } from './socialmedia' -import { CleanRank, parseRank } from './rank' -import { HypixelPlayer } from '../hypixelApi' -import { undashUuid } from '../util' - -export interface CleanBasicPlayer { - uuid: string - username: string -} - -export interface CleanPlayer extends CleanBasicPlayer { - rank: CleanRank - socials: CleanSocialMedia - profiles?: CleanBasicProfile[] -} - -export async function cleanPlayerResponse(data: HypixelPlayer): Promise<CleanPlayer> { - // Cleans up a 'player' api response - console.log('cleanPlayerResponse', data.stats.SkyBlock.profiles) - return { - uuid: undashUuid(data.uuid), - username: data.displayname, - rank: parseRank(data), - socials: parseSocialMedia(data.socialMedia), - profiles: cleanPlayerSkyblockProfiles(data.stats.SkyBlock.profiles) - } -} |