Official golang wrapper for Sv443's jokeapi.

jokeapi-go

GoDoc Go Report Card Test Coverage Mentioned in Awesome Go

Official golang wrapper for Sv443's jokeapi.

Install- 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{})

Functional config -

api.SetBlacklist(blacklist)
api.SetCategories(ctgs)
api.SetJokeType(joketype)
api.SetLang(language)
Owner
High school student and freelance web developer |Go|TypeScript|Rust|Python|
null
Similar Resources

A Wrapper of the Piston API in Golang

Go-Piston! This is a Go wrapper for working with the Piston API. It supports both the endpoints, namely runtimes and execute, mentioned here. 💻 Insta

Aug 28, 2022

Golang wrapper for the FiveM natives API

Golang wrapper for the FiveM natives API

Dec 2, 2022

Golang API wrapper of OkEX

A complete golang wrapper for Okex V5 API. Pretty simple and easy to use. For more info about Okex V5 API read here.

Nov 15, 2022

Golang wrapper for the Sylviorus antispam API for telegram

Syl-Go Golang wrapper for the Sylviorus antispam API for telegram package test

Jan 2, 2022

Gocaptcha - An API wrapper for popular captcha solvers such as AntiCaptcha and 2Captcha in Golang

An API wrapper for popular captcha solvers such as AntiCaptcha and 2Captcha in Golang

Nov 1, 2022

A GoLang wrapper for Politics & War's API. Forego the hassle of accessing the API directly!

A GoLang wrapper for Politics & War's API. Forego the hassle of accessing the API directly!

Mar 5, 2022

Trello API wrapper for Go

Trello API wrapper for Go

Go Trello API A #golang package to access the Trello API. Nearly 100% of the read-only surface area of the API is covered, as is creation and modifica

Jan 4, 2023

An unofficial wrapper for the unofficial Microsoft Teams API

Unofficial Microsoft Teams Library

Nov 28, 2022

The fantastic Reddit API wrapper for gophers

The fantastic Reddit API wrapper for gophers

mira is a Reddit Api Wrapper written in beautiful Go. It is super simple to use the bot as we also provide you with simple but fully extensive interfaces. Currently, mira is a project that is considered more or less complete.

Dec 18, 2022
Unofficial SDK of official notion API in Go

notion-go A go client for the Notion API Description This aims to be an unofficial Go version of the official SDK which is written in JavaScript. Inst

May 12, 2022
Go client for official Notion API.

notion notion is a Go client for the Notion API. Features The client supports all (non-deprecated) endpoints available in the Notion API, as of May 15

Dec 5, 2021
Amplitude unofficial client for Go, inspired in their official SDK for Node

Amplitude Golang SDK Amplitude unofficial client for Go, inspired in their official SDK for Node. For reference, visit HTTP API v2 documentation. Inst

Dec 31, 2022
WeChat Official Account's Verification using Revel

Welcome to Revel A high-productivity web framework for the Go language. Start the web server: revel run myapp Go to http://localhost:9000/ and you'll

Dec 25, 2021
Simple golang airtable API wrapper

Golang Airtable API A simple #golang package to access the Airtable API. Table of contents Golang Airtable API Table of contents Installation Basic us

Jan 5, 2023
This is a Golang wrapper for working with TMDb API. It aims to support version 3.
This is a Golang wrapper for working with TMDb API. It aims to support version 3.

This is a Golang wrapper for working with TMDb API. It aims to support version 3. An API Key is required. To register for one, head over to themoviedb

Dec 27, 2022
⚡️ SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang)
⚡️ SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang)

Gosip - SharePoint authentication, HTTP client & fluent API wrapper for Go (Golang) Main features Unattended authentication using different strategies

Jan 2, 2023
A small, fast, reliable pastemyst API wrapper written in Golang

A small, fast, reliable pastemyst API wrapper written in Golang. Official pastemyst API docs found here.

Dec 12, 2022
Unofficial Anilist.co GraphQL API wrapper for GoLang.

anilistWrapGo Unofficial Anilist.co GraphQL API wrapper for GoLang. Examples All examples are present as tests in test directory. Below are a few snip

Dec 20, 2022
Pterodactyl API wrapper written in Golang

WARNING That repository isn't available for production environment. Many endpoints aren't yet implemented. Be careful if you are using that module. pt

Oct 4, 2022