{"id":13701395,"url":"https://github.com/ftgibran/vue-api-request","last_synced_at":"2025-05-04T21:30:51.968Z","repository":{"id":22774322,"uuid":"97284839","full_name":"ftgibran/vue-api-request","owner":"ftgibran","description":"Control your API calls by using an amazing component which supports axios and vue-resource","archived":false,"fork":false,"pushed_at":"2022-12-07T04:12:27.000Z","size":699,"stargazers_count":128,"open_issues_count":19,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-15T08:05:06.177Z","etag":null,"topics":["ajax","api","axios","component","loader","request","vue-resource","vuejs"],"latest_commit_sha":null,"homepage":"https://ftgibran.github.io/#/vue-api-request","language":"JavaScript","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/ftgibran.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}},"created_at":"2017-07-15T01:37:26.000Z","updated_at":"2023-11-07T12:46:05.000Z","dependencies_parsed_at":"2023-01-14T07:00:30.552Z","dependency_job_id":null,"html_url":"https://github.com/ftgibran/vue-api-request","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftgibran%2Fvue-api-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftgibran%2Fvue-api-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftgibran%2Fvue-api-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftgibran%2Fvue-api-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftgibran","download_url":"https://codeload.github.com/ftgibran/vue-api-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252403766,"owners_count":21742435,"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":["ajax","api","axios","component","loader","request","vue-resource","vuejs"],"created_at":"2024-08-02T20:01:35.310Z","updated_at":"2025-05-04T21:30:51.519Z","avatar_url":"https://github.com/ftgibran.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"256\" height=\"256\" src=\"https://ftgibran.github.io/static/v-api@512.png\" alt=\"Vue API Request\"/\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-api-request\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/vue-api-request.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-api-request\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/vue-api-request.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vue-api-request\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/vue-api-request.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Vue API Request\n\nVue API Request provides a full control on your APIs, making the calls simple, fast and easy to implement. Also, your code will be cleaner and more elegant.\n\n## [Docs \u0026 Demo](https://ftgibran.github.io/#/vue-api-request)\n\n## Installation\n\nPackage is installable via NPM\n\n```bash\n$ npm i vue-api-request --save\n```\n\n**or** via Yarn\n\n```bash\n$ yarn add vue-api-request\n```\n\n**or** via CDN\n\n```html\n\u003cscript src=\"https://unpkg.com/vue-api-request@latest/dist/vue-api-request.min.js\"\u003e\u003c/script\u003e\n\u003clink href=\"https://unpkg.com/vue-api-request@latest/dist/vue-api-request.min.css\" rel=\"stylesheet\"/\u003e\n```\n\nIt will set `window.VueApiRequest` as the module.\n\n[See example in JSFiddle](https://jsfiddle.net/gibranmax/everjv20/)\n\n## Basic Usage\n\nYou have to import the library and use as a Vue plugin to enable the functionality globally on all components.\n\n```javascript\nimport Vue from 'vue'\nimport VueApiRequest from 'vue-api-request'\nVue.use(VueApiRequest)\n```\n\n### Example\n\n```html\n\u003capi-request :resource=\"apiRequest\" v-model=\"apiResponse\"\u003e\n  My stuffs to be shown when the API loads\n\u003c/api-request\u003e\n```\n\n## Pre Configuration\n\nYou may also set your own default configuration, so you don't need to customize every time each ApiRequest component. You are still able to customize a specific component using props.\n\n### Example\n\n```javascript\nimport Vue from 'vue'\nimport VueApiRequest from 'vue-api-request'\n\nlet options = {\n  effect: 'lightSpeedIn',\n  resp: 'body.foo.bar',\n  spinner: 'DotLoader',\n  spinnerColor: 'blue', //or #0000ff\n  spinnerPadding: '2em',\n  spinnerScale: 1.4,\n  onSuccess: resp =\u003e {\n    console.log('Success', resp)\n  },\n  onError: resp =\u003e {\n    alert(`Error: ${resp.message}`)\n  }\n}\n\nVue.use(VueApiRequest, options)\n```\n\nThe 'options' variable above is equivalent of:\n\n```html\n\u003capi-request\n  :resource=\"apiRequest\"\n  v-model=\"apiResponse\"\n  effect=\"lightSpeedIn\"\n  resp=\"body.foo.bar\"\n  spinner=\"DotLoader\"\n  spinner-color=\"blue\"\n  spinner-padding=\"2em\"\n  :spinner-scale=\"1.4\"\n  @success=\"successEvent\"\n  @error=\"errorEvent\"\n\u003e\n  My stuffs to be shown when the API loads\n\u003c/api-request\u003e\n```\n\nGo to [Demo \u0026 Docs](https://ftgibran.github.io/#/vue-api-request) to further informations.\n\n## Contributing\n\n``` bash\n# clone project\ngit clone https://github.com/ftgibran/vue-api-request.git\ncd vue-api-request\n\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build for production with minification\nnpm run build\n\n# build for production and view the bundle analyzer report\nnpm run build --report\n\n# run unit tests\nnpm run unit\n\n# run e2e tests\nnpm run e2e\n\n# run all tests\nnpm test\n```\n\nFor detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).\n\n## License\n[MIT](https://opensource.org/licenses/MIT)\nCopyright (c) 2017 Felipe Gibran \u003cftgibran\u003e\n","funding_links":[],"categories":["Utilities [🔝](#readme)","JavaScript","公用事业","Components \u0026 Libraries","Utilities"],"sub_categories":["HTTP请求","Utilities","HTTP Requests"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftgibran%2Fvue-api-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftgibran%2Fvue-api-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftgibran%2Fvue-api-request/lists"}