{"id":22775399,"url":"https://github.com/emileber/axios-resource","last_synced_at":"2025-07-17T07:32:29.684Z","repository":{"id":55370816,"uuid":"121772805","full_name":"emileber/axios-resource","owner":"emileber","description":"Simple Axios REST resource class","archived":false,"fork":false,"pushed_at":"2023-01-03T23:14:14.000Z","size":495,"stargazers_count":4,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T20:53:11.380Z","etag":null,"topics":["axios","http","resource","rest"],"latest_commit_sha":null,"homepage":"https://emileber.github.io/axios-resource/","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/emileber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-16T16:25:40.000Z","updated_at":"2019-04-20T17:59:06.000Z","dependencies_parsed_at":"2023-02-01T12:46:37.996Z","dependency_job_id":null,"html_url":"https://github.com/emileber/axios-resource","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emileber%2Faxios-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emileber%2Faxios-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emileber%2Faxios-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emileber%2Faxios-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emileber","download_url":"https://codeload.github.com/emileber/axios-resource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695477,"owners_count":21146956,"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":["axios","http","resource","rest"],"created_at":"2024-12-11T18:32:28.245Z","updated_at":"2025-04-15T10:30:33.473Z","avatar_url":"https://github.com/emileber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# axios-resource\n\n[![Build Status](https://travis-ci.org/emileber/axios-resource.svg?branch=master)](https://travis-ci.org/emileber/axios-resource)\n[![Dependency Status](https://beta.gemnasium.com/badges/github.com/emileber/axios-resource.svg)](https://beta.gemnasium.com/projects/github.com/emileber/axios-resource)\n[![npm version](https://badge.fury.io/js/axios-resource.svg)](https://www.npmjs.com/package/axios-resource)\n\nSimple [axios](https://github.com/axios/axios) resource class to easily interact with a REST endpoint.\n\nExplore [**the documentation**](https://emileber.github.io/axios-resource/).\n\n## Requirements\n\n- axios\n\n## Installation\n\n```bash\nnpm install --save axios-resource\n```\n\n## Getting started\n\nCreate a simple implementation of a resource endpoint.\n\n```javascript\nimport Resource from 'axios-resource';\n\nexport default class UserResource extends Resource {\n    static URL = 'user/{id}';\n}\n```\n\nThen expose the resource (e.g. through a service-like module).\n\n```javascript\nimport axios from 'axios';\nimport UserResource from './resources/user';\n\nconst http = axios.create({\n    baseURL: 'http://example.com'\n});\n\nexport default {\n    user: new UserResource({ http })\n}\n```\n\nYou're ready to use this simple API service module.\n\n```javascript\nimport API from './api';\n\n// GET http://example.com/user/me\nAPI.user.fetch('me').then(({ data }) =\u003e {\n    // data is the user attributes.\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femileber%2Faxios-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femileber%2Faxios-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femileber%2Faxios-resource/lists"}