Skip to content

Commit

Permalink
add new game and monitoring
Browse files Browse the repository at this point in the history
Add Punishing: Gray Raven
Add status page uptimerobot
  • Loading branch information
ihsangan committed May 27, 2024
1 parent 3822faa commit 5794bb4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ GET `hsr?id=PLAYER_ID`
GET `hi?id=PLAYER_ID`

**Contoh:** https://api.isan.eu.org/nickname/hi?id=10000001
### Punishing: Gray Raven (AP, EU, NA)
GET `pgr?id=ID&zone=SERVER_ID`

Keterangan untuk identifikasi server: AP(Asia-Pasifik), EU(Europe), NA(North America)

**Contoh:** https://api.isan.eu.org/nickname/pgr?id=16746755&zone=AP
### Sausage Man
GET `sm?id=PLAYER_ID`

Expand Down Expand Up @@ -83,5 +89,7 @@ https://api.isan.eu.org/nickname/ml?id=1007909047&zone=13044&decode=false

Contoh penggunaan `?decode=true`
https://api.isan.eu.org/nickname/ml?id=1007909047&zone=13044&decode=true atau https://api.isan.eu.org/nickname/ml?id=1007909047&zone=13044 (sama saja).
## Monitoring
API monitoring [UptimeRobot](https://stats.uptimerobot.com/s9axzR77Fm)
# Copyright
© Projek ini dibawah lisensi: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/), tidak terafiliasi dengan Codashop
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@ async function callAPI(request) {
if (!id) {
return `{"success":false,"message":"Bad Request"}`
}
if (path.includes('/pgr')) {
if (zone.toLowerCase().includes('ap')) {
sn = 'Asia-Pacific'
sv = '5000'
} else if (zone.toLowerCase().includes('eu')) {
sn = 'Europe'
sv = '5001'
} else if (zone.toLowerCase().includes('na')) {
sn = 'North America'
sv = '5002'
} else {
return `{"success":false,"message":"Bad request"}`
}
const body = `voucherPricePoint.id=259947&voucherPricePoint.price=15136.0&voucherPricePoint.variablePrice=0&user.userId=${id}&user.zoneId=${sv}&voucherTypeName=PUNISHING_GRAY_RAVEN&shopLang=id_ID`
const request = new Request(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
body
})
const response = await fetch(request)
const data = await response.json()
return `{"success":true,"game":"Punishing: Gray Raven","server":"${sn}","id":${id},"name":"${data.confirmationFields.username}"}`
}
if (path.includes('/hsr')) {
if (id. startsWith('6')) {
sn = 'America'
Expand Down

0 comments on commit 5794bb4

Please sign in to comment.