module api.py🔗
function search_gifs🔗
search_gifs(
q: str,
lang: str = None,
rating: giphpy.enums.Rating = None,
limit: int = None,
offset: int = None,
api_key: str = None,
random_id: str = None,
bundle: giphpy.enums.Bundle = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifListResponse]
Search for gifs by a query string.
https://developers.giphy.com/docs/api/endpoint#search
Args:
q: search query term or phraselang: specify language using a 2-letter ISO 639-1 language code.rating: filters results by specified ratinglimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0api_key: giphy api keyrandom_id: an ID/proxy for a specific user.bundle: returns only renditions that correspond to the named bundle.serialize: defaults to False. if True, returns aGifListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifListResponse if serialize is True, else httpx.Response
function search_stickers🔗
search_stickers(
q: str,
lang: str = None,
rating: giphpy.enums.Rating = None,
limit: int = None,
offset: int = None,
api_key: str = None,
random_id: str = None,
bundle: giphpy.enums.Bundle = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifListResponse]
Search for stickers by using a query string.
https://developers.giphy.com/docs/api/endpoint#search
Args:
q: search query term or phraselang: specify language using a 2-letter ISO 639-1 language code.rating: filters results by specified ratinglimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0api_key: giphy api keyrandom_id: an ID/proxy for a specific user.bundle: returns only renditions that correspond to the named bundle.serialize: defaults to False. if True, returns aGifListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifListResponse if serialize is True, else httpx.Response
function trending_gifs🔗
trending_gifs(
rating: giphpy.enums.Rating = None,
limit: int = None,
offset: int = None,
api_key: str = None,
random_id: str = None,
bundle: giphpy.enums.Bundle = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifListResponse]
Get trending gifs.
https://developers.giphy.com/docs/api/endpoint#trending
Args:
rating: filters results by specified ratinglimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0api_key: giphy api keyrandom_id: an ID/proxy for a specific user.bundle: returns only renditions that correspond to the named bundle.serialize: defaults to False. if True, returns aGifListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifListResponse if serialize is True, else httpx.Response
function trending_stickers🔗
trending_stickers(
rating: giphpy.enums.Rating = None,
limit: int = None,
offset: int = None,
api_key: str = None,
random_id: str = None,
bundle: giphpy.enums.Bundle = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifListResponse]
Get trending stickers.
https://developers.giphy.com/docs/api/endpoint#trending
Args:
rating: filters results by specified ratinglimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0api_key: giphy api keyrandom_id: an ID/proxy for a specific user.bundle: returns only renditions that correspond to the named bundle.serialize: defaults to False. if True, returns aGifListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifListResponse if serialize is True, else httpx.Response
function gif_translate🔗
gif_translate(
s: str,
api_key: str = None,
weirdness: int = None,
random_id: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifResponse]
Translate words or phrases to a single gif.
https://developers.giphy.com/docs/api/endpoint#translate
Args:
s: search termapi_key: giphy api keyweirdness('int',optional): value from 0-10 which makes results weirder as you go up the scalerandom_id: an ID/proxy for a specific userserialize: defaults to False. if True, returns aGifResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifResponse if serialize is True, else httpx.Response
function sticker_translate🔗
sticker_translate(
s: str,
api_key: str = None,
weirdness: int = None,
random_id: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifResponse]
Translate words or phrases to a single sticker.
https://developers.giphy.com/docs/api/endpoint#translate
Args:
s: search termapi_key: giphy api keyweirdness('int',optional): value from 0-10 which makes results weirder as you go up the scalerandom_id: an ID/proxy for a specific userserialize: defaults to False. if True, returns aGifResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifResponse if serialize is True, else httpx.Response
function random_gif🔗
random_gif(
api_key: str = None,
tag: str = None,
rating: giphpy.enums.Rating = None,
random_id: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifResponse]
Get a single random GIF
https://developers.giphy.com/docs/api/endpoint#random
Args:
api_key: giphy api keytag('str,optional`): filter results by a specified tagrating: filters results by specified ratingrandom_id: an ID/proxy for a specific userserialize: defaults to False. if True, returns aGifResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifResponse if serialize is True, else httpx.Response
function random_sticker🔗
random_sticker(
api_key: str = None,
tag: str = None,
rating: giphpy.enums.Rating = None,
random_id: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifResponse]
Get a single random sticker
https://developers.giphy.com/docs/api/endpoint#random
Args:
api_key: giphy api keytag('str,optional`): filter results by a specified tagrating: filters results by specified ratingrandom_id: an ID/proxy for a specific userserialize: defaults to False. if True, returns aGifResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifResponse if serialize is True, else httpx.Response
function random_id🔗
random_id(
api_key: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.RandomIdResponse]
Generate a unique ID you can assign to each new user in your app.
https://developers.giphy.com/docs/api/endpoint#random-id
Args:
api_key: giphy api keyserialize: defaults to False. if True, returns aRandomIdResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
RandomIdResponse if serialize is True, else httpx.Response
function action_register🔗
action_register(
url: str,
random_id: str,
ts: int,
api_key: str = None,
**kwargs
) → Response
Register an impression, click, or send sing a callback url from the analytics object.
https://developers.giphy.com/docs/api/endpoint#action-register
Args:
url: an impression, on click, or send callback url from the analytics objectrandom_id: an id/proxy for a specific userts: a unix timestamp in milliseconds corresponding to when the action occurredapi_key: giphy api key**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
httpx.Response
function get_gif_by_id🔗
get_gif_by_id(
gif_id: str,
api_key: str = None,
random_id: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.GifResponse]
Get a single gif by its unique identifier
https://developers.giphy.com/docs/api/endpoint#get-gif-by-id
Args:
gif_id: the unique identifier of the gif you want details forapi_key: giphy api keyrandom_id: an id/proxy for a specific userserialize: defaults to False. if True, returns aGifResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifResponse if serialize is True, else httpx.Response
function get_gifs_by_id🔗
get_gifs_by_id(
*gif_ids: str,
api_key: str = None,
random_id: str = None,
serialize: bool = None,
**kwargs
) → Union[httpx.Response, giphpy.models.GifListResponse]
Get one or more gifs by their unique identifiers
https://developers.giphy.com/docs/api/endpoint#get-gifs-by-id
Args:
*gif_ids: any number of unique identifiers for gifs you want details forapi_key: giphy api keyrandom_id: an id/proxy for a specific userserialize: defaults to False. if True, returns aGifListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
GifListResponse if serialize is True, else httpx.Response
function categories🔗
categories(
api_key: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.CategoryListResponse]
Get a list of gif categories on the giphy network.
https://developers.giphy.com/docs/api/endpoint#categories
Args:
api_key: giphy api keyserialize: defaults to False. if True, returns aCategoryListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
CategoryListResponse if serialize is True, else httpx.Response
function autocomplete🔗
autocomplete(
q: str,
api_key: str = None,
limit: int = None,
offset: int = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.SearchTermListResponse]
Provides a list of valid terms that completes the given tag on the giphy network
https://developers.giphy.com/docs/api/endpoint#autocomplete
Args:
q: tag termapi_key: giphy api keylimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0serialize: defaults to False. if True, returns aSearchTermListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
SearchTermListResponse if serialize is True, else httpx.Response
function channel_search🔗
channel_search(
q: str,
api_key: str = None,
limit: int = None,
offset: int = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.ChannelListResponse]
Returns all the giphy channels matching the query term.
https://developers.giphy.com/docs/api/endpoint#channel-search
Args:
q: accepts term to search through giphy’s channelsapi_key: giphy api keylimit: maximum number of objects to return. if not passed, 25offset: the starting position of results. if not passed, 0serialize: defaults to False. if True, returns aChannelListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
ChannelListResponse if serialize is True, else httpx.Response
function search_suggestions🔗
search_suggestions(
term: str,
api_key: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.TermListResponse]
Provides a list of tag terms related to the given tag on the giphy network.
https://developers.giphy.com/docs/api/endpoint#search-suggestions
Args:
term: tag termapi_key: giphy api keyserialize: defaults to False. if True, returns aTermListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
TermListResponse if serialize is True, else httpx.Response
function trending_search_terms🔗
trending_search_terms(
api_key: str = None,
serialize: bool = False,
**kwargs
) → Union[httpx.Response, giphpy.models.TrendingSearchTermsListResponse]
Provides a list of the most popular trending search terms on the giphy network.
https://developers.giphy.com/docs/api/endpoint#trending-search-terms
Args:
api_key: giphy api keyserialize: defaults to False. if True, returns aTermListResponseobject**kwargs: additional kwargs to pass down tohttpx.Client.get
Returns:
TrendingSearchTermsListResponse if serialize is True, else httpx.Response