🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/Rocksus/joke-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Rocksus/joke-api

v0.0.0-20221031161819-804052eb9de8
Source
Go
Version published
Created
Source

Joke-Api

An API for any jokes written in Go.

Usage

Endpoints

Random Joke API

https://horrible-jokes.appspot.com/jokes

Random Joke API by Category

https://horrible-jokes.appspot.com/jokes/{category}

Example: https://horrible-jokes.appspot.com/jokes/programming

Joke API by ID

https://horrible-jokes.appspot.com/joke/{id}

Example: https://horrible-jokes.appspot.com/joke/1

Contribute!

Make a pull request on data/jokes.json file in the following format:

{
  "id": last_joke_id + 1,
  "category": "animals",
  "setup": "Why do the French eat snails?",
  "punchline": "They don't like fast food.",
  "lang": "en"
}

Usage

To run locally, just do

go mod download

and then

go run main.go

you can open locally from (default port is 8000, change it in your .env)

localhost:8000/jokes

FAQs

Package last updated on 31 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts