[CustomAPI] faceit last games/matches api

Hi! Apologizing for respoing too(!) late .Thank you for your stuff , it works perfectly. Have a nice day!

Finally updated for CS2.

There is no action required, it just gonna show the same data from cs2 instead of csgo.

Would it be possible to show ranks on specific leaderboards? Because in some hubs they launch weekly leaderboards instead of only season ones.

have a question, want to use !ladder but change the output from Iā€™m ranked 24 on EU Master League (PTS: 797 W/P: 100/167 WR: 0.6)) to Rank 1 EU, is that possible?

i can think of 2 waysā€¦ rank up to rank 1 in the game, or as a gag, modify the output of the commandā€¦ but for the modify the output part iā€™d needa see which version of the command uā€™re using, since iā€™ve seen a few different ones above

Hey, thank you for the api stuff cause i have no idea how this is working. It worked for me for csgo but now its not working anymore. I saw you changed a bit and copied it but for the nightbot it is too long. So i tryed it with the streamelements and fossabot but i only get the outcome which you can see in the picture. Can someone help me?
image

Please, give me an example. I checked it out and thereā€™s such a complex structure and Iā€™m not sure about which is exactly your case.

It wasnā€™t but Iā€™ve just added ladder detailed data, so youā€™d be able to combine it as you prefer.

For that exact petition you can fill a command with this:

$(eval const api = $(urlfetch json https://faceit.lcrypt.eu/?n=YOUR_FACEIT_USER); if (api.error) {api.message;} else if (api.detail.ladder.present) { 'Ranked '+ api.detail.ladder.position +' '+ api.detail.ladder.region })

output: Ranked 7150 EU (this is s1mple :face_with_open_eyes_and_hand_over_mouth:)

Check the second post for the available detailed data.

Youā€™re probably doing it incorrectly. You have to copy all this:

!addcom -cd=5 !elo $(eval const api = $(urlfetch json https://faceit.lcrypt.eu/?n=FiveSoF); if (api.error) {api.message;} else { '$(user), my elo is '+ api.elo +' (Lvl: '+ api.level +')' })

and paste it directly in your chat.

Iā€™ve tested this right now in my chat and it works. If it doesnā€™t, may be your Nightbot is not correctly linked with your twitch account.

If you are not in Twitch platform (iā€™m not using other chats) and it doesnā€™t work, you can alternatively add a command directly in your Nightbot commands section and paste only this part in the message box.

$(eval const api = $(urlfetch json https://faceit.lcrypt.eu/?n=FiveSoF); if (api.error) {api.message;} else { '$(user), my elo is '+ api.elo +' (Lvl: '+ api.level +')' })

PS: For other readers, note that this examples are from the opening post, and Iā€™ve hardcoded this user face it id, FiveSoF, so donā€™t copy it directly.

I need exmple ; Elo: 1874. Today: 1W, 2L, -25 elo. The current match: +24/-26 elo

!addcom -cd=5 !elo $(eval const api = $(urlfetch json http://api.faceit.myhosting.info:81/?n=YOUR_FACEIT_USER); if (api.error) {api.message;} else { 'Elo: '+ api.elo +'. Today: '+ api.today.win +'W, '+ api.today.lose +'L, '+ api.today.elo +' elo. The current match: '+ api.current.elo + ' elo' })

here ya goā€¦ just donā€™t forget to change ā€œYOUR_FACEIT_USERā€ to your actual username :wink:

1 Like

ty my freind i love you :slightly_smiling_face:

1 Like

Is it possible to somehow display this particular eu rating in the chat?
image

can u be more specific on what that number is?

that might mean something to somebody that knows about the game, i have no ideaā€¦ this api gives alotta numbers and none of them r named ā€œrankingā€ anythingā€¦ my best guess would be details.ladder.position but that is entirely a guessā€¦ but if thatā€™s the case, it would be thisā€¦

$(eval const api = $(urlfetch json http://api.faceit.myhosting.info:81/?n=YOUR_FACEIT_USER); if (api.error) {api.message;} else { api.details.ladder.position })

or to give a bit more detail and make it look prettierā€¦

$(eval const api = $(urlfetch json http://api.faceit.myhosting.info:81/?n=YOUR_FACEIT_USER); if (api.error) {api.message;} else { '$(user), I\'m ranked '+ api.ladder })

but donā€™t forget to change ā€œYOUR_FACEIT_USERā€ to your actual username

ok, Iā€™ll try, thanks for the answer and for the help.

1 Like

@keenssy
Iā€™ve just added this data to the response. New fields available:

region
region_ranking
country
country_ranking
country_flag (this pretends to be the flag icon, it works on cellphones but not in all browsers)

So, following @tiwosslave example:

$(eval const api = $(urlfetch json https://faceit.lcrypt.eu/?n=YOUR_FACEIT_USER); if (api.error) {api.message;} else { '$(user), I\'m ranked ' + api.region + ' ' + api.region_ranking })

will give you I'm ranked EU 204

1 Like

@Javier_Fernandez
Thank you very much for your work and your wonderful commands, you helped me a lot, have a nice day. :wink:

1 Like

oh, coolā€¦ and i see u added it to the json up above too (where i find the info people ask for) :wink:

1 Like