Seite 2 von 6

Re: Open Source S&F API

Verfasst: Do 11. Jan 2024, 00:58
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

Re: Open Source S&F API

Verfasst: Do 11. Jan 2024, 03:52
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

Re: Open Source S&F API

Verfasst: Do 11. Jan 2024, 07:07
von DasAoD
Thank you very much for the answer and your great work. 😀👍

Re: Open Source S&F API

Verfasst: Do 11. Jan 2024, 09:58
von Bossi
Hello and thank you very much again. It works perfectly.
Greetings Bossi

Re: Open Source S&F API

Verfasst: Fr 12. Jan 2024, 12:47
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.

Re: Open Source S&F API

Verfasst: Sa 13. Jan 2024, 16:47
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 !

Re: Open Source S&F API

Verfasst: Do 15. Feb 2024, 09:57
von StewieBiatch
Fuuuuuuuu.k, this works like charm! I am so happy right now :) Will there be any chance to "buy you a beer"?

Re: Open Source S&F API

Verfasst: Fr 16. Feb 2024, 09:05
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? :)

Re: Open Source S&F API

Verfasst: Fr 16. Feb 2024, 09:27
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.

Re: Open Source S&F API

Verfasst: Sa 17. Feb 2024, 10:05
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.