-
Notifications
You must be signed in to change notification settings - Fork 1
Animu
Sayad Uddin Tahsin edited this page Apr 7, 2023
·
2 revisions
The Animu category is a collection of endpoints provided by the Some Random API that returns various anime-related GIFs. These endpoints can be used by developers to integrate anime-related features into their applications or projects.
Returns the GIF Link of a Face Palm
- gif_link (str): The gif link of face palm.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the face palm gif.
- name (str, optional): Image name/path. Defaults to "face palm.gif".
- bool: Returns True if the gif was successfully saved.
-
InvalidFileFormat: Raised when an unsupported file format is given rather than
.gif
. - ImageRetrieveError: Raised when the gif fails to load.
- ImageNotFound: Raised when the gif fails to save.
from sra import animu
# Create a new instance of the Face Palm class
facepalm = animu.FacePalm()
# Get the gif link of the face palm
gif_link = facepalm.gif_link
# Save the pace palm gif
facepalm.save_gif("face_palm.gif")
Returns the GIF Link of a Hug
- gif_link (str): The gif link of hug.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the hug gif.
- name (str, optional): Image name/path. Defaults to "hug.gif".
- bool: Returns True if the gif was successfully saved.
-
InvalidFileFormat: Raised when an unsupported file format is given rather than
.gif
. - ImageRetrieveError: Raised when the gif fails to load.
- ImageNotFound: Raised when the gif fails to save.
from sra import animu
# Create a new instance of the Hug class
hug = animu.Hug()
# Get the gif link of the hug
gif_link = hug.gif_link
# Save the hug gif
hug.save_gif("hug.gif")
Returns the GIF Link of a Pat
- gif_link (str): The gif link of pat.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the pat gif.
- name (str, optional): Image name/path. Defaults to "pat.gif".
- bool: Returns True if the gif was successfully saved.
-
InvalidFileFormat: Raised when an unsupported file format is given rather than
.gif
. - ImageRetrieveError: Raised when the gif fails to load.
- ImageNotFound: Raised when the gif fails to save.
from sra import animu
# Create a new instance of the Pat class
pat = animu.Pat()
# Get the gif link of the face palm
gif_link = pat.gif_link
# Save the pat gif
pat.save_gif("pat.gif")
Returns the GIF Link of a Wink
- gif_link (str): The gif link of wink.
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Saves the wink gif.
- name (str, optional): Image name/path. Defaults to "wink.gif".
- bool: Returns True if the gif was successfully saved.
-
InvalidFileFormat: Raised when an unsupported file format is given rather than
.gif
. - ImageRetrieveError: Raised when the gif fails to load.
- ImageNotFound: Raised when the gif fails to save.
from sra import animu
# Create a new instance of the Wink class
wink = animu.Wink()
# Get the gif link of the wink
gif_link = wink.gif_link
# Save the wink gif
wink.save_gif("wink.gif")
Returns a random Quote from Anime
- quote (str): The Quote sentence
- character (str): The Character it given
- anime_name (str): The Anime name from where the Quote from
- raw (dict): The raw JSON response from the API.
- APITimeout: Raised when the API takes too long to respond.
- APIError: Raised when the API returns an error.
Returns a random Quote in a structured Way.
- str: Returns the Quote, Character and Anime Name structurally.
from sra import animu
# Create a new instance of the Quote class
quote = animu.Quote()
# Get the quote sentence, character, anime name of the quote
sentence = quote.quote
character = quote.character
anime = quote.anime
# Get the Structured Quote
structured = quote.structured()
sra-pylib by Sayad Uddin Tahsin
-
Animal
-
Animu
-
Canvas
-
Facts
-
Image
-
Others
-
Pokemon
-
Chatbot
-
Welcome (Free)
- ImageNotFound
- InvalidFileFormat
- APITimeout
- APIError
- ImageRetrieveError
- InvalidAvatarURL
- InvalidImageURL
- InvalidHEXColor
- InvalidBrightnessPower
- InvalidRGBCode
- DisplayNameError
- UsernameError
- CommentError
- ThemeError
- InvalidTemplate
- InvalidBackground
- InvalidFont
- InvalidType
- InvalidTextColor
- ThresholdError