All Projects → Icelain → jokeapi

Icelain / jokeapi

Licence: MIT license
Official golang wrapper for Sv443's jokeapi.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to jokeapi

ruby-ambassador
Ambassador API v2 wrapper for Ruby
Stars: ✭ 20 (+5.26%)
Mutual labels:  api-wrapper
pjbank-js-sdk
PJBank SDK para Javascript! ⚡ ⚡ ⚡
Stars: ✭ 24 (+26.32%)
Mutual labels:  api-wrapper
hackerone-client
An unofficial wrapper for the HackerOne API
Stars: ✭ 55 (+189.47%)
Mutual labels:  api-wrapper
chess-web-api
Chess.com public data API wrapper with "isChanged" and priority queue functionality.
Stars: ✭ 83 (+336.84%)
Mutual labels:  api-wrapper
libdrizzle-redux
The next generation of Libdrizzle with a simplified API and support for more features of the protocol
Stars: ✭ 14 (-26.32%)
Mutual labels:  api-wrapper
cf-mailchimp
ColdFusion wrapper for the MailChimp 3.0 API
Stars: ✭ 17 (-10.53%)
Mutual labels:  api-wrapper
messages
A python package designed to make sending messages easy and efficient!
Stars: ✭ 38 (+100%)
Mutual labels:  api-wrapper
tatsumaki.js
A api wrapper for the Tatsumaki Discord Bot API
Stars: ✭ 9 (-52.63%)
Mutual labels:  api-wrapper
AniList-Node
A lightweight Node.js wrapper for the AniList API
Stars: ✭ 36 (+89.47%)
Mutual labels:  api-wrapper
ZmopSharp
ZMOP (芝麻信用开放平台) SDK for .NET
Stars: ✭ 11 (-42.11%)
Mutual labels:  api-wrapper
epicstore api
Epic Games Store Web API Wrapper written in Python
Stars: ✭ 48 (+152.63%)
Mutual labels:  api-wrapper
newsapi-php
A PHP client for the News API (https://newsapi.org/docs/get-started)
Stars: ✭ 21 (+10.53%)
Mutual labels:  api-wrapper
bookops-worldcat
BookOps WorldCat Metadata API wrapper
Stars: ✭ 21 (+10.53%)
Mutual labels:  api-wrapper
powershellwrapper
This PowerShell module acts as a wrapper for the IT Glue API.
Stars: ✭ 96 (+405.26%)
Mutual labels:  api-wrapper
py-vkontakte
A Python wrapper around the vk.com
Stars: ✭ 17 (-10.53%)
Mutual labels:  api-wrapper
wikipedia-reference-scraper
Wikipedia API wrapper for references
Stars: ✭ 34 (+78.95%)
Mutual labels:  api-wrapper
valorant.py
Complete Python interface for the Valorant API. Works right out of the box!
Stars: ✭ 84 (+342.11%)
Mutual labels:  api-wrapper
acord
An API wrapper for discord, built using aiohttp and pydantic.
Stars: ✭ 25 (+31.58%)
Mutual labels:  api-wrapper
bitflyer
⚡ bitFlyer API wrapper for Ruby
Stars: ✭ 25 (+31.58%)
Mutual labels:  api-wrapper
article-downloader
Uses publisher APIs to programmatically retrieve scientific journal articles for text mining.
Stars: ✭ 81 (+326.32%)
Mutual labels:  api-wrapper

jokeapi-go

GoDoc Go Report Card Test Coverage Mentioned in Awesome Go

Official golang wrapper for Sv443's jokeapi.

Install- Add github.com/icelain/jokeapito your go.mod(recommended) or:

EXPORT GO11MODULE=off
go get -u github.com/icelain/jokeapi

Basic Usage Without Parameters-

import "github.com/icelain/jokeapi"

func main(){
  api := jokeapi.New()
  response, err := api.Fetch()
}

Response Struct-

type JokesResp struct{
	Error bool
	Category string
	JokeType string
	Joke []string
	Flags map[string] bool
	Id float64
	Lang string
}

Usage with all parameters-

import "github.com/icelain/jokeapi"

func main(){
  jt := "single"
  blacklist := []string{"nsfw"}
  ctgs := []string{"Programming","Dark"}
  
  api:= jokeapi.New()
  
  api.Set(jokeapi.Params{Blacklist: blacklist, JokeType: jt, Categories: ctgs})
  response, err := api.Fetch()
}

Config struct-

api.Set(jokeapi.Params{})

Config methods-

api.SetBlacklist(blacklist)
api.SetCategories(ctgs)
api.SetJokeType(joketype)
api.SetLang(language)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].