{"id":21450919,"url":"https://github.com/soontao/light-odata","last_synced_at":"2025-10-08T13:37:38.412Z","repository":{"id":37923929,"uuid":"121365112","full_name":"Soontao/light-odata","owner":"Soontao","description":"OData(V2/V4) Client for javascript/typescript","archived":false,"fork":false,"pushed_at":"2025-03-27T05:24:55.000Z","size":4392,"stargazers_count":43,"open_issues_count":15,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T06:26:11.351Z","etag":null,"topics":["c4c","cap","odata","odata-client","sap"],"latest_commit_sha":null,"homepage":"","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/Soontao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-02-13T09:49:02.000Z","updated_at":"2025-03-21T15:24:50.000Z","dependencies_parsed_at":"2023-02-19T20:01:08.559Z","dependency_job_id":"54479c70-949b-4330-93d2-30cd7931ce36","html_url":"https://github.com/Soontao/light-odata","commit_stats":{"total_commits":1142,"total_committers":13,"mean_commits":87.84615384615384,"dds":0.5761821366024518,"last_synced_commit":"b2b27ffcf4f884de73fdf74cc4f34c754dc2bc64"},"previous_names":["soontao/c4codata"],"tags_count":101,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Flight-odata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Flight-odata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Flight-odata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soontao%2Flight-odata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soontao","download_url":"https://codeload.github.com/Soontao/light-odata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299828,"owners_count":20916190,"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":["c4c","cap","odata","odata-client","sap"],"created_at":"2024-11-23T04:17:02.663Z","updated_at":"2025-10-08T13:37:33.375Z","avatar_url":"https://github.com/Soontao.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OData Client\n\n[![npm (scoped)](https://img.shields.io/npm/v/@odata/client)](https://www.npmjs.com/package/@odata/client)\n![NPM](https://img.shields.io/npm/l/@odata/client)\n![npm](https://img.shields.io/npm/dy/@odata/client)\n[![unittest](https://github.com/Soontao/light-odata/actions/workflows/nodejs.yml/badge.svg)](https://github.com/Soontao/light-odata/actions/workflows/nodejs.yml)\n[![codecov](https://codecov.io/gh/Soontao/light-odata/branch/main/graph/badge.svg)](https://codecov.io/gh/Soontao/light-odata)\n\n![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@odata/client)\n![node-lts (scoped with tag)](https://img.shields.io/node/v-lts/@odata/client/latest)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Soontao_c4codata\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=Soontao_c4codata)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Soontao_c4codata\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=Soontao_c4codata)\n[![DeepScan grade](https://deepscan.io/api/teams/9408/projects/11929/branches/178297/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=9408\u0026pid=11929\u0026bid=178297)\n\nJavascript OData Client for OData (v2/v4) Service.\n\n## Installation\n\n```bash\nnpm i -S @odata/client\n```\n\nAlternative, in native browser environment, just add [unpkg](https://unpkg.com/@odata/client) or [jsdeliver](https://www.jsdelivr.com/package/npm/@odata/client) umd link to your page, and the `OData` object will be available in `window`.\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@odata/client/lib/odata-client-umd.js\"\u003e\u003c/script\u003e\n```\n\n## ODataClient\n\n\u003e How to use `@odata/client`\n\n\nStart with a simple query, following code start a `GET` http request, and asks the server to respond to all customers which phone number equals 030-0074321\n\n```javascript\nimport { OData } from \"@odata/client\"\n// import \"@odata/client/lib/polyfill\" // server side polyfill\n\n// odata.org sample odata service\nconst serviceEndpoint = \"https://services.odata.org/V2/Northwind/Northwind.svc/\"\nconst client = OData.New({ serviceEndpoint })\n\nconst runner = async () =\u003e {\n  \n  // Query by filter\n  //\n  // GET /Customers?$format=json\u0026$filter=Phone eq '030-0074321'\n  const filter = client.newFilter().property(\"Phone\").eq(\"030-0074321\");\n\n  // just an example, suggest to use the EntitySet API\n  const result = await client.newRequest({ // ODataRequest object\n    collection: \"Customers\", // entity set\n    params: client.newParam().filter(filter) // odata param\n  })\n\n}\n```\n\n```js\n// OData V4 client\nconst client = OData.New4({ serviceEndpoint: \"https://odata-v4-demo-001.herokuapp.com/odata/\" })\n```\n\n\n## SystemQueryOption\n\nuse `SystemQueryOption` to control `response size`, `element projection` and `order`\n\n[go to the document](./docs/API.SystemQueryOptions.md)\n\n## ODataFilter\n\nuse the `ODataFilter` to filter data\n\n[go to the document](./docs/API.ODataFilter.md)\n\n## EntitySet\n\nuse `EntitySet` to perform `CRUD` on a specific entity\n\n[go to the document](./docs/API.EntitySet.md)\n\n## Batch requests\n\nuse odata `$batch` api for operating multi entities in **single** HTTP request, it will save a lot of time between client \u0026 server (In the case of processing a large number of requests).\n\n[go to the document](./docs/Batch.md)\n\n## Advanced\n\nsome advanced topics\n\n- literal in uri\n- request interpreter\n- server side polyfill\n\n[go to the document](./docs/Advanced.md)\n\n## [CHANGELOG](./CHANGELOG.md)\n\n## [LICENSE](./LICENSE)\n\n## Thanks JetBrains\n\n[![](https://res.cloudinary.com/digf90pwi/image/upload/c_scale,h_100/v1592445332/jetbrains-variant-2-blackandwhite_ppc34r.png)](https://www.jetbrains.com/?from=light-odata)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoontao%2Flight-odata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoontao%2Flight-odata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoontao%2Flight-odata/lists"}