{"id":15184693,"url":"https://github.com/nitro404/angular-envelope","last_synced_at":"2025-10-01T23:30:54.027Z","repository":{"id":57178352,"uuid":"121192873","full_name":"nitro404/angular-envelope","owner":"nitro404","description":null,"archived":true,"fork":false,"pushed_at":"2020-03-19T03:22:06.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-15T22:05:01.664Z","etag":null,"topics":["angular1","angularjs","javascript","node","npm-module","rest"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/nitro404.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}},"created_at":"2018-02-12T02:59:14.000Z","updated_at":"2023-01-28T15:23:35.000Z","dependencies_parsed_at":"2022-09-14T02:31:17.357Z","dependency_job_id":null,"html_url":"https://github.com/nitro404/angular-envelope","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitro404%2Fangular-envelope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitro404%2Fangular-envelope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitro404%2Fangular-envelope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitro404%2Fangular-envelope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitro404","download_url":"https://codeload.github.com/nitro404/angular-envelope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234909087,"owners_count":18905505,"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":["angular1","angularjs","javascript","node","npm-module","rest"],"created_at":"2024-09-27T17:22:03.783Z","updated_at":"2025-10-01T23:30:48.770Z","avatar_url":"https://github.com/nitro404.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Envelope\n\n[![NPM version][npm-version-image]][npm-url]\n[![Build Status][build-status-image]][build-status-url]\n[![Coverage Status][coverage-image]][coverage-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![Downloads][npm-downloads-image]][npm-url]\n\n**This module has been deprecated, use [xhr-envelope][xhr-envelope-url] instead.**\n\nA wrapper for the AngularJS $http service to allow for simpler RESTful API transactions.\n\n## Client-Side Usage\n\nInclude the script in your main template file:\n```html\n\u003cscript src=\"/node_modules/angular-envelope/dist/envelope.js\"\u003e\u003c/script\u003e\n```\n\nAdd the `envelope` dependency to the module you wish to use the service in, along with the `Envelope` service as a constructor argument:\n```javascript\nangular.module(\"meme-central\", [\"envelope\"])\n\n.config(function($stateProvider) {\n\t$stateProvider.state(\"memes\", {\n\t\turl: \"/memes\",\n\t\ttemplateUrl: \"memes.html\",\n\t\tcontroller: \"MemesController\",\n\t\tcontrollerAs: \"memesController\"\n\t});\n})\n\n.controller(\"MemesController\", function(Envelope) {\n\tvar self = this;\n\n\tEnvelope.setBaseUrl(\"http://127.0.0.1:3000\");\n\n\tself.memes = [];\n\n\tself.getMemes = function() {\n\t\treturn Envelope.get(\n\t\t\t\"memes\",\n\t\t\t{\n\t\t\t\tcategoryId: 420\n\t\t\t},\n\t\t\t{\n\t\t\t\ttimeout: 6969,\n\t\t\t\theaders: {\n\t\t\t\t\tAuthorization: \"dnkroz\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction(error, data, response) {\n\t\t\t\tif(error) {\n\t\t\t\t\treturn console.error(error);\n\t\t\t\t}\n\n\t\t\t\tself.memes = data;\n\t\t\t}\n\t\t);\n\t};\n\n\tself.forcedMeme = function() {\n\t\treturn Envelope.post(\n\t\t\t\"memes\",\n\t\t\t{\n\t\t\t\ttitle: \"Uganda Knuckles\",\n\t\t\t\tphrase: \"u do not kno da wae.\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tauthorization: \"idspispopd\"\n\t\t\t},\n\t\t\tfunction(error, data, response) {\n\t\t\t\tif(error) {\n\t\t\t\t\treturn console.error(error);\n\t\t\t\t}\n\n\t\t\t\tself.memes.push(data);\n\t\t\t}\n\t\t);\n\t};\n});\n```\n\n## Installation\n\nTo install this module:\n```bash\nnpm install angular-envelope\n```\n\n[xhr-envelope-url]: https://github.com/nitro404/xhr-envelope\n\n[npm-url]: https://www.npmjs.com/package/angular-envelope\n[npm-version-image]: https://img.shields.io/npm/v/angular-envelope.svg\n[npm-downloads-image]: http://img.shields.io/npm/dm/angular-envelope.svg\n\n[build-status-url]: https://travis-ci.org/nitro404/angular-envelope\n[build-status-image]: https://travis-ci.org/nitro404/angular-envelope.svg?branch=master\n\n[coverage-url]: https://coveralls.io/github/nitro404/angular-envelope?branch=master\n[coverage-image]: https://coveralls.io/repos/github/nitro404/angular-envelope/badge.svg?branch=master\n\n[snyk-url]: https://snyk.io/test/github/nitro404/angular-envelope?targetFile=package.json\n[snyk-image]: https://snyk.io/test/github/nitro404/angular-envelope/badge.svg?targetFile=package.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitro404%2Fangular-envelope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitro404%2Fangular-envelope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitro404%2Fangular-envelope/lists"}