{"id":13515206,"url":"https://github.com/teslahunt/inventory","last_synced_at":"2025-03-31T04:36:39.307Z","repository":{"id":37644356,"uuid":"284931812","full_name":"teslahunt/inventory","owner":"teslahunt","description":"Retrieve real-time data from Tesla Inventory.","archived":false,"fork":false,"pushed_at":"2024-10-29T13:01:06.000Z","size":1407,"stargazers_count":27,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T15:55:18.736Z","etag":null,"topics":["cpo","inventory","tesla","tesla-api","teslaapi","teslamotors"],"latest_commit_sha":null,"homepage":"https://teslahunt.io","language":"JavaScript","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/teslahunt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-08-04T09:13:03.000Z","updated_at":"2024-10-29T13:01:10.000Z","dependencies_parsed_at":"2023-12-26T14:28:54.218Z","dependency_job_id":"ecef2f8c-7c6e-4acf-a710-93e5c881387f","html_url":"https://github.com/teslahunt/inventory","commit_stats":{"total_commits":2010,"total_committers":5,"mean_commits":402.0,"dds":0.003980099502487566,"last_synced_commit":"dcd41d923b23839abcc63b6f6c0b5ad5f8e947ce"},"previous_names":["teslahunt/tesla-inventory"],"tags_count":1021,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teslahunt%2Finventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teslahunt%2Finventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teslahunt%2Finventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teslahunt%2Finventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teslahunt","download_url":"https://codeload.github.com/teslahunt/inventory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418658,"owners_count":20773934,"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":["cpo","inventory","tesla","tesla-api","teslaapi","teslamotors"],"created_at":"2024-08-01T05:01:07.623Z","updated_at":"2025-03-31T04:36:35.480Z","avatar_url":"https://github.com/teslahunt.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://teslahunt.io/banner-red.png\"\u003e\n  \u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n![Last version](https://img.shields.io/github/tag/teslahunt/tesla-inventory.svg?style=flat-square)\n[![NPM Status](https://img.shields.io/npm/dm/tesla-inventory.svg?style=flat-square)](https://www.npmjs.org/package/tesla-inventory)\n\n\u003e Retrieve real-time data from Tesla Inventory.\n\n## Install\n\n```bash\n$ npm install tesla-inventory --save\n```\n\n## Usage\n\n```js\nconst createTeslaInventory = require('tesla-inventory')\n\nconst fetcher = url =\u003e fetch(url).then(res =\u003e res.text())\n\nconst teslaInventory = createTeslaInventory(fetcher)\n\nteslaInventory('fr', {\n  model: 's',\n  condition: 'used'\n}).then(results =\u003e console.log(results))\n```\n\n## API\n\n### teslaInventory(fetcher)\n\n#### fetcher\n\n*Required*\u003cbr\u003e\nType: `function`\n\nThe fetcher function used for performing the networking calls. It should return text ([example](https://github.com/teslahunt/inventory/blob/master/test/index.js#L6)).\n\n### .teslaInventory([inventory], [query], [fetcherOpts])\n\n#### inventory\n\n*Required*\u003cbr\u003e\nType: `string`\n\nThe Tesla Inventory identifier, see [`inventories`](/inventories.js).\n\n#### query\n\nType: `object`\n\nThe query options to be passed agaisnt [Tesla Inventory API](https://www.tesla.com/inventory/api/v1/inventory-results).\n\nThese options can be:\n\n- **arrangeby**: Price\n- **condition**: used|new\n- **model**: ms|mx|m3\n- **order**: asc|desc\n\n#### fetcherOpts\n\nType: `object`\n\nThe options to be passed against `fetcher`.\n\n## License\n\n**tesla-inventory** © [Tesla Hunt](https://teslahunt.io), released under the [MIT](https://github.com/teslahunt/inventory/blob/master/LICENSE.md) License.\u003cbr\u003e\nAuthored and maintained by [Tesla Hunt](https://teslahunt.io) with help from [contributors](https://github.com/teslahunt/inventory/contributors).\n\n\u003e [teslahunt.io](https://teslahunt.io) · GitHub [teslahunt](https://github.com/teslahunt) · Twitter [@teslahuntio](https://twitter.com/teslahuntio)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteslahunt%2Finventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteslahunt%2Finventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteslahunt%2Finventory/lists"}