{"id":21404210,"url":"https://github.com/supportclass/lfg-doncorleone","last_synced_at":"2025-03-16T16:42:57.503Z","repository":{"id":24791100,"uuid":"28204894","full_name":"SupportClass/lfg-doncorleone","owner":"SupportClass","description":"Easy donation listening for NodeCG","archived":false,"fork":false,"pushed_at":"2022-12-12T16:55:21.000Z","size":75,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T03:30:29.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/SupportClass.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":"2014-12-18T22:46:08.000Z","updated_at":"2020-05-06T02:17:38.000Z","dependencies_parsed_at":"2023-01-14T01:37:21.080Z","dependency_job_id":null,"html_url":"https://github.com/SupportClass/lfg-doncorleone","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/SupportClass%2Flfg-doncorleone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupportClass%2Flfg-doncorleone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupportClass%2Flfg-doncorleone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SupportClass%2Flfg-doncorleone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SupportClass","download_url":"https://codeload.github.com/SupportClass/lfg-doncorleone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902241,"owners_count":20366258,"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-22T16:13:31.621Z","updated_at":"2025-03-16T16:42:57.486Z","avatar_url":"https://github.com/SupportClass.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lfg-doncorleone\nThis is a [NodeCG](http://github.com/nodecg/nodecg) bundle.\n\nListens for donations to a given account on [Barry's Donation Tracker](http://don.barrycarlyon.co.uk) and emits API events for other bundles to use.\nAlso displays stats on the dashboard and easily allows the user to reset said stats.\n\n## Installation\n- Install to `nodecg/bundles/lfg-doncorleone`\n- Create `nodecg/cfg/lfg-doncorleone.json` with the username and password of the [Barry's Donation Tracker](http://don.barrycarlyon.co.uk) account\nthat you wish to listen to:\n```json\n{\n    \"username\": \"myUsername\",\n    \"password\": \"myPassword\"\n}\n```\n\n## Usage\n### As a dashboard panel\nIf you simply want to see top donations for the `day` and `month` periods on your dashboard, you are done.\n\n### In other bundles' view pages and dashboard panels\nIf you would like to use this data in another bundle, add the following code to your view/panel:\n```javascript\nnodecg.listenFor('tip', 'lfg-doncorleone', callback);\n```\n... where 'callback' is the name of a function with the signature `function callback(data)`\n\n### In other bundles' extensions\nIf you want to use donation events in another bundle's extension,\nadd `lfg-doncorleone` as a `bundleDependency` in your bundle's [`nodecg.json`](https://github.com/nodecg/nodecg/wiki/nodecg.json)\n\nThen add the following code:\n```javascript\nvar donCorleone = nodecg.extensions['lfg-doncorleone'];\n\ndonCorleone.on('initialized', function initialized(data) {\n    // do work\n    // data.Completed = Array of recently completed donations\n    // data.totals = Object containing stats such as data.totals.day_top and data.totals.month_top\n    // Other properties exist as well\n));\n\ndonCorleone.on('gotDonations', function gotDonations(data) {\n   // do work\n   // data object is the same as in the 'initialized' event\n   // However, in this event 'data.Completed' is only newly completed donations.\n\n   // Example of iterating over the data.Completed property and processing each new donation\n   data.Completed.forEach(function(donation) {\n       console.log(donation);\n   });\n));\n```\n\n### License\nlfg-doncorleone is provided under the MIT license, which is available to read in the [LICENSE][] file.\n[license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupportclass%2Flfg-doncorleone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupportclass%2Flfg-doncorleone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupportclass%2Flfg-doncorleone/lists"}