{"id":21004747,"url":"https://github.com/flaque/cognition","last_synced_at":"2025-03-13T14:22:33.210Z","repository":{"id":80715988,"uuid":"177344594","full_name":"Flaque/cognition","owner":"Flaque","description":"human-centric user behavior tooling","archived":false,"fork":false,"pushed_at":"2019-03-24T17:09:59.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T10:13:59.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flaque.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-03-23T22:02:51.000Z","updated_at":"2019-03-24T17:12:48.000Z","dependencies_parsed_at":"2023-04-01T10:47:17.366Z","dependency_job_id":null,"html_url":"https://github.com/Flaque/cognition","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/Flaque%2Fcognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flaque%2Fcognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flaque%2Fcognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flaque%2Fcognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flaque","download_url":"https://codeload.github.com/Flaque/cognition/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419557,"owners_count":20287908,"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-19T08:37:39.931Z","updated_at":"2025-03-13T14:22:33.188Z","avatar_url":"https://github.com/Flaque.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cognition\n\nA cool hackathon project.\n\nRun with:\n\n```sh\nyarn dev\n```\n\n## Interacting\n\n### Track Calls\n\nThese are calls that you can send your user behavior to. The\nonly thing they record is the timestamp (for usage) and the\nanonymous user ID.\n\n```\ncurl --request POST \\\n  --url http://localhost:3000/api/track \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"messageId\": \"test-message-1kehp\",\n    \"timestamp\": \"2019-03-23T20:50:22.449Z\",\n    \"type\": \"track\",\n    \"userId\": \"test-user-eo0zokd\"\n}'\n```\n\n### Usage Reports\n\nThis lets you get the usage of an individual user to dynamically\nadapt your tool to reduce burnout.\n\n```\ncurl --request GET \\\n  --url http://localhost:3000/api/usage/test-user-eo0zokd\n```\n\nResponse:\n\n```\n{\n  \"usage\": {\n    \"userId\": \"test-user-eo0zokd\",\n    \"totalTime\": 30\n  },\n  \"budget\": 20\n}\n```\n\n### All Usage Reports\n\nThis gives you the usage reports of everyone.\n\n```\ncurl --request GET \\\n  --url http://localhost:3000/api/usages\n```\n\nResponse:\n\n```\n{\n  \"usages\": [\n    {\n      \"userId\": \"test-user-eo0zokd\",\n      \"totalTime\": \"0\"\n    }\n  ],\n  \"budget\": 0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaque%2Fcognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaque%2Fcognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaque%2Fcognition/lists"}