Skip to content

eng618/wiki-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Go API server for a wikipedia page

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages