{"id":13937897,"url":"https://github.com/davestewart/axios-actions","last_synced_at":"2025-04-07T08:17:35.973Z","repository":{"id":32732873,"uuid":"140268692","full_name":"davestewart/axios-actions","owner":"davestewart","description":"Bundle endpoints as callable, reusable services","archived":false,"fork":false,"pushed_at":"2023-01-04T08:17:18.000Z","size":2202,"stargazers_count":187,"open_issues_count":46,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T07:05:03.791Z","etag":null,"topics":["api","endpoints","rest"],"latest_commit_sha":null,"homepage":"https://axios-actions.netlify.com","language":"TypeScript","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/davestewart.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-07-09T10:18:06.000Z","updated_at":"2024-11-29T09:00:03.000Z","dependencies_parsed_at":"2023-01-14T22:15:34.268Z","dependency_job_id":null,"html_url":"https://github.com/davestewart/axios-actions","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Faxios-actions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Faxios-actions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Faxios-actions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Faxios-actions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davestewart","download_url":"https://codeload.github.com/davestewart/axios-actions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615383,"owners_count":20967184,"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":["api","endpoints","rest"],"created_at":"2024-08-07T23:04:01.780Z","updated_at":"2025-04-07T08:17:35.946Z","avatar_url":"https://github.com/davestewart.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Axios Actions\n\n\u003e Bundle endpoints as callable, reusable services\n\n\u003cp align=\"center\"\u003e\u003ca href=\"#\"\u003e\u003cimg src=\"res/logo-text.png\" width=\"80%\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\n## Abstract\n\nAxios Actions comprises a small set of classes which collate URLs or URL request configs as callable actions.\n\nFirst, [define](docs/config.md) your endpoints:\n\n```js\nconst actions = {\n  \u003caction\u003e: '\u003curl\u003e',\n  \u003caction\u003e: '\u003cconfig\u003e',\n  ...\n}\n```\n\nThen, encapsulate them as one of the built-in [services](docs/classes/README.md):\n\n```js\nconst service = new \u003cApiClass\u003e(axios, actions)\n```\n\nFinally, [call](docs/classes/ApiGroup.md#usage) them:\n\n```js\nservice\n  .\u003caction\u003e(\u003cdata\u003e)\n  .then(\u003chandler\u003e)\n```\n\nThis service-based approach:\n\n- removes brittle configuration from components and stores\n- encapsulates additional logic (such as load state and handlers) within the service\n- ensures application code stays simple and semantic\n- provides a dedicated layer for API interaction\n\nThere are lots of [other goodies](docs/tips.md) in the library which take the drudgery out of working with APIs!\n\n## Documentation\n\nStart reading:\n\n- [Quick start](docs/quick-start.md)\n- [Full docs](docs/README.md)\n\n## Next steps\n\nDemos:\n\n- [axios-actions/demo](demo)\n\n\nInstallation:\n\n```bash\nnpm i -S axios-actions\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavestewart%2Faxios-actions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavestewart%2Faxios-actions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavestewart%2Faxios-actions/lists"}