{"id":13618440,"url":"https://github.com/nytimes/elemental-live-client","last_synced_at":"2025-04-14T10:31:59.367Z","repository":{"id":16921018,"uuid":"80748937","full_name":"nytimes/elemental-live-client","owner":"nytimes","description":"JS library to communicate with Elemental live API.","archived":false,"fork":false,"pushed_at":"2023-04-18T04:29:35.000Z","size":767,"stargazers_count":19,"open_issues_count":24,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-12-20T09:36:56.361Z","etag":null,"topics":["elemental","hls","hls-live-streaming","live","live-streaming"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nytimes.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}},"created_at":"2017-02-02T17:20:19.000Z","updated_at":"2024-05-05T14:49:13.000Z","dependencies_parsed_at":"2024-07-26T12:18:38.137Z","dependency_job_id":"83b23a07-7474-4f26-ac90-1f42307309cd","html_url":"https://github.com/nytimes/elemental-live-client","commit_stats":{"total_commits":168,"total_committers":7,"mean_commits":24.0,"dds":"0.42261904761904767","last_synced_commit":"a24dff3793d560843dfd94c24c995228747ba4f7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nytimes%2Felemental-live-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nytimes%2Felemental-live-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nytimes%2Felemental-live-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nytimes%2Felemental-live-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nytimes","download_url":"https://codeload.github.com/nytimes/elemental-live-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248862729,"owners_count":21173872,"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":["elemental","hls","hls-live-streaming","live","live-streaming"],"created_at":"2024-08-01T20:02:01.558Z","updated_at":"2025-04-14T10:31:59.042Z","avatar_url":"https://github.com/nytimes.png","language":"JavaScript","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# elemental-live-client\n\n[![Build Status](https://travis-ci.org/nytimes/elemental-live-client.svg?branch=main)](https://travis-ci.org/nytimes/elemental-live-client)\n[![codecov](https://codecov.io/gh/nytimes/elemental-live-client/branch/main/graph/badge.svg)](https://codecov.io/gh/nytimes/elemental-live-client)\n\nJS library to communicate with Elemental live API.\n\n## Usage\n\nThe client provides standard methods for resources, so calls will use be\nstructured in the format ``\u003cclient-instance\u003e.\u003cresource\u003e().\u003coperation\u003e()``.\n\nFirst, initialize the client. Optionally, provide any extra headers to add to\nrequests. Note, adding a version string is optional but instructs the client\nto use that version in requests to the API.\n\n```javascript\nconst client = new ElementalClient('https://elemental-server.example.com');\n```\n\nor\n\n```javascript\nconst client = new ElementalClient('https://elemental-server.example.com', { 'X-API-Key': 'anApiKey' },'v2.15.3.0');\n```\n\nAPI operations always return promises that resolve with the response data and\nfail with details about the failure. An example, listing presets:\n\n```javascript\nclient.presets().list()\n  .then((data) =\u003e console.log(`Got presets: ${data}`))\n  .catch((err) =\u003e console.log(`Something went wrong: ${err}`));\n```\n\n### Available resources\n\nThe following resources are currently available:\n\n* ``schedules``\n* ``liveEvents``\n* ``liveEventProfiles``\n* ``presets``\n* ``presetCategories``\n* ``devices``\n\n### Available operations\n\nCommon operations are:\n\n* ``create``\n* ``retrieve``\n* ``update``\n* ``delete``\n* ``list``\n\nSome resources might include more specific operations (for example, resetting a\nlive event).\n\n## Contributing\n\nContributions are welcome! In order to run this project locally, you have to\nhave node.js 6+ installed locally.\n\nJust make sure your contributions pass the test suite and eslint validation.\n[Travis CI](https://travis-ci.org/NYTimes/elemental-live-client/) will help you\nin ensuring that :)\n\n### Setting up local environment\n\nSetting up the local environment is a simple task: just ensure that you have\nnode.js and npm installed, clone this repo and then run:\n\n```\n% npm install\n```\n\nThis will install all dependencies.\n\n### Running tests and eslint\n\nAfter installing all dependencies, you can run the tests with the command:\n\n```\n% npm run test\n```\n\nlinting is also available, provided by eslint. The command to lint the source\nis very intuitive:\n\n```\n% npm run lint\n```\n\n## Integration tests/Examples\n\nYou can integration tests in the file\n[test/integration-test.js](https://github.com/NYTimes/elemental-live-client/blob/main/test/integration-test.js)\nfile. It contains integration tests that can also serve as examples on how to\nuse the client.\n\nTo run integration tests locally, you need to provide the address of an actual\nElemental server through the environment variable\n``ELEMENTAL_CLIENT_INTEGRATION_TESTS_HOST`` and run ``npm run test``. For example:\n\n```\n% ELEMENTAL_CLIENT_INTEGRATION_TESTS_HOST=http://elemental-live.example.com npm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnytimes%2Felemental-live-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnytimes%2Felemental-live-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnytimes%2Felemental-live-client/lists"}