{"id":15282383,"url":"https://github.com/raoptimus/yii2-jsonrpc2","last_synced_at":"2025-04-12T22:55:02.240Z","repository":{"id":62533218,"uuid":"151673889","full_name":"raoptimus/yii2-jsonrpc2","owner":"raoptimus","description":"Json RPC client 1.0 and 2.0 versions for Yii2","archived":false,"fork":false,"pushed_at":"2018-10-13T14:42:14.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T22:55:00.278Z","etag":null,"topics":["json-rpc-client","json-rpc2-client","jsonrpc","jsonrpc2","php","yii2","yii2-extension","yii2-jsonrpc","yii2-jsonrpc2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raoptimus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-05T05:18:24.000Z","updated_at":"2023-07-27T05:48:23.000Z","dependencies_parsed_at":"2022-11-02T15:00:52.833Z","dependency_job_id":null,"html_url":"https://github.com/raoptimus/yii2-jsonrpc2","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/raoptimus%2Fyii2-jsonrpc2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoptimus%2Fyii2-jsonrpc2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoptimus%2Fyii2-jsonrpc2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raoptimus%2Fyii2-jsonrpc2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raoptimus","download_url":"https://codeload.github.com/raoptimus/yii2-jsonrpc2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643048,"owners_count":21138353,"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":["json-rpc-client","json-rpc2-client","jsonrpc","jsonrpc2","php","yii2","yii2-extension","yii2-jsonrpc","yii2-jsonrpc2"],"created_at":"2024-09-30T14:25:31.739Z","updated_at":"2025-04-12T22:55:02.210Z","avatar_url":"https://github.com/raoptimus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Stable Version](https://poser.pugx.org/raoptimus/yii2-jsonrpc2/v/stable)](https://packagist.org/packages/raoptimus/yii2-jsonrpc2)\n[![Untable Version](https://poser.pugx.org/raoptimus/yii2-jsonrpc2/v/unstable)](https://packagist.org/packages/raoptimus/yii2-jsonrpc2)\n[![License](https://poser.pugx.org/raoptimus/yii2-jsonrpc2/license)](https://packagist.org/packages/raoptimus/yii2-jsonrpc2)\n[![Total Downloads](https://poser.pugx.org/raoptimus/yii2-jsonrpc2/downloads)](https://packagist.org/packages/raoptimus/yii2-jsonrpc2)\n[![Build Status](https://travis-ci.com/raoptimus/yii2-jsonrpc2.svg?branch=master)](https://travis-ci.com/raoptimus/yii2-jsonrpc2)\n\n# yii2-jsonrpc2\nJson RPC client 1.0 and 2.0 versions for Yii2\n\n## Installation\n\nInstall with composer:\n\n```bash\ncomposer require raoptimus/yii2-jsonrpc2\n```\n\n## Usage samples\n\nConfiguration\n\n```php\nreturn [\n    //....\n    'components' =\u003e \n        'jsonrpc' =\u003e [\n            'class' =\u003e raoptimus\\jsonrpc2\\Connection::class,\n            'hostname' =\u003e 'localhost',\n            'port' =\u003e 8666,\n        ],\n];\n```\n\n```php\nreturn [\n    //....\n    'components' =\u003e \n        'jsonrpc' =\u003e [\n            'class' =\u003e raoptimus\\jsonrpc2\\Connection::class,\n            'unixSocket' =\u003e '/tmp/jsonrpc2.sock',\n            'spec' =\u003e raoptimus\\jsonrpc2\\Connection::SPEC_2_0,\n        ],\n];\n```\n\nUse connection\n\n```php\n$rpc = \\Yii::$app-\u003eget('jsonrpc');\n$method = \"SomeMethodName\";\n$param = \"SomeEnterParam\";\n$request = $rpc-\u003ecreateRequest($method, [$param]);\n$rpc-\u003esendRequest($request);\n$result = $rpc-\u003ereadResponse()-\u003eresult;\n//or\n$result = $rpc-\u003e$method($param);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraoptimus%2Fyii2-jsonrpc2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraoptimus%2Fyii2-jsonrpc2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraoptimus%2Fyii2-jsonrpc2/lists"}