{"id":25961727,"url":"https://github.com/ttab/eslight","last_synced_at":"2025-08-21T02:08:29.227Z","repository":{"id":8729107,"uuid":"10402462","full_name":"ttab/eslight","owner":"ttab","description":"Lightweight ES client for node.js","archived":false,"fork":false,"pushed_at":"2016-04-28T11:31:45.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-08-09T05:44:58.686Z","etag":null,"topics":["archived-repository"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-31T10:07:39.000Z","updated_at":"2019-03-28T10:43:54.000Z","dependencies_parsed_at":"2022-09-19T07:41:04.601Z","dependency_job_id":null,"html_url":"https://github.com/ttab/eslight","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ttab/eslight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feslight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feslight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feslight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feslight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttab","download_url":"https://codeload.github.com/ttab/eslight/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttab%2Feslight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415496,"owners_count":24755639,"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-08-21T02:00:08.990Z","response_time":74,"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":["archived-repository"],"created_at":"2025-03-04T19:41:13.181Z","updated_at":"2025-08-21T02:08:29.210Z","avatar_url":"https://github.com/ttab.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Elasticsearch Lightweight Client\n================================\n\n## DEPRECATED! DON'T USE THIS. USE OFFICIAL ELASTIC JAVASCRIPT CLIENT\n\nPromise based simple client for elasticsearch.\n\n## Installing\n\n    npm install eslight\n\n## Using\n\n    ESLight = require 'eslight'\n\n    es = new ESLight('http://my-es-node-1:9200/')\n\n    (es.exec 'myindex', mytype', 'mydoc').then (res) -\u003e\n        console.log 'And the result it', res\n    .fail (err) -\u003e\n        console.log 'Uh oh', err\n\n    (es.exec 'PUT', 'myindex', mytype', 'mydoc', {some object...}).then (res) -\u003e\n        console.log 'And the result it', res\n    .fail (err) -\u003e\n        console.log 'Uh oh', err\n\n## `ESLight(string, ...)` or `ESLight(url, ...)`\n\nThe constructor takes a variable number endpoints as either `string`\nor `url` objects. The `url` object is of the kind that `url.parse`\nreturns.\n\nThe endpoints will be used for round robin access to distribute load\nand retries if any endpoint fails.\n\nThe arguments can be one or multiple strings or one or multiple arrays\nof strings.\n\n## `exec([verb], path part, ..., [query], [body])`\n\n### `[verb]`\nThe exec method has a flexible number of arguments. The first argument\ncan be an optional HTTP string verb, one of `GET`, `POST`, `PUT`,\n`DELETE`. If not provided the verb defaults to `GET`.\n\n### `path part`\n\nThere must be at least one string path part. Each path part will be\njoined with a `/`. The following examples are equivalent:\n\n* `exec('myindex', 'mytype', 'mydoc')`\n* `exec('myindex/mytype', 'mydoc')`\n* `exec('myindex/mytype/mydoc')`\n* `exec('/myindex/mytype/mydoc')`\n\n### `[body]`\n\nThe body is optional and will be submitted if the last argument is of\n`object` type. Remember that `typeof null == 'object'`.\n\n    exec 'PUT', 'myindex/mytype/mydoc', {some:'doc', to:'store'}\n\n### `[query]`\n\nThe query is optional, and will only be used if there is a body\npart. To have only a query and no body, the last argument must be\n`null`.\n\nOptimistic locking as in `/myindex/mytype/mydoc?version=4`:\n\n    exec 'PUT', 'myindex/mytype/mydoc', {version:4}, {some:'doc', to:'store'}\n\nNotice `null` in this case:\n\n    exec 'GET', 'myindex/mytype/mydoc/_search', {q:'find this'}, null\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttab%2Feslight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttab%2Feslight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttab%2Feslight/lists"}