{"id":21817364,"url":"https://github.com/lieut-data/slash-command-random","last_synced_at":"2025-03-21T10:21:26.226Z","repository":{"id":132682027,"uuid":"124020179","full_name":"lieut-data/slash-command-random","owner":"lieut-data","description":"A serverless function serving as a proof-of-concept for a Mattermost tech talk on slash commands.","archived":false,"fork":false,"pushed_at":"2018-03-07T15:26:01.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T06:43:48.643Z","etag":null,"topics":["mattermost","serverless","slash-commands"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lieut-data.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-06T04:23:09.000Z","updated_at":"2018-03-07T15:33:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"b865ddf4-eaf8-427b-943a-35666d9e31bc","html_url":"https://github.com/lieut-data/slash-command-random","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieut-data%2Fslash-command-random","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieut-data%2Fslash-command-random/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieut-data%2Fslash-command-random/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieut-data%2Fslash-command-random/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lieut-data","download_url":"https://codeload.github.com/lieut-data/slash-command-random/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776342,"owners_count":20508506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mattermost","serverless","slash-commands"],"created_at":"2024-11-27T15:45:17.879Z","updated_at":"2025-03-21T10:21:26.184Z","avatar_url":"https://github.com/lieut-data.png","language":"Go","readme":"# slash-command-random\n\nThis repository contains a [serverless](https://serverless.com/) function exposing an HTTP endpoint\nto generate random integers. It was designed as a proof-of-concept for a Mattermost tech talk on\nslash commands.\n\n## Deployment\n\n### Serverless\n\nSee [Getting Started with Serverless](https://serverless.com/framework/docs/getting-started/) for\ninstructions on how to deploy this function to the compute provider of your choice.\n\nThis repository is configured to use AWS Lambda, but feel free to modify for your own purposes.\n\n### Compiling\n\nSimply invoke `make` to generate the requisite binaries:\n\n    make\n\nThen deploy using serverless:\n\n    serverless deploy\n\nOnce deployed, serverless will provide the URL to an HTTP endpoint against which the function\ncan be invoked.\n\n## API\n\nThe function integrates with Mattermost as a slash command, parsing a `text` query string parameter\nin respond to an HTTP GET request.\n\n## Empty or missing text parameter\n\nThe API returns a random integer between 0 and 100, inclusive.\n\n## Single integer parameter\n\nThe API returns a random integer between 0 and the given integer, inclusive.\n\nNote that the associated tech talk video incorrectly suggested in the autocomplete help text that \nthis was a minimum, not a maximum. \n\n## Single string parameter: `die` or `dice`\n\nThe API returns a random integer between 1 and 6, inclusive.\n\n## Two integer parameters, separated by a space\n\nThe API returns a random integer in the inclusive range given by the input parameters.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieut-data%2Fslash-command-random","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flieut-data%2Fslash-command-random","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieut-data%2Fslash-command-random/lists"}