{"id":20116452,"url":"https://github.com/frankwallis/jrpc2-proxy","last_synced_at":"2025-03-02T19:23:00.446Z","repository":{"id":57282772,"uuid":"42378946","full_name":"frankwallis/jrpc2-proxy","owner":"frankwallis","description":"Auto-generate client-side proxy objects and functions for jrpc2","archived":false,"fork":false,"pushed_at":"2015-09-13T09:40:54.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T01:03:52.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/frankwallis.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}},"created_at":"2015-09-13T01:05:44.000Z","updated_at":"2015-09-28T19:51:53.000Z","dependencies_parsed_at":"2022-09-19T23:10:40.625Z","dependency_job_id":null,"html_url":"https://github.com/frankwallis/jrpc2-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fjrpc2-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fjrpc2-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fjrpc2-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankwallis%2Fjrpc2-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankwallis","download_url":"https://codeload.github.com/frankwallis/jrpc2-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241558428,"owners_count":19982078,"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-11-13T18:40:46.851Z","updated_at":"2025-03-02T19:23:00.421Z","avatar_url":"https://github.com/frankwallis.png","language":"JavaScript","readme":"# jrpc2-proxy\n\nAuto-generate client-side proxy objects and functions for [jrpc2](https://github.com/Santinell/jrpc2)\n\n[![build status](https://secure.travis-ci.org/frankwallis/jrpc2-proxy.png?branch=master)](http://travis-ci.org/frankwallis/jrpc2-proxy)\n\n## Examples\n\n### Services\n\n```\n\tvar rpc = require('jrpc2');\n\tvar proxy = require(\"jrpc2-proxy\");\n\tvar AjaxTransport = require(\"jrpc2-ajax\");\n\t\n\tvar transport = new AjaxTransport({path: \"/api/\"});\n\tvar client = new rpc.Client(transport);\n\tvar userService = proxy.createService(client, [\"fetchUsers\", \"getUser\"]);\n\n\tuserService.fetchUsers()\n\t\t.then(...);\n\n\tuserService.fetchUsers(function(err, users) {\n\t\t\t...\n\t\t});\n\n\tuserService.getUser(id)\n\t\t.then(...)\n\n\tuserService.getUser(id, function(err, user) {\n\t\t\t...\n\t\t})\n```\n\n\n### Functions\n\n```\n\tvar loadPosts = proxy.createFunction(client, \"loadPosts\");\n\tloadPosts(queryParams).then(...etc);\n```\n\n## TODO\n\n- Support ES6 proxies\n- Create proxy from remote schema\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankwallis%2Fjrpc2-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankwallis%2Fjrpc2-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankwallis%2Fjrpc2-proxy/lists"}