{"id":19809867,"url":"https://github.com/lewagon/wagon-chat-api","last_synced_at":"2025-05-01T08:31:20.313Z","repository":{"id":22920690,"uuid":"26269615","full_name":"lewagon/wagon-chat-api","owner":"lewagon","description":"Wagon chat API for challenge @LeWagon","archived":false,"fork":false,"pushed_at":"2024-06-05T08:04:05.000Z","size":98,"stargazers_count":9,"open_issues_count":0,"forks_count":43,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-06-05T09:27:14.474Z","etag":null,"topics":["api","rails","students"],"latest_commit_sha":null,"homepage":"https://chat.api.lewagon.com","language":"Ruby","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/lewagon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2014-11-06T12:47:18.000Z","updated_at":"2024-06-05T09:27:18.771Z","dependencies_parsed_at":"2024-02-06T10:30:50.129Z","dependency_job_id":"ae24c069-1e77-46d9-b58a-f90c546c5d3e","html_url":"https://github.com/lewagon/wagon-chat-api","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/lewagon%2Fwagon-chat-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewagon%2Fwagon-chat-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewagon%2Fwagon-chat-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewagon%2Fwagon-chat-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewagon","download_url":"https://codeload.github.com/lewagon/wagon-chat-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224245939,"owners_count":17279697,"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":["api","rails","students"],"created_at":"2024-11-12T09:18:30.918Z","updated_at":"2024-11-12T09:18:31.525Z","avatar_url":"https://github.com/lewagon.png","language":"Ruby","readme":"## Chat API documentation\n\nAn API (Application Programming Interface) is just like a web-site that communicates raw data (like JSON) instead of well structured and designed data (like HTML/CSS). You can see an API as the poor-version of a standard website meant to be used by computers, not by human beings.\n\n- An API is designed for communication between machines\n- A standard website has a nicer human-readable interface as it's designed for humans. You can see a website as a **\"AHI\"** (Application Human Interface).\n\nAPIs are everywhere and proposed by all serious services. Here you'll read your first API documentation on a very simple example, the wagon-chat API!\n\n#### Base URL\n\nThe base URL of the API is `https://chat.api.lewagon.com/`. Feel free to test the API using [Postman](https://www.getpostman.com/), `curl` or the JS console directly.\n\n#### Get messages `GET '/:channel/messages'`\n\nWill get you the JSON file of all messages for the batch `:channel`. E.g:\n\n```json\n{\n  \"channel\": \"general\",\n  \"messages\": [\n    {\n      \"id\": 1,\n      \"author\": \"Boris\",\n      \"content\": \"Hello\",\n      \"channel\": \"general\"\n    },\n    {\n      \"id\": 2,\n      \"author\": \"Seb\",\n      \"content\": \"Hi\",\n      \"channel\": \"general\"\n    }\n  ],\n  \"next_reset_at\": \"a date in the dear future\"\n}\n```\n\n:warning: There is a cron job on the server which wipes all messages from the database **every 10 minutes** so they are very ephemeral.\n\n#### Post a comment `POST '/:channel/messages'`\n\nWill post a new comment on our API's database for the promo `:channel`.\nIn the request body, you have to send the details of the post, in the following JSON format:\n\n```json\n{\n  \"author\": \"Seb\",\n  \"content\": \"Hi there\"\n}\n```\n\nThe API will respond with the full details of the comment you've posted (in JSON format), e.g:\n\n```json\n{\n  \"id\": 8,\n  \"author\": \"Seb\",\n  \"content\": \"Hi there\",\n  \"channel\": \"general\"\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewagon%2Fwagon-chat-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewagon%2Fwagon-chat-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewagon%2Fwagon-chat-api/lists"}