{"id":20358115,"url":"https://github.com/irods/irods_client_http_typescript","last_synced_at":"2025-07-19T13:09:46.329Z","repository":{"id":245194862,"uuid":"817449541","full_name":"irods/irods_client_http_typescript","owner":"irods","description":"Wrapper for iRODS HTTP API written in TypeScript","archived":false,"fork":false,"pushed_at":"2024-08-15T19:01:50.000Z","size":793,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-15T01:42:25.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/irods.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T18:25:32.000Z","updated_at":"2024-08-15T19:01:53.000Z","dependencies_parsed_at":"2024-11-14T23:27:17.155Z","dependency_job_id":"9aa1b613-fbe1-4101-bd0a-43644fd8d968","html_url":"https://github.com/irods/irods_client_http_typescript","commit_stats":null,"previous_names":["farbs03/irods-http-api-wrapper-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_client_http_typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_client_http_typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_client_http_typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irods%2Firods_client_http_typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irods","download_url":"https://codeload.github.com/irods/irods_client_http_typescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241895341,"owners_count":20038512,"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-11-14T23:25:26.661Z","updated_at":"2025-03-04T17:47:57.813Z","avatar_url":"https://github.com/irods.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iRODS TypeScript HTTP API Wrapper\n\n## Installation\n\n```\nnpm install git+https://github.com/irods/irods_client_http_typescript\n```\n\n## Usage\n\nThe following example demonstrates how the client can be used to create a new collection.\n\n```js\nimport { IrodsHttpClient } from 'irods_client_http_typescript'\nimport type { URLComponentsType } from 'irods_client_http_typescript'\nimport assert from 'assert'\n\n// Create a url configuration object, containing info about\n// the irods http api that's running on your local machine.\nconst urlComponents: URLComponentsType = {\n    host: '\u003chost\u003e',\n    port: '\u003cport\u003e',\n    version: '\u003cversion\u003e',\n}\n\n// Create an IrodsHttpClient object.\n// \u003cusername\u003e and \u003cpassword\u003e are placeholders.\nconst api = new IrodsHttpClient(urlComponents, '\u003cusername\u003e', '\u003cpassword\u003e')\n\n// \u003cusername\u003e is the same placeholder value used above.\nlet lpath = \"/tempZone/home/\u003cusername\u003e/newCollection\"\n\n// After authenticating the client in an asynchronous context,\n// any operations of the api can be done.\nasync function authenticateAndCreateCollection(lpath: string) {\n    try {\n        await api.authenticate()\n        let res = await api.collections.create({lpath: lpath})\n\n        // res.status contains the http status code of the response.\n        // If res.status \u003e= 400, then res.data is null and there was an error.\n        assert(res.status \u003c 400, 'Error obtaining response!')\n\n        // At this point, the response went through, so res.data shouldn't be null.\n        // If the irods_response status code is non-zero, there was an error.\n        assert(\n            res.data !== null \u0026\u0026 res.data.irods_response.status_code \u003e= 0, \n            'Error with response data!'\n        )\n\n        console.log('Response obtained:', res)\n    }\n    catch (e) {\n        if (e instanceof AssertionError) {\n            console.log(e.message)\n        }\n        else {\n            console.log('Unexpected error:', e)\n        }\n    }\n}\n\nauthenticateAndCreateCollection(lpath);\n```\n\n## Contributing\n\n### Documentation\n\nThis repository utilizes the `typedoc` package to auto-generate documentation.\n\nIf a change has been made to the codebase, the typedocs can be updated by running `npx typedoc` from the root of the repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firods%2Firods_client_http_typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firods%2Firods_client_http_typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firods%2Firods_client_http_typescript/lists"}