Open Source API & Scrapbook Helper

Was auch immer an Tools für Shakes&Fidget aufkommen, hier können sie vorgestellt werden.
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: Open Source S&F API

Beitrag von marenga »

DasAoD hat geschrieben: Mi 10. Jan 2024, 16:45 I haven't thought about this export function yet, as I have a different problem for the moment. ;)

Another thing that just occurred to me.
On servers that are soon to be merged, the new address is already displayed next to characters after logging in via SSO.
Is this how the addresses are retrieved from the server?
Scrapbook Helper fusion server.png
Interesting. The short answer is yes, but it is also be a bug I have to fix. What the SSO endpoint actually sends back is a number, that you have to associate with a url. These mappings are fetched from here: https://sfgame.net/config.json

These include both the original (d) and merged (md) url. There is however also another field "m" with a date showing the date when the servers merged. Up until now, this was always in the past and all merged urls were valid, so I assumed this date was just extra info to diplay to the user, when the servers were merged. For f9, this value is in the future though, so I am going to have to change it in the API, so that the merged url only gets used after the merge date has passed. Should be fixed by tomorrow
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag:
DasAoD (Do 11. Jan 2024, 07:06)
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: Open Source S&F API

Beitrag von marenga »

The export to clipboard button is implemented and the fusion stuff is fixed in the newest release:

https://github.com/the-marenga/sf-scrap ... r/releases

Feel free to try it out and see if everything works as expected
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag (Insgesamt 2):
DasAoD (Do 11. Jan 2024, 07:06) • Bossi (Do 11. Jan 2024, 09:58)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

Thank you very much for the answer and your great work. 😀👍
Bossi
Beiträge: 21
Registriert: Sa 28. Sep 2019, 14:53
Hat sich bedankt: 9 Mal
Danksagung erhalten: 7 Mal

Re: Open Source S&F API

Beitrag von Bossi »

Hello and thank you very much again. It works perfectly.
Greetings Bossi
Gustav
Beiträge: 3
Registriert: So 9. Apr 2023, 16:06
Hat sich bedankt: 1 Mal
Danksagung erhalten: 1 Mal

Re: Open Source S&F API

Beitrag von Gustav »

Working great for me! Thank you very much =)
One thing I noticed is that the scrollbar is very close to the "Fight" button and someone could maybe missclick there.
neuhier
Beiträge: 123
Registriert: Sa 7. Nov 2020, 21:40
Hat sich bedankt: 25 Mal
Danksagung erhalten: 25 Mal

Re: Open Source S&F API

Beitrag von neuhier »

marenga hat geschrieben: So 7. Jan 2024, 23:52 If you want to build a tool to talk to the Shakes and Fidget servers, you need to have an API, that handles the communication. Whatever the mfbot uses to do so is not open to the public and as far as I know, there is no other community API. As such, I made my own in Rust:

https://github.com/the-marenga/sf-api

It should support every request, that you can send via the official game client, as well as parsing the corresponding responses. This should allow you to build everything from a script to update your charcter description, up to a fully fledged Shakes and Fidget Bot without ever having to think about the horrible S&F Server encoding, that took me around 8000 lines of code to parse.

As a proof of concept of handling multiple accounts and user input in a GUI, I build myself a small tool to quickly fill the scrapbook:

https://github.com/the-marenga/sf-scrapbook-helper

I will try to keep the API up to date, but feel free to open a github issue, if anything needs to be updated, or is otherwise broken, or missing.

I hope someone here has a use for this :D
amazing thank you !
Hello there
StewieBiatch
Beiträge: 134
Registriert: Di 21. Dez 2021, 11:58
Hat sich bedankt: 13 Mal
Danksagung erhalten: 15 Mal

Re: Open Source S&F API

Beitrag von StewieBiatch »

Fuuuuuuuu.k, this works like charm! I am so happy right now :) Will there be any chance to "buy you a beer"?
StewieBiatch
Beiträge: 134
Registriert: Di 21. Dez 2021, 11:58
Hat sich bedankt: 13 Mal
Danksagung erhalten: 15 Mal

Re: Open Source S&F API

Beitrag von StewieBiatch »

Would be nice to have an option to log out and log in with different acc without need to close the app...maybe? :)
DasAoD
Beiträge: 106
Registriert: Do 14. Mai 2020, 00:14
Hat sich bedankt: 48 Mal
Danksagung erhalten: 26 Mal

Re: Open Source S&F API

Beitrag von DasAoD »

StewieBiatch hat geschrieben: Fr 16. Feb 2024, 09:05 Would be nice to have an option to log out and log in with different acc without need to close the app...maybe? :)
Good point.
Benutzeravatar
marenga
Beiträge: 14
Registriert: Mi 15. Nov 2023, 09:37
Hat sich bedankt: 5 Mal
Danksagung erhalten: 18 Mal

Re: Open Source S&F API

Beitrag von marenga »

StewieBiatch hat geschrieben: Do 15. Feb 2024, 09:57 Fuuuuuuuu.k, this works like charm! I am so happy right now :) Will there be any chance to "buy you a beer"?
Thanks! If you want to donate to me, I just made a donation page today :) :
https://ko-fi.com/marenga
StewieBiatch hat geschrieben: Fr 16. Feb 2024, 09:05 Would be nice to have an option to log out and log in with different acc without need to close the app...maybe? :)
Yeah, that sounds good. I will put that on my todo list.


By the way, the next version of this tool should be available by tomorrow or so. Instead of crawling for hours, you will then just be able to download a ~4MB file per server in a few seconds, that contains all the data necessary. I will keep these files updated roughly every week, so they should be almost as good as new and improve the usability drastically. Of course the manual crawling will still be supported, if you need the latest data for new servers or something.
Folgende Benutzer bedankten sich beim Autor marenga für den Beitrag (Insgesamt 2):
DasAoD (Sa 17. Feb 2024, 13:23) • CinExPL (Mi 24. Apr 2024, 00:06)
Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 20 Gäste