{"id":20186094,"url":"https://github.com/hawapi/js-sdk","last_synced_at":"2025-03-03T06:44:13.997Z","repository":{"id":188789307,"uuid":"582615429","full_name":"HawAPI/js-sdk","owner":"HawAPI","description":"HawAPI SDK for JavaScript/TypeScript","archived":false,"fork":false,"pushed_at":"2023-11-08T20:26:57.000Z","size":255,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-13T18:16:37.281Z","etag":null,"topics":["api","api-sdk","hawapi","hawapi-js-sdk","hawapi-sdk","sdk","stranger-things"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@hawapi/js-sdk","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/HawAPI.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}},"created_at":"2022-12-27T11:22:54.000Z","updated_at":"2024-07-02T00:13:10.000Z","dependencies_parsed_at":"2023-11-08T05:45:32.173Z","dependency_job_id":"5275ab19-58f2-4dad-b0bd-24200e85ecb4","html_url":"https://github.com/HawAPI/js-sdk","commit_stats":null,"previous_names":["hawapi/js-sdk"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawAPI%2Fjs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawAPI%2Fjs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawAPI%2Fjs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HawAPI%2Fjs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HawAPI","download_url":"https://codeload.github.com/HawAPI/js-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241622593,"owners_count":19992501,"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":["api","api-sdk","hawapi","hawapi-js-sdk","hawapi-sdk","sdk","stranger-things"],"created_at":"2024-11-14T03:15:57.935Z","updated_at":"2025-03-03T06:44:13.975Z","avatar_url":"https://github.com/HawAPI.png","language":"TypeScript","readme":"# HawAPI - js-sdk\n\nHawAPI SDK for JavaScript/TypeScript\n\n- [API Docs](https://hawapi.theproject.id/docs/)\n- [TypeDoc](https://hawapi.github.io/js-sdk/v1/)\n\n## Topics\n\n- [Installation](#installation)\n  - [Npm](#npm)\n  - [Yarn](#yarn)\n  - [Cdn](#cdn)\n- [Usage](#usage)\n  - [Init](#init-client)\n    - [Javascript (UMD)](#javascript-umd)\n    - [Javascript (ESM)](#javascript-esm)\n  - [Error handling](#error-handling)\n    - [Then/Catch](#thencatch)\n    - [Try/Catch](#trycatch)\n\n## Installation\n\n### Npm\n\n```\nnpm install @hawapi/js-sdk\n```\n\n### Yarn\n\n```\nyarn add @hawapi/js-sdk\n```\n\n### Cdn\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@hawapi/js-sdk/dist/index.umd.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n- [See examples](./examples/)\n\n### Init client\n\n#### Javascript (UMD)\n\n```js\nconst client = HawAPI.createClient();\n// Also valid:\n// const { createClient } = HawAPI\n// const client = createClient()\nconsole.log('HawAPI client: ', client);\n```\n\n#### Javascript (ESM)\n\n```js\nimport { createClient } from '\u003cpath\u003e';\nconst client = createClient();\nconsole.log('HawAPI client: ', client);\n```\n\n### Error handling\n\n#### Then/Catch\n\n```js\nconst result = client\n  .getAll('actors')\n  .then((data) =\u003e data)\n  .catch((err) =\u003e console.error(err));\n```\n\n#### Try/Catch\n\n```js\nlet result;\ntry {\n  result = await client.getAll('actors');\n} catch (err) {\n  console.error(err);\n}\n```\n\n## Repository template\n\nThis repository uses [typescript-library-boilerplate](https://github.com/VitorLuizC/typescript-library-boilerplate) as template.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawapi%2Fjs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhawapi%2Fjs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhawapi%2Fjs-sdk/lists"}