Files
poe-auto-pricer/app/services/poe.service.ts
2018-08-14 00:02:06 -05:00

24 lines
773 B
TypeScript

import { http } from '../http';
export class PoeService {
public static async getStash(): Promise<any> {
const res = await http.get(
'https://pathofexile.com/character-window/get-stash-items?league=Incursion&tabs=1&tabIndex=6&accountName=DoctorCoctor',
);
return res.data;
}
public static async priceCheck(item: any) {
const res = await http.get(`https://poeprices.info/api?l=Incursion&i=${encodeURI(btoa(item))}`, {
headers: {
// Host: 'poeprices.info',
// Connection: 'keep-alive',
'Cache-Control': 'max-age=600',
// Origin: 'https://poeprices.info',
// Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
},
});
return res.data;
}
}