{"id":15363157,"url":"https://github.com/techquery/mobx-usa-congress","last_synced_at":"2026-02-01T20:02:14.880Z","repository":{"id":257433743,"uuid":"858109406","full_name":"TechQuery/MobX-USA-Congress","owner":"TechQuery","description":"MobX SDK for USA Congress API, which is based on MobX-RESTful.","archived":false,"fork":false,"pushed_at":"2024-11-24T15:16:35.000Z","size":211,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T08:54:52.013Z","etag":null,"topics":["api","congress","governance","mobx","restful","sdk","usa"],"latest_commit_sha":null,"homepage":"http://tech-query.me/MobX-USA-Congress/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechQuery.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,"zenodo":null}},"created_at":"2024-09-16T10:23:52.000Z","updated_at":"2024-11-24T15:12:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b749677-7776-49e9-9844-538b4472fcd3","html_url":"https://github.com/TechQuery/MobX-USA-Congress","commit_stats":null,"previous_names":["techquery/mobx-usa-congress"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/TechQuery/MobX-USA-Congress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechQuery%2FMobX-USA-Congress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechQuery%2FMobX-USA-Congress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechQuery%2FMobX-USA-Congress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechQuery%2FMobX-USA-Congress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechQuery","download_url":"https://codeload.github.com/TechQuery/MobX-USA-Congress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechQuery%2FMobX-USA-Congress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28988410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","congress","governance","mobx","restful","sdk","usa"],"created_at":"2024-10-01T13:04:57.446Z","updated_at":"2026-02-01T20:02:14.865Z","avatar_url":"https://github.com/TechQuery.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MobX-USA-Congress\n\n[MobX][1] SDK for [USA Congress API][2], which is based on [MobX-RESTful][3].\n\n[![MobX compatibility](https://img.shields.io/badge/Compatible-1?logo=mobx\u0026label=MobX%206%2F7)][1]\n[![NPM Dependency](https://img.shields.io/librariesio/release/npm/mobx-usa-congress)][4]\n[![CI \u0026 CD](https://github.com/TechQuery/MobX-USA-Congress/actions/workflows/main.yml/badge.svg)][5]\n\n[![NPM](https://nodei.co/npm/mobx-usa-congress.png?downloads=true\u0026downloadRank=true\u0026stars=true)][6]\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)][7]\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)][8]\n\n## Model\n\n1. [Congress](source/Congress.ts)\n2. [Member](source/Member.ts)\n3. [Hearing](source/Hearing.ts)\n4. [Committee](source/Committee/index.ts)\n    1. [Print](source/Committee/Print.ts)\n5. [Bill](source/Bill.ts)\n6. [Summary](source/Summary.ts)\n\n## Usage\n\n### Installation\n\n```shell\nnpm i mobx-usa-congress\n```\n\n### `tsconfig.json`\n\n```json\n{\n    \"compilerOptions\": {\n        \"target\": \"ES6\",\n        \"moduleResolution\": \"Node\",\n        \"useDefineForClassFields\": true,\n        \"experimentalDecorators\": false,\n        \"jsx\": \"react-jsx\"\n    }\n}\n```\n\n### `model/Congress.ts`\n\n```typescript\nimport { githubClient, CongressModel } from 'mobx-usa-congress';\n\n// Any possible way to pass USA Congress API token\n// from local files or back-end servers to Web pages\nconst token = new URLSearchParams(location.search).get('token');\n\ncongressClient.use(({ request }, next) =\u003e {\n    if (token)\n        request.headers = {\n            authorization: `Bearer ${token}`,\n            ...request.headers\n        };\n    return next();\n});\n\nexport const congressStore = new CongressModel();\n```\n\n### `page/Congress.tsx`\n\nUse [WebCell][9] as an Example\n\n```tsx\nimport { Session } from 'mobx-usa-congress';\nimport { component, observer } from 'web-cell';\n\nimport { congressStore } from '../model/Congress';\n\n@component({ tagName: 'congress-page' })\n@observer\nexport class CongressPage extends HTMLElement {\n    connectedCallback() {\n        congressStore.getThisYearOne();\n    }\n\n    renderSession = ({\n        type,\n        number,\n        chamber,\n        startDate,\n        endDate\n    }: Session) =\u003e (\n        \u003cli key={chamber}\u003e\n            \u003ccode\u003e{type}\u003c/code\u003e #{number} {chamber} (\n            \u003ctime dateTime={startDate}\u003e\n                {new Date(startDate).toLocaleString()}\n            \u003c/time\u003e{' '}\n            ~{' '}\n            \u003ctime dateTime={endDate}\u003e{new Date(endDate).toLocaleString()}\u003c/time\u003e\n            )\n        \u003c/li\u003e\n    );\n\n    render() {\n        const { thisYearOne } = congressStore;\n\n        return (\n            \u003cmain\u003e\n                \u003ch1\u003eUSA Congress\u003c/h1\u003e\n\n                \u003csection\u003e\n                    \u003ch2\u003e\n                        {thisYearOne?.name} ({thisYearOne?.startYear} ~{' '}\n                        {thisYearOne?.endYear})\n                    \u003c/h2\u003e\n                    \u003ch3\u003esessions\u003c/h3\u003e\n                    \u003cul\u003e{thisYearOne?.sessions.map(this.renderSession)}\u003c/ul\u003e\n                \u003c/section\u003e\n            \u003c/main\u003e\n        );\n    }\n}\n```\n\n[1]: https://mobx.js.org/\n[2]: https://github.com/LibraryOfCongress/api.congress.gov\n[3]: https://github.com/idea2app/MobX-RESTful\n[4]: https://libraries.io/npm/mobx-usa-congress\n[5]: https://github.com/TechQuery/MobX-USA-Congress/actions/workflows/main.yml\n[6]: https://nodei.co/npm/mobx-usa-congress/\n[7]: https://codespaces.new/TechQuery/MobX-USA-Congress\n[8]: https://gitpod.io/?autostart=true#https://github.com/TechQuery/MobX-USA-Congress\n[9]: https://github.com/EasyWebApp/WebCell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechquery%2Fmobx-usa-congress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechquery%2Fmobx-usa-congress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechquery%2Fmobx-usa-congress/lists"}