Skip to content

REST API server that calculates years that have the same calendar

License

Notifications You must be signed in to change notification settings

lakhanmankani/same-calendar-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

same-calendar-api

REST API server that calculates years that have the same calendar.

Installation:

go get -u github.com/lakhanmankani/same-calendar-api

API Usage:

Register

Request:

curl -X POST localhost:8080/api/register

Response:

{
  "key": "9842824a468b7e0a1a01c9d802eb164c568ce3d86c1b7cfa0b80a7eab0379f3e"
}

Get same calendar years in the future

Request:

curl -X GET localhost:8080/api/same-calendar?key=<apikey>&year=2020&n=5&forward=true

Response:

{
  "years": [2020,2048,2076,2116,2144]
}

Get same calendar years in the past

Request:

curl -X GET localhost:8080/api/same-calendar?key=<apikey>&year=2020&n=5&forward=false

Response:

{
  "years": [2020,1992,1964,1936,1908]
}

Unregister

Request:

curl -X DELETE localhost:8080/api/unregister?key=<apikey>

About

REST API server that calculates years that have the same calendar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published