/Cu3t0mAPI

An api wrapper for https://api.cu3t0m.repl.co/

Primary LanguagePythonOtherNOASSERTION

Cu3t0mAPI

A Python API wrapper.


About


Cu3t0mApi is an api wrapper for my api that I made for fun in around 20 minutes. As of writing, there are only a few endpoints but I plan to add more. My code is badly and lazily written but hey, it works!

Memes


Cu3t0mAPI.memes(topic, amount)
# Default topic is the subreddit 'memes' and default amount is '1'.

Will return Memes from Reddit.

Usage:

import Cu3t0mAPI

memes = Cu3t0mAPI.memes()
print(memes)
{"code":200,"post_link":"https://redd.it/r9i13b","subreddit":"memes","title":"Friendship Destroyer in a nutSHELL.","url":"https://i.redd.it/a87g8erqsq381.jpg","ups":189,"author":"1Shadowspark1","spoilers_enabled":true,"nsfw":false,"image_previews":["https://preview.redd.it/a87g8erqsq381.jpg?width=108&crop=smart&auto=webp&s=c1484e18100a3b6d2ba903ade6ecf186d069c9ee","https://preview.redd.it/a87g8erqsq381.jpg?width=216&crop=smart&auto=webp&s=3dba4111ceb5a328f971a3c55b84e251d52bd20c","https://preview.redd.it/a87g8erqsq381.jpg?width=320&crop=smart&auto=webp&s=8a0f4a2742e252fa63828cbe63bd00ba0cbbe479","https://preview.redd.it/a87g8erqsq381.jpg?width=640&crop=smart&auto=webp&s=1ae7bab3747227b0458b676fcd0a183ea9595bb8","https://preview.redd.it/a87g8erqsq381.jpg?width=960&crop=smart&auto=webp&s=44141f4bc79d4361a641b51b1a00724fb6076e62","https://preview.redd.it/a87g8erqsq381.jpg?width=1080&crop=smart&auto=webp&s=9ea0bad596f1be4f292fe090d89fe343e7cc0fb3"]}

Ai Response


Cu3t0mAPI.ai_response(question)
# Question is a required argument.

Will return an AI response.

Usage:

import Cu3t0mAPI

x=69
print("Simple use of the 'ai_response' function.")
while x == 69:
  q = input("")
  resp = Cu3t0mAPI.ai_response(q)
  response = json.loads(resp)
  print(response["message"])
  
Simple use of the 'ai_response' function.
Hi
Wassup man, how you doing.
im good
Glad to hear it. Want to read any news?
ok
<a href="http://www.msn.com/en-us/news">click here to search and view news</a>
why lol
The explanation is rather complicated.
ig it is
I see. May I ask you some simple questions?
ok
Great! How many languages can you speak?
3
3 is fine although the more the better.
bruh
I'm very enthusiastic.
clearly
Yes, it's obvious.