Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

aksfyi/Jokepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jokepy

Python Wrapper for sv443 JokeApi

Installation (Install versions > 1.0.0)

pip install jokepy

-Clone the repo and use jokepy.py. version of jokepy in pypi is not updated

Importing Jokepy

from jokepy import Jokepy

Creating Jokepy object

j = Jokepy(categories=[],flags  =  [],idRange=[(startId),(endId)],type  =  (single/twopart),searchstring  = (searchstring))

Getjoke

j.getjoke()

Params

  • Categories : ['Programming' , 'Miscellaneous' , 'Dark']
  • Blacklist flags :['nsfw' , 'religious' , 'political' , 'racist' , 'sexist' ]
  • types : single / twopart

Exceptions

  • InvalidCategoryException (if the api doesnt supported categories)
  • InvalidFlagException (if the api doesnt support blackList flags)
  • InvalidTypeException(if the type is invalid)
  • InvalidIdRangeException (if the idRange is invalid)

Dependencies

API Documentation

About

Fetch jokes from JokeApi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages