{"id":20900782,"url":"https://github.com/shipgirlproject/haruna","last_synced_at":"2025-05-13T02:30:28.475Z","repository":{"id":42437374,"uuid":"170317673","full_name":"shipgirlproject/Haruna","owner":"shipgirlproject","description":"A RESTful API around Topgg (Discord Bot List) voting webhooks","archived":false,"fork":false,"pushed_at":"2024-08-16T13:46:07.000Z","size":3819,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T15:21:39.343Z","etag":null,"topics":["dbl","dbl-vote-webhook","discord","discord-bot-list","discordbot","discordbotlist","discordbotlist-webhook","haruna","topgg"],"latest_commit_sha":null,"homepage":"https://top.gg/api/docs#webhooks","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shipgirlproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":"TheWeebSaya","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-02-12T12:53:43.000Z","updated_at":"2024-08-16T13:46:00.000Z","dependencies_parsed_at":"2024-08-03T09:29:31.544Z","dependency_job_id":"3d571b17-28a0-4d09-a8b7-29bdf719411c","html_url":"https://github.com/shipgirlproject/Haruna","commit_stats":null,"previous_names":["shipgirlproject/haruna","deivu/haruna"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FHaruna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FHaruna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FHaruna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipgirlproject%2FHaruna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipgirlproject","download_url":"https://codeload.github.com/shipgirlproject/Haruna/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253859329,"owners_count":21975080,"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":["dbl","dbl-vote-webhook","discord","discord-bot-list","discordbot","discordbotlist","discordbotlist-webhook","haruna","topgg"],"created_at":"2024-11-18T11:22:43.340Z","updated_at":"2025-05-13T02:30:27.671Z","avatar_url":"https://github.com/shipgirlproject.png","language":"Java","funding_links":["https://patreon.com/TheWeebSaya"],"categories":[],"sub_categories":[],"readme":"# Haruna\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://vignette.wikia.nocookie.net/kancolle/images/6/61/Haruna_Shopping_Full.png/revision/latest/\"\u003e\n\u003c/p\u003e\n\nThe ShipGirl Project; Haruna. `(c) Kancolle for Haruna.`\n\n\u003e Fast and reliable.\n\n\u003e Run and forget, Haruna can run with **99.9% uptime**.\n\n\u003e Rest based API for your easy vote checks **without opening a webserver** on your bot.\n\n\u003e Webhook based API is also available if you are someone who needs both the **API** and **Realtime** vote handling.\n\n# Documentation\n\n## Rest API\n\n### `POST` /newVote\nThe endpoint that is exposed to Top.gg (Discord Bot List); Refer to the image below.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/TaVWQ5y.png\"\u003e\n\u003c/p\u003e\n\n### `GET` /voteInfo\nThe endpoint which you can use to check for votes.\n\nHeaders: \n```js\n{\n  \"authorization\": \"the authorization key you have set on Top.gg (Discord Bot List) webhook\"\n}\n```\n\nQuery String: `user_id`\n\nReturns: JSON string.\n```js\n// User Voted\n{\n  \"user\": \"23213512\",\n  \"timestamp\": 432483204, \n  \"isWeekend\": true,\n  \"timeLeft\": 274013\n}\n// User Didn't Vote\n{\n  \"user\": false\n}\n```\n\n### `GET` /stats\nReturns: Current status of server in JSON string.\n\n## Webhook API [1.4.0 and later]\n\n\u003e If enabled, it will send a POST request containing the user who voted in the URL of your choice.\n\n\u003e For checking the request validity, you can check the authorization header as it will send the same **restAuth** you have set on your config\n\nReturns: JSON string.\n```js\n{\n  \"user\": \"389138132391230131031903\",\n  \"isWeekend\": true\n}\n```\n\n# Haruna's API Wrappers\n\n[Java](https://github.com/Deivu/Haruna/tree/master/HarunaWrapper/java)\n\n[Javascript](https://github.com/Deivu/Haruna/tree/master/HarunaWrapper/Javascript-Node.js)\n\n[C#](https://github.com/Deivu/Haruna/tree/master/HarunaWrapper/CSharp-Dotnet)\n\n\u003e you can also create your own and PR if you want to contribute it.\n\n# How to Host\n\n## Manually\n\n1. Download the latest `haruna.jar` from Github Releases. [Click me](https://github.com/Deivu/Haruna/releases)\n\n2. Download `HarunaConfig.json` from github. [Click me](https://github.com/Deivu/Haruna/blob/master/config_example/HarunaConfig.json)\n\n3. Configure `HarunaConfig.json` according to your liking and put it BESIDE haruna.jar\n\n4. Start the server via `java -jar haruna.jar`\n\n5. To verify Haruna is working, navigate to `http://localhost:port_you_specified/` or `http://your_server_ip:the_port_you_specified/`. [Example](http://it-snake.net:1101/)\n\n## Docker\n\n1. Get docker-compose file. [Click me](https://github.com/Deivu/Haruna/blob/master/config_example/docker-compose.yml)\n\n2. Update values according to your needs (**ports** and **environment**)\n\n3. Start the server via `docker compose up -d`\n\n# Haruna's config file example \u0026 explanation.\n```js\n{\n  \"restAuth\": \"weeb_handler\", \n  \"topggAuth\": \"JRIrjrqwrpURJQWOPRj_rfnQEUi_KRqop\",\n  \"webhook\": \"https://discordapp.com/api/webhooks/84293482482420424024802/sneaky_token_OWO\",\n  \"postWebhook\": \"localhost:6969\",\n  \"debug\": true,\n  \"port\": 1024,\n  \"threads\": 8,\n  \"userTimeout\": 432000000\n}\n```\n- `restAuth` **(REST_AUTH)** is the Discord Bot List Webhook Authorization.\n- `topggAuth` **(TOPGG_AUTH)** is your token for Discord Bot List.\n- `webhook` **(WEBHOOK)** is your Discord Webhook link (Optional)\n- `postWebhook` **(POST_WEBHOOK)** is where Haruna will try to send a POST request of the user who voted [Refer Here](https://github.com/Deivu/Haruna#webhook-api-v140-and-later) (Optional)\n- `debug` **(DEBUG)** is if you want to enable debug logs of Haruna (Optional, Default: false)\n- `port` **(PORT)** is what port you want this server hosted (Optional, Default: 1024)\n- `threads` **(THREADS)** is how many threads you want this server to have (Optional, Default: Your CPU Thread Count)\n- `userTimeout` **(USER_TIMEOUT)** is how long the user will stay in database in ms (Optional, Default: 43200000)\n\n*Between parenthesis is the key to set as environment variable in case you want to use this configuration way.*\n\n# Support\n**We provide support for usage of this API in our Official Server's #development-support forums which is [in HERE](https://discordapp.com/invite/FVqbtGu)**\n\n\u003e Made with ❤️ by @ichimakase\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Fharuna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipgirlproject%2Fharuna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipgirlproject%2Fharuna/lists"}