Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackclub/hack-hour
Every Hour = More Power. Keep track of each hour of work you get done on your project.
https://github.com/hackclub/hack-hour
hackclub
Last synced: 25 days ago
JSON representation
Every Hour = More Power. Keep track of each hour of work you get done on your project.
- Host: GitHub
- URL: https://github.com/hackclub/hack-hour
- Owner: hackclub
- Created: 2024-04-09T13:13:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T03:25:31.000Z (about 1 month ago)
- Last Synced: 2024-12-24T10:02:11.443Z (about 1 month ago)
- Topics: hackclub
- Language: TypeScript
- Homepage: https://hackhour.hackclub.com
- Size: 1.16 MB
- Stars: 31
- Watchers: 6
- Forks: 33
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hack Hour
Hack Hour is a ~~trash collection service~~ project tracker & pomodoro timer for hacking on projects. It was used to track hours as a part of [Hack Club's Arcade](https://hackclub.com/arcade). She's on slack as `@hakkuun` and hangs out in the `#hack-hour` channel!![](https://api.checklyhq.com/v1/badges/checks/271a416b-7810-47b0-b58c-7cd9e9e37f82?style=flat&theme=default&responseTime=false)
## API
_Note: There is no guarantee for the reliability of the API. If data is lost and/or is not registered for Arcade, there's not much we can do - use at your own risk._All endpoints require an authorization header with the api key, as such: `Authorization: Bearer `
### GET `/api/session/:slackId`
Gets the latest session for the user.Example Response:
```json
{
"ok": true,
"data": {
"id": "slackId",
"createdAt": "2024-06-23T02:49:17.900Z",
"time": 60,
"elapsed": 12,
"remaining": 48,
"endTime": "2024-06-23T03:08:00.000Z",
"goal": "No Goal",
"paused": true,
"completed": false,
"messageTs": "messageTs",
}
}
```### GET `/api/stats/:slackId`
Gets the stats for the user.Example Response:
```json
{
"ok": true,
"data": {
"sessions": 0,
"total": 0,
}
}
```### GET `/api/goals/:slackId`
Gets the goals for the user.Example Response:
```json
{
"ok": true,
"data": [
{
"name": "No Goal",
"minutes": 0
}
]
}
```### GET `/api/history/:slackId`
Gets the history for the user.Example Response:
```json
{
"ok": true,
"data": [
{
"createdAt": "2024-06-23T05:09:04.105Z",
"time": 60,
"elapsed": 23,
"goal": "No Goal",
"ended": false,
"work": "123"
}
]
}
```### POST `/api/start/:slackId`
Starts a new session for the user.Requires a JSON body with the following fields:
- `work`: what the user is working on (string)Example Response:
```json
{
"ok": true,
"data": {
"id": "sessionId",
"slackId": "slackId",
"createdAt": "createdAt",
}
}
```### POST `/api/pause/:slackId`
Pauses or resumes the current session for the user, depending on the current state.Requires an authorization header with the api key, as such: `Authorization: Bearer `
Example Response:
```json
{
"ok": true,
"data": {
"id": "sessionId",
"slackId": "slackId",
"createdAt": "createdAt",
"paused": true,
}
}
```### POST `/api/cancel/:slackId`
Cancels the current session for the user.Requires an authorization header with the api key, as such: `Authorization Bearer `
Example Response:
```json
{
"ok": true,
"data": {
"id": "sessionId",
"slackId": "slackId",
"createdAt": "createdAt",
}
}
```## API - No Auth
### GET `/ping`
Returns with `pong`. Check if the thing is alive### GET `/status`
Get specific details on the status of hack hour (heidi)Example Response:
```json
{
"activeSessions": -1,
"airtableConnected": false,
"slackConnected": false,
}
```### GET `/api/clock/:slackId`
Depreciated.Responds with unix timestamp of the expected end time of the current session for the user.