Fixes #22 adding User-Agent request header - post review changes

This commit is contained in:
molo-pl
2021-01-12 23:29:25 +01:00
parent cf8a4cc26e
commit 55abd9f800
2 changed files with 52 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import axios from 'axios';
import * as ua from 'useragent-generator';
import { Gamemode, SkillName, ActivityName } from '../types';
import {
GAMEMODE_URL,
@@ -7,7 +8,6 @@ import {
SKILLS,
ACTIVITIES,
} from './constants';
const ua = require('useragent-generator');
export const getStatsURL = (gamemode: Gamemode, rsn: string) =>
`${GAMEMODE_URL[gamemode]}${STATS_URL}${encodeURIComponent(rsn)}`;