{"id":37571218,"url":"https://github.com/ressurectit/ng-rest","last_synced_at":"2026-01-16T09:24:13.807Z","repository":{"id":57097685,"uuid":"232579104","full_name":"ressurectit/ng-rest","owner":"ressurectit","description":"Angular module representing rest services - https://ressurectit.github.io/#/content/rest","archived":false,"fork":false,"pushed_at":"2025-01-24T13:26:46.000Z","size":601,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T21:04:58.288Z","etag":null,"topics":["angular","decorators","rest-client","restclient"],"latest_commit_sha":null,"homepage":"","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/ressurectit.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2020-01-08T14:15:47.000Z","updated_at":"2025-01-24T13:24:27.000Z","dependencies_parsed_at":"2023-11-17T21:31:29.827Z","dependency_job_id":null,"html_url":"https://github.com/ressurectit/ng-rest","commit_stats":{"total_commits":188,"total_committers":7,"mean_commits":"26.857142857142858","dds":"0.16489361702127658","last_synced_commit":"fc9a35dabc0645c4f6ead097a4ba3f8bdc119459"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/ressurectit/ng-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ressurectit%2Fng-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ressurectit%2Fng-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ressurectit%2Fng-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ressurectit%2Fng-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ressurectit","download_url":"https://codeload.github.com/ressurectit/ng-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ressurectit%2Fng-rest/sbom","scorecard":{"id":772008,"data":{"date":"2025-08-11","repo":{"name":"github.com/ressurectit/ng-rest","commit":"04f63efcbec722abae876b462219a15170332630"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T02:28:03.481Z","repository_id":57097685,"created_at":"2025-08-23T02:28:03.481Z","updated_at":"2025-08-23T02:28:03.481Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","decorators","rest-client","restclient"],"created_at":"2026-01-16T09:24:13.700Z","updated_at":"2026-01-16T09:24:13.787Z","avatar_url":"https://github.com/ressurectit.png","language":"TypeScript","readme":"[![npm version](https://badge.fury.io/js/%40anglr%2Frest.svg)](https://badge.fury.io/js/%40anglr%2Frest)\r\n[![Build status](https://ci.appveyor.com/api/projects/status/92d634q2sky7gvkx?svg=true)](https://ci.appveyor.com/project/kukjevov/ng-rest)\r\n\r\n# Angular Rest Client\r\n\r\nAngular HTTP client to consume RESTful services. Built on `@angular/http` with TypeScript.  \r\n\r\n- [Description](#description)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [API](https://ressurectit.github.io/#/content/api/ng-rest/rest)\r\n- [API AVSC](https://ressurectit.github.io/#/content/api/ng-rest-avsc/rest-avsc)\r\n- [API Date FNS](https://ressurectit.github.io/#/content/api/ng-rest-datetime/rest-datetime)\r\n- [API StompJs](https://ressurectit.github.io/#/content/api/ng-rest-stompjs/rest-stompjs)\r\n\r\n## Description\r\n\r\n- Module with decorators to make class RESTfull\r\n- TODO - add description\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install @anglr/rest --save\r\n```\r\n\r\n### SystemJs Usage\r\n\r\nIn your **SystemJs** configuration script add following lines to `packages` configuration section:\r\n\r\n```javascript\r\npackages:\r\n{\r\n    '@anglr/rest': \r\n    {\r\n        main: \"dist/index.min.js\",\r\n        defaultExtension: 'js'\r\n    }\r\n}\r\n```\r\n\r\n### Webpack Usage\r\n\r\nThis depends on your preferences, but you can use it as any other angular module, just use it in code and webpack will automatically add it to result `.js` file.\r\n\r\n\r\n## Usage\r\n\r\n*config/global.json*\r\n```json\r\n{\r\n    \"apiBaseUrl\": \"api/\",\r\n    \"defaultApiHeaders\": \r\n    {\r\n        \"Accept\": \"application/json\"\r\n    }\r\n}\r\n```\r\n\r\n*user.interface.ts*\r\n```typescript\r\nexport interface User\r\n{\r\n    id?: string;\r\n    name?: string;\r\n    surname?: string;\r\n    birthDate?: moment.Moment;\r\n}\r\n\r\nexport interface Paging\r\n{\r\n    from?: number;\r\n    to?: number;\r\n}\r\n```\r\n\r\n*user.service.ts*\r\n```typescript\r\nimport {Injectable} from '@angular/core';\r\nimport {RESTClient, GET, POST, Path, Body, Query, BaseUrl, DefaultHeaders, Produces, ResponseType, ResponseTransform, LocationHeaderResponse} from '@anglr/rest';\r\nimport {isPresent} from '@jscrpt/common';\r\nimport {User, Paging} from './user.interface';\r\nimport {Observable} from 'rxjs';\r\nimport global from 'config/global';\r\nimport moment from 'moment';\r\n\r\n/**\r\n * Service used to access User REST resource\r\n */\r\n@Injectable()\r\n@BaseUrl(global.apiBaseUrl)\r\n@DefaultHeaders(global.defaultApiHeaders)\r\nexport class UserService extends RESTClient\r\n{\r\n    //######################### public methods #########################\r\n\r\n    /**\r\n     * Gets available users by specified criteria\r\n     */\r\n    @Produces(ResponseType.Json)\r\n    @ResponseTransform()\r\n    @GET(\"users\")\r\n    public getAll(@Query(\"surname\") surname: string,\r\n                  @QueryObject paging?: Paging,\r\n                  @Query(\"name\") name?: string): Observable\u003cUser[]\u003e\r\n    {\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Gets specified user by id\r\n     */\r\n    @Produces(ResponseType.Json)\r\n    @GET(\"users/{id}\")\r\n    public get(@Path(\"id\") id: string): Observable\u003cUser\u003e\r\n    {\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Creates new user\r\n     */\r\n    @Produces(ResponseType.LocationHeader)\r\n    @JsonContentType()\r\n    @POST(\"users\")\r\n    public createUser(@Body user: User): Observable\u003cLocationHeaderResponse\u003e\r\n    {\r\n        return null;\r\n    }\r\n\r\n    //######################### private methods #########################\r\n\r\n    /**\r\n     * Transform response from getAll method\r\n     */\r\n    private getAllResponseTransform(response: Observable\u003cUser[]\u003e): Observable\u003cUser[]\u003e\r\n    {\r\n        return response.map(result =\u003e\r\n        {\r\n            if(result \u0026\u0026 result.length \u003e 0)\r\n            {\r\n                result.forEach(user =\u003e \r\n                {\r\n                    if(isPresent(user.birthDate))\r\n                    {\r\n                        user.birthDate = moment(user.birthDate);\r\n                    \r\n                        if(!user.birthDate.isValid)\r\n                        {\r\n                            user.birthDate = null;\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n\r\n            return result;\r\n        });\r\n    }\r\n}\r\n```\r\n\r\n## API\r\n\r\n### `RESTClient` - Angular RESTClient base class.\r\n\r\n#### *Properties*\r\n - TODO - constructor properties\r\n\r\n#### *Methods*\r\n- `getBaseUrl(): string` - Returns the base url of RESTClient\r\n- `getDefaultHeaders(): Object` - Returns the default headers of RESTClient in a key-value pair\r\n- `requestInterceptor(req: Request): void` - Request interceptor for all methods in class\r\n  - `req: Request` - Http Request that can be intercepted\r\n- `responseInterceptor(res: Observable\u003cany\u003e): Observable\u003cany\u003e` - Allows to intercept all responses for all methods in class\r\n  - `res: Observable\u003cany\u003e` - response that can be intercepted\r\n  - *return* - returns new response\r\n\r\n### Class decorators:\r\n- `@BaseUrl(url: string)`\r\n- `@DefaultHeaders(headers: Object)`\r\n\r\n### Method decorators:\r\n- `@GET(url: String)`\r\n- `@POST(url: String)`\r\n- `@PUT(url: String)`\r\n- `@DELETE(url: String)`\r\n- `@Headers(headers: Object)`\r\n- `@JsonContentType()`\r\n- `@FormDataContentType()`\r\n- `@Produces(producesDef: ResponseType)`\r\n- `@ResponseTransform(methodName?: string)`\r\n- `@Cache()`\r\n\r\n### Parameter decorators:\r\n- `@Path(key: string)`\r\n- `@Query(key: string)`\r\n- `@Header(key: string)`\r\n- `@Body`\r\n- `@QueryObject`\r\n- `@PlainBody`\r\n- `@ParameterTransform`\r\n\r\n# License\r\n\r\nMIT\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fressurectit%2Fng-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fressurectit%2Fng-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fressurectit%2Fng-rest/lists"}