markski1 / SAMonitor

SA:MP / open.mp server list browser and api.
https://sam.markski.ar
17 stars 6 forks source link

[Question] NuGet #4

Closed J0nathan550 closed 11 months ago

J0nathan550 commented 11 months ago

Can you add in the future or soon the NuGet package of your API?

markski1 commented 11 months ago

Hello, what would you like a NuGet package for?

SAMonitor is a standalone application, not a library, but please explain what you want to do

J0nathan550 commented 11 months ago

Well, can't your project be converted to library so everyone could easily access files through nuget than downloading everything from Github?

J0nathan550 commented 11 months ago

I'm very sorry, I just understand that your project is specifying the standalone ASP.NET Core web app, What I wanted is to have an API to use for WPF or Forms to retrieve some data, if you could do that I would be much appreciated to have access to do that, I will try to do workaround to use the API for different types of apps.

markski1 commented 11 months ago

Hello Jonathan, sorry for my delay. If you want to use the SAMonitor API you'll have to use it through the endpoints in README.md but if what you want is a NuGet package to query samp servers, please look at SAMPQuery, which is available in NuGet.

https://github.com/justmavi/sampquery

The querying mechanism in SAMonitor is built on this library too.

J0nathan550 commented 11 months ago

Hey, this API that you send is good, but it misses the part of getting list of all servers online, using your website with JSON I managed to pull all of the online servers in SAMP. I will try to contribute my solution onto how to get the list of all online servers.

markski1 commented 11 months ago

If you ONLY want online servers, make sure to pull from the GetFilteredServers endpoint instead of the GetAllServers. FilteredServers by default removes servers which are offline

J0nathan550 commented 11 months ago

Oh snap, I will try to list through FilterServers then, also change little bit the Pull Request in: https://github.com/justmavi/sampquery/pull/12