Skip to content

Latest commit

 

History

History
87 lines (64 loc) · 1.29 KB

API.md

File metadata and controls

87 lines (64 loc) · 1.29 KB

Hexbot API

Get a single hexcode

GET https://api.noopschallenge.com/hexbot

HTTP 200

{
  "colors": [
    { "value": "#E37171" }
  ]
}

Get multiple hex codes

GET https://api.noopschallenge.com/hexbot?count=5

HTTP 200

{
  "colors": [
    { "value": "#D44F3B" },
    { "value": "#062161" },
    { "value": "#F01479" },
    { "value": "#C4852D" },
    { "value": "#223078" }
  ]
}

Get multiple hex codes within bounds

GET https://api.noopschallenge.com/hexbot?count=5&width=500&height=500

HTTP 200

{
  "colors": [
    {
      "value": "#4E3E97", "coordinates": { "x": 367, "y": 419 }
    },
    {
      "value": "#D6381F", "coordinates": { "x": 180, "y": 41 }
    },
    {
      "value": "#F82971", "coordinates": { "x": 145, "y": 495 }
    },
    {
      "value": "#D680CF", "coordinates": { "x": 493, "y": 148 }
    },
    {
      "value": "#F92C20", "coordinates": { "x": 152, "y": 380 }
    }
  ]
}

Seed hex codes with colors

GET https://api.noopschallenge.com/hexbot?count=5&seed=FF7F50,FFD700,FF8C00

HTTP 200

{
  "colors": [
    { "value": "#FF983A" },
    { "value": "#FF7F50" },
    { "value": "#FFBE17" },
    { "value": "#FFAB28" },
    { "value": "#FFBA1A" }
  ]
}

Note: this file is automatically generated during test runs