Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.
/ TenorGifs Public archive

Simple python class to handle requesting for gifs from Tenor.

License

Notifications You must be signed in to change notification settings

irtsa-dev/TenorGifs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

TenorGifs

Simple python class to handle requesting for gifs from Tenor.




Usage

To import the module, simply put:

from TenorGifs.TenorGifs import GifSearch


Then, later on you may utilize:

Gifs = GifSearch()

Gifs.search('hello')
#Searches for a gif and stores the resuls to be retrieved.
Gifs.Gifs
#Stored gifs.
Gifs.gifCount
#Returns the amount of gifs currently stored.

Gifs.firstGif
#Returns the first gif in the list of stored gifs.

Gifs.lastGif
#Returns the last gif in the list of stored gifs.

Gifs.getRandomGif()
#Returns a random gif from the list of stored gifs.



Code Examples

from TenorGifs.TenorGifs import GifSearch

Gifs = GifSearch()
Gifs.search('hello')

print(Gifs.firstGif)
from TenorGifs.TenorGifs import GifSearch

Gifs = GifSearch()
Gifs.search('hello')

print('Successfully found ' + str(Gifs.gifCount) + ' gifs.')
print(Gifs.getRandomGif())
from TenorGifs.TenorGifs import GifSearch

Gifs = GifSearch()

Gifs.search('1')
numberOne = Gifs.firstGif

Gifs.search('2')
numberTwo = Gifs.firstGif

Gifs.search('3')
numberThree = Gifs.firstGif


print(numberOne)
print(numberTwo)
print(numberThree)






Installation

git clone https://github.com/IrtsaDevelopment/TenorGifs.git

About

Simple python class to handle requesting for gifs from Tenor.

Topics

Resources

License

Stars

Watchers

Forks

Languages