Skip to content

Instantly share code, notes, and snippets.

@jamesdabbs
Created June 26, 2016 19:58
Show Gist options
  • Save jamesdabbs/b35fda182f83eac85da3b2899c13c18c to your computer and use it in GitHub Desktop.
Save jamesdabbs/b35fda182f83eac85da3b2899c13c18c to your computer and use it in GitHub Desktop.

GET /bots

Show your bots (usually only one)

State could be running, stopped or crashed (in which case error will be present)

[  
    {  
        "status":{  
            "state":  "running",
            "error":  null,
            "thread": 12
        },
        "bot":{  
            "token":   "xoxb-...",
            "icon":    ":pig:",
            "name":    "leeloo",
            "id":      "slack:T03JYURGY:U1KSHU685",
            "user_id": "U1KSHU685"
        }
    }
]

GET /plugins

View available plugins

[  
    {  
        "name":"help",
        "examples":{  
            "help":"Show this help message"
        }
    },
    {  
        "name":"echo",
        "examples":{  
            "echo hello world":"Repeat `hello world` back"
        }
    },
    {  
        "name":"score",
        "examples":{  
            "score leeloo":"Show the score for leeloo",
            "leeloo--":"Be a monster",
            "leeloo++":"Give leeloo 1 point"
        }
    },
    {  
        "name":"panic",
        "examples":{  

        }
    },
    {  
        "name":"divide",
        "examples":{  
            "1 / 0":"Force a crash",
            "10 / 2":"Do some math"
        }
    }
]

POST /bots/:bot_id/plugins/:plugin_name

Enable the named plugin for the specified bot

DELETE /bots/:bot_id/plugins/:plugin_name

Disable the named plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment