{"id":18267455,"url":"https://github.com/freaktechnik/twitchbots-base","last_synced_at":"2025-04-09T02:26:43.735Z","repository":{"id":57382841,"uuid":"48966305","full_name":"freaktechnik/twitchbots-base","owner":"freaktechnik","description":"Generic API consumer for https://twitchbots.info. Independent of request method.","archived":false,"fork":false,"pushed_at":"2020-07-17T22:06:46.000Z","size":163,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T17:44:04.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/twitchbots-base","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freaktechnik.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}},"created_at":"2016-01-04T00:40:10.000Z","updated_at":"2020-07-17T22:06:49.000Z","dependencies_parsed_at":"2022-09-01T04:02:03.169Z","dependency_job_id":null,"html_url":"https://github.com/freaktechnik/twitchbots-base","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freaktechnik%2Ftwitchbots-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freaktechnik%2Ftwitchbots-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freaktechnik%2Ftwitchbots-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freaktechnik%2Ftwitchbots-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freaktechnik","download_url":"https://codeload.github.com/freaktechnik/twitchbots-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247964239,"owners_count":21025165,"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":[],"created_at":"2024-11-05T11:27:28.463Z","updated_at":"2025-04-09T02:26:43.715Z","avatar_url":"https://github.com/freaktechnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twitchbots-base\n\n\n[![Build Status](https://travis-ci.org/freaktechnik/twitchbots-base.svg?branch=master)](https://travis-ci.org/freaktechnik/twitchbots-base) [![codecov](https://codecov.io/gh/freaktechnik/twitchbots-base/branch/master/graph/badge.svg)](https://codecov.io/gh/freaktechnik/twitchbots-base) [![Dependency Status](https://dependencyci.com/github/freaktechnik/twitchbots-base/badge)](https://dependencyci.com/github/freaktechnik/twitchbots-base)\n\nThis is a base-module for using the [twitchbots.info](https://twitchbots.info)\nAPI with JS. It requires a request function to be passed in. For modules with a\nrequest method built in, see\n[jetpack-twitchbots](https://www.npmjs.com/package/jetpack-twitchbots) and\n[twitchbots-node](https://www.npmjs.com/package/twitchbots-node).\n\n## Usage\nTo instantiate, construct the global export of the module, with one argument,\nan object of the following form:\n```js\n{\n    request: function(url) {\n        return new Promise(function(resolve, reject) {\n            //TODO make request. Resolve with parsed JSON on 200 status code,\n            // else reject with an error that has a \"code\" attribute with the\n            // error code.\n        });\n    }\n}\n```\n\n## Methods\nAll methods resolve to promises.\nThe return values are explained later on.\n\n - `getBot(username)`: Bot\n - `getBots(usernames)`: array\u003cBot\u003e\n - `getAllBots()`: array\u003cBot\u003e (returns only true bots)\n - `getAllBotsByType(typeId)`: array\u003cBot\u003e (returns only true bots)\n - `getType(typeId)`: Type\n\n## Return Values\n### Bot\nAn object with the following properties:\n - `isBot`: boolean\n - `username`: string\n - `type`: typeId (number)\n\n### Type\nAn object with the following properties:\n - `id`: typeId (number)\n - `name`: string\n - `multiChannel`: boolean\n - `url`: string\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaktechnik%2Ftwitchbots-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreaktechnik%2Ftwitchbots-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaktechnik%2Ftwitchbots-base/lists"}