Share your repls and programming experiences

← Back to all posts
Fully working Quote API
DepthStrider (10)

pog my first api :D yall add what ever quotes you want but please keep them SFW :)

pog champs be poggin

also pls dont judge me about the readme bc i suk at markdown ;-;

Comments
hotnewtop
maxina (46)

Nice!! How you make APIs? is it just like making a normal website or something?

DepthStrider (10)

@maxina Well, in simplest terms, yes, you do need a website. However, you don't need to set it up as an API, just use the jsonify function from flask (from flask import jsonify) and return a Python library through that function. I can send you some tutorial links that I found helpful in making this if you would like.

DepthStrider (10)

@DepthStrider The reason why you need to return a json list is because that is how API fetching/request libraries work off of. Otherwise the API would be useless.

Whippingdot (570)

Too lazy to try it sry

EpicGamer007 (1619)

wow pog. however, what i think u should add is only allow yourself to delete quotes (use replauth) because some idiot might come around and mass delete everything which would suck

EpicGamer007 (1619)

Also, your readme skills are really gud. You shouldn't worry about how good your markdown is anyways :)

DepthStrider (10)

@EpicGamer007 I agree. I plan on adding that. For now i will just back up the quotes.json until i add that.

Edit: I might just remove that feature.

DepthStrider (10)

@EpicGamer007 Also, does a favicon show up for you on my website? Just asking bc it doesnt for me...

EpicGamer007 (1619)

@DepthStrider nope, i dont see a favicon. maybe change the favicon url from favicon.ico to /favicon.ico and likewise with the .png (add a / at the beginning)

DepthStrider (10)

@EpicGamer007 like instead of this <link rel="shortcut icon" href="favicon.ico"></link>, do <link rel="shortcut icon" href="/favicon.ico"></link>?