Message from @Vesdii
Discord ID: 508462679904747532
:0
For example, to post a message to a Discord channel, you can just send a bunch of plain text through HTTP to the endpoint/URL and that's it.
o
All your credentials are passed as URL parameters, etc.
ohhh
kinda like how on some sites you can fill in say for example a text box with content at the same time youre loading the page by passing it through the URL?
So, if I had an REST endpoint, a fictional one, you could browser the URL https://api.mockingbird.com/latestupdate
Your browser would send an HTTP GET request, which is the same it does to retrieve the website of a regular web server.
But, instead of sending back HTML that your browser would display, it send you back the latest update of some news site, for example, or a MotD.
what do you mean an endpoint
An endpoint is like an URL for an API.
For example, the fictional URL above would be the endpoint for my fictional REST API.
Or, to take the example of Gab, or Minds, they have an endpoint for their API, too.
heh pewdiepie got shapiro to do bonus meme
For example, when I make a post to Minds, what my browser actually does is this:
i feel like i get the vague implications of what youre saying but it's all just a blur
It will send the server www.minds.com an HTTP POST to the URL https://www.minds.com/api/v1/newsfeed.
And this is the payload of the request, in a format called JSON, but it could be anything.
Then, the server sends me back a reply indicating the status of my request, like this.
back in the days of my very first coding adventures, i did Minecraft modding
And that's pretty much how REST APIs work in a nutshell. The same is true for Gab, Twitter, Facebook, Steemit, GNU Social, Mastodon, Discord, etc.
There are few services nowadays which don't have some kind of REST API.
Oh, YouTube works the same way, of course.
well i greatly appreciate all your effort in this explanation but its has done zero good, as i happen to just be kind of a tard
You already know how to program, so you are smart enough to wrap your head around it.
i still don't get what REST is
it's a buzzword
REST is basically just a name for calling functions over the Internet.
but i think my confusion roots from the misunderstanding of how exactly an API is....implemented/applied/worked with...???? idfk
It's using the same HTTP and URL schemas, but instead of denoting folders in a directory, for example, it encodes parameters of a call.
API = Application Programming Interface
It's just the name for a method through which you can invoke functionality.
what
For example, let's say you have a server.
you have urls, you post json to those urls, shit happens
tl;dr version :^)
Let's say, a simple Facebook. Each user has a biography and about page.
i dont understand servers besides the basic concept of "send request, get data", so don't even try this lol