{"id":21202607,"url":"https://github.com/cundd/rest-adapter-typescript","last_synced_at":"2025-03-14T22:28:20.844Z","repository":{"id":56960221,"uuid":"141997139","full_name":"cundd/rest-adapter-typescript","owner":"cundd","description":"Adapter to interface with REST via TypeScript","archived":false,"fork":false,"pushed_at":"2020-03-26T11:20:30.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T15:11:24.424Z","etag":null,"topics":["rest","rest-client","restful-api","typescript","typescript-adapter","typo3"],"latest_commit_sha":null,"homepage":null,"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/cundd.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}},"created_at":"2018-07-23T10:08:54.000Z","updated_at":"2020-03-26T11:20:32.000Z","dependencies_parsed_at":"2022-08-21T10:20:10.777Z","dependency_job_id":null,"html_url":"https://github.com/cundd/rest-adapter-typescript","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cundd%2Frest-adapter-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cundd%2Frest-adapter-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cundd%2Frest-adapter-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cundd%2Frest-adapter-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cundd","download_url":"https://codeload.github.com/cundd/rest-adapter-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243655750,"owners_count":20326139,"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":["rest","rest-client","restful-api","typescript","typescript-adapter","typo3"],"created_at":"2024-11-20T20:17:15.901Z","updated_at":"2025-03-14T22:28:20.823Z","avatar_url":"https://github.com/cundd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript Adapter for [Cundd Rest](https://rest.cundd.net)\n\nLibrary to fetch and deserialize objects from a REST API\n\n```typescript\nimport {AdapterConfiguration, RestAdapter, PropertyTypeOptions, ra_property} from '@cundd/rest-adapter';\n\nexport class Person {\n    // Map property `name` 1:1 when converting \n    @ra_property()\n    public name: string;\n\n    // Convert the input data of `realEstates` into an array of `RealEstate` objects \n    @ra_property(RealEstate, PropertyTypeOptions.Multiple)\n    public realEstates: RealEstate[];\n}\n\nexport class RealEstate {\n    // Use key `street` for property `_street` when converting \n    @ra_property('street')\n    private _street: string;\n\n    get street(): string {\n        return this._street;\n    }\n}\n\nconst rd = new RestAdapter(AdapterConfiguration.fromUrl('http://base.url.tld/rest/'));\nconst promise = rd.findAll\u003cPerson\u003e('Iresults-RealEstate-Person');\npromise\n    .then((foundPersons: Person[])=\u003e {\n        // Do something with the found records\n    })\n    .catch(error =\u003e {\n        // Handle errors\n    });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcundd%2Frest-adapter-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcundd%2Frest-adapter-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcundd%2Frest-adapter-typescript/lists"}