{"id":13702015,"url":"https://github.com/kabylake1/revolt-cobol-api","last_synced_at":"2025-05-05T04:30:43.539Z","repository":{"id":217165836,"uuid":"614693261","full_name":"kabylake1/revolt-cobol-api","owner":"kabylake1","description":"A COBOL API wrapper for making Revolt bots.","archived":false,"fork":false,"pushed_at":"2023-03-18T19:03:25.000Z","size":39,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T09:40:28.877Z","etag":null,"topics":["revolt-api","revolt-api-wrapper","revolt-bot"],"latest_commit_sha":null,"homepage":"","language":"COBOL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kabylake1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2023-03-16T05:46:44.000Z","updated_at":"2024-04-10T13:20:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d77b942-94c6-4e70-beb5-41c918370257","html_url":"https://github.com/kabylake1/revolt-cobol-api","commit_stats":null,"previous_names":["kabylake1/revolt-cobol-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabylake1%2Frevolt-cobol-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabylake1%2Frevolt-cobol-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabylake1%2Frevolt-cobol-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabylake1%2Frevolt-cobol-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kabylake1","download_url":"https://codeload.github.com/kabylake1/revolt-cobol-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439387,"owners_count":21747997,"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":["revolt-api","revolt-api-wrapper","revolt-bot"],"created_at":"2024-08-02T21:00:29.672Z","updated_at":"2025-05-05T04:30:43.533Z","avatar_url":"https://github.com/kabylake1.png","language":"COBOL","funding_links":[],"categories":["💻 API Libraries"],"sub_categories":["Cobol"],"readme":"# COBOL bindings for Revolt API\n\n## Introduction\nCreate a file named `token.txt` and paste your token there.\n\nPre-requisites:\n* GnuCOBOL\n* WebSockets\n* curl\n\nOn Debian based systems it's easy as:\n```sh\nsudo apt install libwebsockets-dev libcurl4-dev gnucobol\n```\n\n## Example\nHere is a small bot which will print \"hello world!\" every 5 seconds\nto an specific channel id.\n```cobol\n      *\u003e Main entry point for application\n       identification division.\n       program-id. rv-test-main.\n       data division.\n       working-storage section.\n       copy \"rcfg.cpy\" replacing ==:pref:== by ==ws==\n                       ==:levl:== by ==01==.\n       procedure division.\n           initialize ws-config.\n           set ws-onrun-pgm to entry \"rv-onrun\".\n           call \"rv-init\" using by content ws-config end-call.\n           goback.\n       end program rv-test-main.\n      *\u003e Function called on every \"running step\" of the querying loop\n       identification division.\n       program-id. rv-onrun.\n       data division.\n       working-storage section.\n       copy \"rmsg.cpy\" replacing ==:pref:== by ==ws==\n                       ==:levl:== by ==01==.\n       linkage section.\n       copy \"rcfg.cpy\" replacing ==:pref:== by ==ls==\n                       ==:levl:== by ==01==.\n       procedure division using by reference ls-config.\n           initialize ws-msg.\n           move \"Hello world!\" to ws-content in ws-msg.\n           *\u003e Function call to send a message - notice how we're sending\n           *\u003e a \"ws-msg\" which we defined from the \"rmsg.cpy\" copybook!\n           call static \"rv-send-msg\" using by reference ls-config\n               *\u003e Important to fill this out with a correct channel id!\n               by value \"Channel-id-to-send-message-at\"\n               by reference ws-msg end-call.\n           *\u003e Just send at an interval of 5 seconds\n           call \"C$SLEEP\" using by content \"5\" end-call.\n           goback.\n       end program rv-onrun.\n```\nIf we do not fill out \"ws-token\" - then the library will do it for us - by reading from a file called \"token.txt\" - make sure it exists beforehand or the program *will* crash. This is the recommended way of doing things however as embedding tokens directly into the source code of a bot isn't a good idea. Additionaly the instance URL is fetched from \"server.txt\" file automatically.\n\n## Resources\nNoteworthy resources to aid in development:\n* [Revolt API Reference](https://developers.revolt.chat/api/)\n* [GnuCOBOL FAQ](https://gnucobol.sourceforge.io/faq/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabylake1%2Frevolt-cobol-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkabylake1%2Frevolt-cobol-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabylake1%2Frevolt-cobol-api/lists"}