{"id":13611862,"url":"https://github.com/bobbylkchao/bison-local-data-offline-proxy","last_synced_at":"2025-04-13T05:33:44.287Z","repository":{"id":217071045,"uuid":"416986138","full_name":"bobbylkchao/bison-local-data-offline-proxy","owner":"bobbylkchao","description":"This opensource project is the local data request proxy. Written by TypeScript, is used to implement offline browsing of the app. The data proxy will be responsible for data request, creation, destruction and expiration detection. We only need to define the data model and leave the rest to the proxy!","archived":false,"fork":false,"pushed_at":"2021-10-14T23:40:18.000Z","size":679,"stargazers_count":11,"open_issues_count":0,"forks_count":39,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-07T18:49:16.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bobbylkchao.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":"2021-10-14T04:18:31.000Z","updated_at":"2023-12-21T18:22:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"07f469d2-9249-439a-bf86-06bad84a8ce1","html_url":"https://github.com/bobbylkchao/bison-local-data-offline-proxy","commit_stats":null,"previous_names":["bobbylkchao/bison-local-data-offline-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbylkchao%2Fbison-local-data-offline-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbylkchao%2Fbison-local-data-offline-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbylkchao%2Fbison-local-data-offline-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bobbylkchao%2Fbison-local-data-offline-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bobbylkchao","download_url":"https://codeload.github.com/bobbylkchao/bison-local-data-offline-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670514,"owners_count":21142896,"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":[],"created_at":"2024-08-01T19:02:15.624Z","updated_at":"2025-04-13T05:33:43.928Z","avatar_url":"https://github.com/bobbylkchao.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# bison-local-data-offline-proxy\nThis opensource project is the local data request proxy.\n\nWritten by TypeScript, is used to implement offline browsing of the app.\n\nThe data proxy will be responsible for data request, creation, destruction and expiration detection.\n\nWe only need to define the data model and leave the rest to the proxy! Even without network!\n\n**\u003e\u003e\u003e Currently based on Expo \u003c\u003c\u003c**\n\n## Author\n\nBobby Chao\n\nbobbylkchao@gmail.com\n\nhttps://www.linkedin.com/in/bobbylkchao/\n\n## Integration diagram\n\n![ScreenShot](https://raw.githubusercontent.com/bobbylkchao/bison-local-data-offline-proxy/main/README/1.png)\n\n## How it works?\n\n![ScreenShot](https://raw.githubusercontent.com/bobbylkchao/bison-local-data-offline-proxy/main/README/2.png)\n\n## Install Steps\n\n1. git clone https://github.com/bobbylkchao/bison-local-data-offline-proxy.git\n2. cd bison-local-data-offline-proxy/src\n3. npm i\n4. Configure the data model in model.config.js\n5. In your code, use `import { proxyGetFullData, proxyGetIncrementalData, proxyGetMoreData, proxyCheckDataExpired } from \"proxy\"`\n\n## Core methods introduction\n\nproxyGetFullData(): Get full data\n\nproxyGetIncrementalData()(): Get incremental data\n\nproxyGetMoreData(): Get more data\n\nproxyCheckDataExpired(): Check data expired status\n\n## How to use core methods?\n\nPlease read interface [interfaces.ts](https://github.com/bobbylkchao/bison-local-data-offline-proxy/blob/main/src/interfaces.ts), there are code comments on the interface.\n\n## Usage Example\n\n```\nconst checkLocalDataExpiredStatus = await proxyCheckDataExpired('weatherandrating');\nlet paramByPass;\nif(checkLocalDataExpiredStatus){\n  // Local data has expired\n  paramByPass = true;\n}else{\n  // Local data has not expired\n  paramByPass = false;\n}\n\nproxyGetFullData({\n  tableName: 'weatherandrating',\n  bypass: paramByPass,\n}, (r:any) =\u003e {\n  const response = r.message;\n  const exchangeRate = response.message.exchange;\n  const weather = response.message.weather;\n  // ... \n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobbylkchao%2Fbison-local-data-offline-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbobbylkchao%2Fbison-local-data-offline-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbobbylkchao%2Fbison-local-data-offline-proxy/lists"}