{"id":42177405,"url":"https://github.com/roma-marshall/vue3-api-pinia","last_synced_at":"2026-01-26T21:55:05.935Z","repository":{"id":244937781,"uuid":"816740929","full_name":"roma-marshall/vue3-api-pinia","owner":"roma-marshall","description":"The open source project example using the technology stack: Vue3, REST API + Pinia store","archived":false,"fork":false,"pushed_at":"2024-09-30T10:28:47.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T01:39:07.593Z","etag":null,"topics":["pinia","rest-api","tailwindcss","vue3"],"latest_commit_sha":null,"homepage":"https://vue3-api-pinia.vercel.app","language":"Vue","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/roma-marshall.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-18T10:10:45.000Z","updated_at":"2024-09-30T10:28:50.000Z","dependencies_parsed_at":"2024-06-18T13:19:52.713Z","dependency_job_id":null,"html_url":"https://github.com/roma-marshall/vue3-api-pinia","commit_stats":null,"previous_names":["roma-marshall/json-api-pinia"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roma-marshall/vue3-api-pinia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-marshall%2Fvue3-api-pinia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-marshall%2Fvue3-api-pinia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-marshall%2Fvue3-api-pinia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-marshall%2Fvue3-api-pinia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roma-marshall","download_url":"https://codeload.github.com/roma-marshall/vue3-api-pinia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roma-marshall%2Fvue3-api-pinia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28789374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"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":["pinia","rest-api","tailwindcss","vue3"],"created_at":"2026-01-26T21:55:05.286Z","updated_at":"2026-01-26T21:55:05.923Z","avatar_url":"https://github.com/roma-marshall.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mock REST API Service\n\nTechnology Stack used: Vue3, REST API and Pinia.\n\n## Code snippets\n\n1. Define Pinia in `store/pinia.js` and init the `data: {}` object\n\n```javascript\nimport { defineStore } from 'pinia'\n\nexport const piniaStore = defineStore('counter', {\n    state: () =\u003e ({\n        data: {}\n    })\n})\n```\n\n2. Fetch data from a REST API Endpoint and save it to Pinia store\n```javascript\nconst fetchData = async () =\u003e {\n    // fetch data from endpoint\n    const response = await fetch('https://jsonplaceholder.org/posts', {\n        method: 'GET',\n        headers: {\n            'Accept': 'application/json',\n            'Content-Type': 'application/json',\n        }\n    })\n\n    // write in pinia store\n    store.data = await response.json()\n    json.value = await store.data\n}\n```\n\n3. Method `fetchData()` callback after the component `App.vue` has been mounted\n```javascript\nonMounted(() =\u003e fetchData())\n```\n\n## Recommended Installation\n\n```\ngit clone https://github.com/roma-marshall/vue3-api-pinia\ncd vue3-api-pinia\nnpm run dev\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-marshall%2Fvue3-api-pinia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froma-marshall%2Fvue3-api-pinia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froma-marshall%2Fvue3-api-pinia/lists"}