{"id":27997634,"url":"https://github.com/itemsapi/itemsapi-js","last_synced_at":"2025-05-08T21:59:50.820Z","repository":{"id":42819809,"uuid":"267642472","full_name":"itemsapi/itemsapi-js","owner":"itemsapi","description":"Javascript client for ItemsAPI 2.0","archived":false,"fork":false,"pushed_at":"2022-12-30T20:29:58.000Z","size":121,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T21:59:47.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/itemsapi.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}},"created_at":"2020-05-28T16:39:51.000Z","updated_at":"2025-01-13T05:52:08.000Z","dependencies_parsed_at":"2023-01-31T16:01:19.023Z","dependency_job_id":null,"html_url":"https://github.com/itemsapi/itemsapi-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itemsapi%2Fitemsapi-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itemsapi%2Fitemsapi-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itemsapi%2Fitemsapi-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itemsapi%2Fitemsapi-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itemsapi","download_url":"https://codeload.github.com/itemsapi/itemsapi-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154974,"owners_count":21862621,"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":"2025-05-08T21:59:50.253Z","updated_at":"2025-05-08T21:59:50.814Z","avatar_url":"https://github.com/itemsapi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ItemsAPI Javascript \n\nJavascript client for ItemsAPI 2.0\n\n## Installation\n\n```sh\nnpm install itemsapi\n```\n\n### Run ItemsAPI\n\nThere are many easy ways to run ItemsAPI 2.0 server.\n\nThe simplest one is by using Docker:\n\n```bash\ndocker run --privileged -it -p 3000:3000 itemsapi/itemsapi:latest\n```\n\n## Getting started\n\nHere is a quickstart for a search request\n\n```js\nconst ItemsAPI = require('itemsapi')\n\n(async () =\u003e {\n  const client = new ItemsAPI({\n    host: 'http://127.0.0.1:3000',\n    // if needed\n    api_key: 'keykey135'\n  })\n\n  const index = client.getIndex(name);\n\n  let response = await index.updateConfig(config);\n  response = await index.addItems(items);\n  response = await index.search({\n    per_page: 3,\n    filters: {\n      tags: ['epic']\n    },\n    facets_fields: ['tags']\n  });\n  console.log(response);\n})();\n```\n\n\n## API Resources\n\n### Search \n\n- Make a search request:\n\n`await index.search(input)`\n\n- List filters for specific facet:\n\n`await index.facet(input)`\n\n### Index \n\n- Get index object:\n\n`client.getIndex(name)`\n\n### Items\n\n- Add items:\n\n`await index.addItems(items)`\n\n- Get item:\n\n`await index.getItem(id)`\n\n- Update item partially:\n\n`await index.partialUpdateItem(id, data)`\n\n- Update item:\n\n`await index.updateItem(id, data)`\n\n- Delete item:\n\n`await index.deleteItem(id)`\n\n\n### Configuration\n\n- Get configuration:\n\n`await index.getConfig()`\n\n- Update configuration:\n\n`await index.updateConfig(config)`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitemsapi%2Fitemsapi-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitemsapi%2Fitemsapi-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitemsapi%2Fitemsapi-js/lists"}