22 Replies
If it has an API then you can use it in C#
Ok so how
Tutorial: Make HTTP requests in a .NET console app using C#
Learn how to make HTTP requests to a REST web service and deserialize JSON responses. This tutorial creates a .NET console and uses C#.
https://api.hypixel.net/skyblock/bazaar
I think i wrote the link wrong
It is correct
this is the gist of it
looks correct
So as a quick mockup
That looks so complex to me 0-0
It's really not
You create an HttpClient and wait for it to respond to your url.
The rest just defines the structure of the data you're expecting to get back.
The article I sent covers how to do this
soooo
is my code and im getting
'SEEDS.seeds()' is inaccessible due to its protection level
what should i domake it public
Use
HttpClient
, not WebClient
how would i do that
Like I showed above
my friend gave me the api part of the code
And since your JSON has a well-defined structure, there is no reason to use
JObject
here, you can just turn the JSON into regular objects.
You can use $jsongen to generate classes from your JSON which you can then deserialize the string into.Instantly parse JSON in any language | quicktype
Whether you're using C#, Swift, TypeScript, Go, C++ or other languages, quicktype generates models and helper code for quickly and safely reading JSON in your apps. Customize online with advanced options, or download a command-line tool.
Convert JSON to C# Classes Online - Json2CSharp Toolkit
Convert any JSON object to C# classes online. Json2CSharp is a free toolkit that will help you generate C# classes on the fly.
also yes you need to make
Seeds
publicyeah i figured it out
well i published it (yeah the code is bad whatever) and its completely broken
the .exe is NOT working
it is but not correctly
at all
how its supposed to look
how it looks
on first use it works fine
first use per download
but then its broken
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.