{"id":22509679,"url":"https://github.com/getshifter/hl-sdk-node","last_synced_at":"2025-03-28T00:24:38.794Z","repository":{"id":37052138,"uuid":"272685895","full_name":"getshifter/hl-sdk-node","owner":"getshifter","description":"npm install --save @shifter/headless-sdk","archived":false,"fork":false,"pushed_at":"2024-04-23T04:17:49.000Z","size":2559,"stargazers_count":0,"open_issues_count":19,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T07:09:34.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://getshifter.github.io/hl-sdk-node/","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/getshifter.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":"2020-06-16T11:08:15.000Z","updated_at":"2024-06-04T23:06:37.316Z","dependencies_parsed_at":"2024-01-04T16:47:18.585Z","dependency_job_id":"73f8e044-13f1-4456-951a-a7de6403b88d","html_url":"https://github.com/getshifter/hl-sdk-node","commit_stats":{"total_commits":169,"total_committers":5,"mean_commits":33.8,"dds":"0.21301775147928992","last_synced_commit":"5143aea3e598e9867bab7f03957246f62bf384b3"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getshifter%2Fhl-sdk-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getshifter%2Fhl-sdk-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getshifter%2Fhl-sdk-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getshifter%2Fhl-sdk-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getshifter","download_url":"https://codeload.github.com/getshifter/hl-sdk-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245945716,"owners_count":20698298,"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":"2024-12-07T01:30:09.672Z","updated_at":"2025-03-28T00:24:38.761Z","avatar_url":"https://github.com/getshifter.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shifter Headless API SDK (beta)\n\n```bash\nnpm install --save @shifter/headless-sdk\n```\n\n## Usage\n\n### Directory set authorization token\n\nIf you integrated by OAuth2, we can use the authorization token.\n\n#### TypeScript\n\n```typescript\nimport {Shifter} from '@shifter/headless-sdk'\nconst shifter = new Shifter({\n   token: \"SHIFTER_AUTH_TOKEN\"\n})\nshifter.sites.lists()\n .then(data =\u003e console.log(data))\n```\n\n#### JavaScript\n\n```javascript\nconst {Shifter} = require('@shifter/headless-sdk')\n\nconst shifter = new Shifter({\n   token: \"SHIFTER_AUTH_TOKEN\"\n})\nshifter.sites.lists()\n .then(data =\u003e console.log(data))\n```\n\n### Setup with username/password auth\n\nWe can directory setup the client with username and password.\n\n#### TypeScript\n\n```typescript\nimport {Shifter} from '@shifter/headless-sdk'\nconst shifter = await Shifter.setupWithLogin('USERNAME', 'PASSWORD')\n\nshifter.sites.lists()\n .then(data =\u003e console.log(data))\n```\n\n#### JavaScript\n\n```javascript\nconst {Shifter} = require('@shifter/headless-sdk')\n\nShifter.setupWithLogin('USERNAME', 'PASSWORD')\n.then(shifter =\u003e {\n    shifter.sites.list()\n        .then(data =\u003e {\n            console.log(data)\n        }).catch(e =\u003e {\n            console.log(e)\n        })\n})\n```\n\n## Development\n\nThis project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).\n\n### Local Development\n\nBelow is a list of commands you will probably find useful.\n\n#### `npm start` or `yarn start`\n\nRuns the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif\" width=\"600\" /\u003e\n\nYour library will be rebuilt if you make edits.\n\n#### `npm run build` or `yarn build`\n\nBundles the package to the `dist` folder.\nThe package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).\n\n\u003cimg src=\"https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif\" width=\"600\" /\u003e\n\n#### `npm test` or `yarn test`\n\nRuns the test watcher (Jest) in an interactive mode.\nBy default, runs tests related to files changed since the last commit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetshifter%2Fhl-sdk-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetshifter%2Fhl-sdk-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetshifter%2Fhl-sdk-node/lists"}