Skip to content

Commit

Permalink
Fix encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoattal committed Mar 14, 2024
1 parent 81ccf99 commit de8b91a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions backend/src/scrapper/unreal/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export async function getProductPage(start: number, count: number) {
count,
sortBy: "effectiveDate",
sortDir: "ASC"
},
headers: {
"Accept-Encoding": "*"
}
});
return productPage.data.data;
Expand All @@ -78,18 +81,29 @@ export async function getCommentsPage(start: number, count: number, productId: s
count,
sortBy: "CREATEDAT",
sortDir: "ASC"
},
headers: {
"Accept-Encoding": "*"
}
});
return commentPage.data.data;
}

export async function getProduct(productId: string) {
const product = await Axios.get(`https://www.unrealengine.com/marketplace/api/assets/asset/${productId}`);
const product = await Axios.get(`https://www.unrealengine.com/marketplace/api/assets/asset/${productId}`, {
headers: {
"Accept-Encoding": "*"
}
});
return product.data.data;
}

export async function getRating(productId: string) {
const product = await Axios.get(`https://www.unrealengine.com/marketplace/api/review/${productId}/ratings`);
const product = await Axios.get(`https://www.unrealengine.com/marketplace/api/review/${productId}/ratings`, {
headers: {
"Accept-Encoding": "*"
}
});
return product.data.data;
}

Expand Down

0 comments on commit de8b91a

Please sign in to comment.