Skip to content

hamidrezakp/Kanvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Endpoints

GET https://localhost:8000/

In this endpoint you will get canvas as raw binary bytes with each byte representing a color. There is 256 color and you can get the list of colors with https://locahost:8000/colors request.

GET https://localhost:8000/colors

Get list of all the 256 colors available

Response:

[
  "#000000",
  "#800000",
  "#008000",
  ...
]

POST https://localhost:8000/

Set color to a cell

Request:

{
    "width": 0,
    "height": 0,
    "color": 12
}

Note: Color field is the index of color in the colors array received from server.

Examining binary result

You can use hexdump and curl to check output:

curl localhost:8000/ --output - --silent | hexdump

About

A simple clone of reddit r/place

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published