wiki-api

command module
v0.0.0-...-5b08584 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2021 License: MIT Imports: 1 Imported by: 0

README

wiki-api

Go CodeQL Go Report Card

Overview

This is a go package that exposes an API server that exposes the information on the Wikipedia page about Heidenheim, Germany (https://en.wikipedia.org/wiki/Heidenheim_an_der_Brenz) in a useful and intuitive way.

Running the server

  • clone the repo
  • go run main.go from the root of the directory

Routes

/

The base route simply says hello

/panic

The panic route is a test route on what happens when a panic is invoked, and how the program still recovers.

/mayor

The mayor route tells you who the current mayor of Heidenheim, Germany is

/mayor/{year}

The mayor year route allows you to pass in a year, and returns the mayor/s for that year. There is some error handling on this route. So if you pass in anything other than a valid year, the response will be a 400 with information on what went wrong.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package server manages the wiki server
Package server manages the wiki server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL