{"id":19967611,"url":"https://github.com/ceramicstudio/pulltopoints","last_synced_at":"2025-10-14T01:06:54.756Z","repository":{"id":231378355,"uuid":"781638412","full_name":"ceramicstudio/pullToPoints","owner":"ceramicstudio","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-21T06:29:22.000Z","size":992,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-01T17:47:48.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ceramicstudio.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T19:01:05.000Z","updated_at":"2024-04-19T15:32:53.000Z","dependencies_parsed_at":"2024-04-09T17:27:40.865Z","dependency_job_id":"71c6782b-287d-41b8-bca8-e6d498d0037d","html_url":"https://github.com/ceramicstudio/pullToPoints","commit_stats":null,"previous_names":["ceramicstudio/pulltopoints"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ceramicstudio/pullToPoints","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FpullToPoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FpullToPoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FpullToPoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FpullToPoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceramicstudio","download_url":"https://codeload.github.com/ceramicstudio/pullToPoints/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FpullToPoints/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017454,"owners_count":26086081,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-13T02:43:04.548Z","updated_at":"2025-10-14T01:06:54.730Z","avatar_url":"https://github.com/ceramicstudio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pull from APIs and Publish Points\n\nGeneral harness and example for pulling data from API endpoints and publishing as Points on the Ceramic Network, in an idempotent manner that avoids double-counting.\n\nThis repo contains a working example of pulling NBA team wins, losses and player stats. \n\n### Prerequisites\n\nIn order to run this harness, it is necessary to have a Ceramic node, in the environment vars\n\n```\nCERAMIC_URL\nCERAMIC_PRIVATE_KEY\n```\n\nand an API token for wherever you are retrieving data from.  In particular for this example, you will need\n\n```\nBALLDONTLIE_TOKEN\n```\nTo run a ceramic node, see the [Ceramic Developer Documentation](https://developers.ceramic.network/) \nFor the API token, see [balldontlie.io](https://balldontlie.io)\n\n### Install and run\n\n```\npnpm install\npnpm build\npnpm start\n```\n\nThis will retrieve the last days' game outcomes and player statistics, and will aggregate wins \u0026 losses by team, and minutes played, assists and points scored by player.\n(note that by default it will only retrieve data during the NBA season, but you can edit the start and end dates to retrieve older data if desired.)\n\n### How it Works\n\nAll of the code specific to the ComposeDB Points system is encapsulated in the [points](src/points.ts) module, which uses the models created in the [composites](composites/) directory.\n\nThe SET relation on the Allocation methods is what enforces that points for the given field combination can only be counted once (ie for one team and game date), used in the publishPoints function.\n\nThe Aggregation methods keep the running totals in a single Model Instance Document which makes it quick to retrieve the aggregations from the decentralized network.\n\n### Integration to Projects\n\nThe intention of this example repository is to be cloned and modified or extended, or to serve as an example for including decentralized data functionality for allocation and aggregation - for Points - within an existing project.  \n \nThe `points` capability is included in the [Ceramic Solutions SDK](https://github.com/ceramicstudio/solutions-sdk) and as an npm package at [@ceramic-solutions/points](https://www.npmjs.com/package/@ceramic-solutions/points)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicstudio%2Fpulltopoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceramicstudio%2Fpulltopoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicstudio%2Fpulltopoints/lists"}