Andyproject API

Nur Bullshit im Kopf

Server-Url: https://api.andyproject.de

Backup-Server-URL: http://data.andyproject.de (This URL have no security certificate)

Use the request method to get data from API. No Key needed for all APIs.

Method for all APIs: requests

Output is always in json.


Drachenlord API

Diese API richtet sich an die deutschen Entwickler. Die API gibt Sprüche und Zitate des Drachenlords aus. Wir wissen alle, das sein gelaber Legendär ist.

URL: https://api.andyproject.de/drache

Paramter für die request:

  • author
  • data

Example:

import requests

# API-URL
url = "https://api.andyproject.de/drache/"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Daten aus der Antwort extrahieren
data = response.json()

# Autor und Daten aus den JSON-Daten ausgeben
print("Author: " + data["author"])
print("Data: " + data["data"])

Quote API

This API returns citations in English, German and Spanish.

German URL: https://api.andyproject.de/quotes/de

English URL: https://api.andyproject.de/quotes/en

Spanish URL: https://api.andyproject.de/quotes/es

Parameters for a request:

  • quote
  • author

There are no customization or sorting options. Will be added in the future.

Example:

import requests

# API-URL
url = "https://api.andyproject.de/quotes/de/"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Daten aus der Antwort extrahieren
data = response.json()

# Zitat, Autor, Hinzufügedatum und Länge aus den JSON-Daten ausgeben
print("Zitat: " + data["quote"])
print("Autor: " + data["author"])
print("Hinzugefügt am: " + data["added"])
print("Länge: " + str(data["length"]))

Quotes as Image API

This API outputs quotes in the form of images. These quotes are currently only available in German.

URL: https://api.andyproject.de/quotes/img/de/

Example:

import requests

# URL der API
url = "https://api.andyproject.de/quotes/img/de/"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Antwort verarbeiten
if response.status_code == 200:
    json_response = response.json()
    bild_link = json_response["bild"]
    print("Bild-Link: ", bild_link)
else:
    print("Fehler bei der API-Anfrage. Statuscode:", response.status_code)


Meme API

This API outputs a random Reddit meme. One of the newest memes is always taken. The memes come from the subreddit „dankmemes“ and „memes“.

URL: https://api.andyproject.de/memes

Parameters for a request:

  • title
  • url

You can Add a „?no-gif“ to the URL to get only jpg, jpeg and png response.

URL: https://api.andyproject.de/memes/?no-gif

Example:

import requests

# API-URL
url = "https://api.andyproject.de/memes/?no-gif"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Daten aus der Antwort extrahieren
data = response.json()

# Titel und URL des Memes aus den JSON-Daten ausgeben
print("Titel: " + data["title"])
print("URL: " + data["url"])

Me in real

This API outputs „Me in real“ memes from Reddit.

URL: https://api.andyproject.de/meirl/

Example:

import requests

# API-URL
url = "https://api.andyproject.de/meirl/"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Daten aus der Antwort extrahieren
data = response.json()

# Titel und URL aus den JSON-Daten ausgeben
print("Title: " + data["title"])
print("URL: " + data["url"])

NSFW API

This API renders sexual content or NFSW. Before using the API I would like to point out that I have no influence on the content of the API. The data comes from different subreddits. For illegal content I assume no liability. By using the API you agree that I am not liable for any possible illegal content. Also, by using the API you allow that your IP address with timestamp will be stored and passed to the authorities in case of investigation.

URL: https://api.andyproject.de/nfsw

Parameters for the request:

  • title
  • url

Parameters for url for example: https://api.andyproject.de/nfsw/?clean

  • harry-potter (sorry for that)
  • nudes
  • clean
  • padme (also sorry for that)
  • legal-teens (hopefully legal, the Subreddit is called so)

If you use only „https://api.andyproject.de/nfsw“ you will see nfws content from all categories.

Please use the API conscientiously. Thanks

Example:

import requests

# API-URL
url = "https://api.andyproject.de/nfsw?padme"

# GET-Anfrage an die API senden
response = requests.get(url)

# JSON-Daten aus der Antwort extrahieren
data = response.json()

# Titel, URL des Bildes und Warnung aus den JSON-Daten ausgeben
print("Titel: " + data["title"])
print("URL des Bildes: " + data["url"])
print("Warnung: " + data["warning"])

PING

If you want to output the server data for the API, you can use this API.

Method: request

URL: https://api.andyproject.de/ping

Parameters for the request:

  • ping
  • cpu_usage
  • ram_usage
  • download_usage
  • upload_usage

Example:

import requests
import tkinter as tk

# Funktion zum Aktualisieren der API-Daten
def update_data():
    # API-URL
    url = "https://api.andyproject.de/ping"

    # GET-Anfrage an die API senden
    response = requests.get(url)

    # JSON-Daten aus der Antwort extrahieren
    data = response.json()

    # Werte aus den JSON-Daten aktualisieren
    ping_label.config(text="Ping: " + str(data["ping"]))
    cpu_label.config(text="CPU-Auslastung: " + str(data["cpu_usage"]))
    ram_label.config(text="RAM-Auslastung: " + str(data["ram_usage"]))
    download_label.config(text="Download-Auslastung: " + str(data["download_usage"]))
    upload_label.config(text="Upload-Auslastung: " + str(data["upload_usage"]))

    # Funktion alle 0,5 Sekunden erneut aufrufen
    root.after(500, update_data)

# GUI erstellen
root = tk.Tk()
root.title("API-Daten")

# Labels für die API-Daten erstellen
ping_label = tk.Label(root, text="")
ping_label.pack()
cpu_label = tk.Label(root, text="")
cpu_label.pack()
ram_label = tk.Label(root, text="")
ram_label.pack()
download_label = tk.Label(root, text="")
download_label.pack()
upload_label = tk.Label(root, text="")
upload_label.pack()

# Funktion zum Aktualisieren der API-Daten aufrufen
update_data()

# GUI starten
root.mainloop()