{"id":26358284,"url":"https://github.com/spoje-net/ipex-b2b","last_synced_at":"2025-03-16T14:27:36.191Z","repository":{"id":25537889,"uuid":"104277841","full_name":"Spoje-NET/ipex-b2b","owner":"Spoje-NET","description":"PHP Library for interaction with restapi.ipex.cz","archived":false,"fork":false,"pushed_at":"2025-01-13T18:39:41.000Z","size":157,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T23:29:30.694Z","etag":null,"topics":["debian","easephp","ipex","php-library","rest-client","voip-billing","voip-from-php"],"latest_commit_sha":null,"homepage":"https://restapi.ipex.cz/documentation","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Spoje-NET.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":"2017-09-20T23:26:51.000Z","updated_at":"2025-01-13T18:39:45.000Z","dependencies_parsed_at":"2024-12-23T00:17:25.755Z","dependency_job_id":"a6e4ae7b-2fd2-4acb-bc7c-0e22ac9536b2","html_url":"https://github.com/Spoje-NET/ipex-b2b","commit_stats":{"total_commits":58,"total_committers":2,"mean_commits":29.0,"dds":"0.051724137931034475","last_synced_commit":"801c2b0d10db1d6f687e7acd76572eea9ad42e4a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spoje-NET%2Fipex-b2b","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spoje-NET%2Fipex-b2b/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spoje-NET%2Fipex-b2b/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spoje-NET%2Fipex-b2b/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Spoje-NET","download_url":"https://codeload.github.com/Spoje-NET/ipex-b2b/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243881122,"owners_count":20362901,"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":["debian","easephp","ipex","php-library","rest-client","voip-billing","voip-from-php"],"created_at":"2025-03-16T14:27:35.642Z","updated_at":"2025-03-16T14:27:36.185Z","avatar_url":"https://github.com/Spoje-NET.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ipex-b2b\n![Ipex-b2b Logo](https://github.com/Spoje-NET/Ipex-b2b/raw/master/ipex-b2b-logo.png \"Project Logo\")\n\n\n\nCZ: PHP Knihovna pro snadnou práci s Rest API [IPEX B2B](https://restapi.ipex.cz/documentation)\n\n[![Source Code](http://img.shields.io/badge/source/Spoje-NET/ipex-b2b-blue.svg?style=flat-square)](https://github.com/Spoje-NET/ipex-b2b)\n[![Latest Version](https://img.shields.io/github/release/Spoje-NET/ipex-b2b.svg?style=flat-square)](https://github.com/Spoje-NET/ipex-b2b/releases)\n[![Software License](https://img.shields.io/badge/license-GNU-brightgreen.svg?style=flat-square)](https://github.com/Spoje-NET/ipex-b2b/blob/master/LICENSE)\n[![Total Downloads](https://img.shields.io/packagist/dt/spoje.net/ipex-b2b.svg?style=flat-square)](https://packagist.org/packages/spoje.net/ipex-b2b)\n[![Latest stable](https://img.shields.io/packagist/v/spoje.net/ipex-b2b.svg?style=flat-square)](https://packagist.org/packages/spoje.net/ipex-b2b)\n\n# Poděkování \nVznik této knihovny by nebyl možný bez laskavé podpory společnosti [Spoje.Net](http://www.spoje.net), \nkterá hradila vývoj řešení pro navýšení kreditu na VoIP služby. :+1:\n\n![Spoje.Net](https://github.com/Spoje-NET/Ipex-b2b/raw/master/spoje-net_logo.gif \"Spoje.Net\")\n\nU společnosti Spoje.Net, je možné si objednat komerční podporu pro integraci\nknihovny do vašich projektů.\n\nInstalace\n---------\n\n    composer require spojenet/ipexb2b\n\nKonfigurace\n-----------\n\nKonfigurace se provádí nastavením následujících konstant:\n\n```php\n/**\n * Write logs as:\n */\ndefine('LOG_NAME', 'IPEXB2B_Test');\ndefine('LOG_TYPE', 'syslog');\n\n/*\n * URL ipex-b2b API\n */\ndefine('IPEX_URL', 'https://restapi.ipex.cz');\n/*\n * Uživatel ipex-b2b API\n */\ndefine('IPEX_LOGIN', 'firma_api');\n/*\n * Heslo ipex-b2b API\n */\ndefine('IPEX_PASSWORD', 'Ceeghul');\n\n```\n\nnebo je možné přihlašovací údaje zadávat při vytváření instance třídy.\n\n```php\n    $pravnik = new \\IPEXB2B\\Rights(null,[\n                'url' =\u003e 'https://testapi.ipex.cz',\n                'user' =\u003e 'resttest',\n                'password' =\u003e '-dj3x21xaA_'\n            ]);\n```\n\nTento způsob nastavení má vyšší prioritu než výše uvedené definovaní konstant.\n\nJak to celé funguje ?\n---------------------\n\nÚstřední komponentou celé knihovny je Třída ApiClient, která je schopna pomocí \nPHP rozšíření curl komunikovat s REST Api IPEX.\n\nZ ní jsou pak odvozeny třídy pro jednotlivé sekce, obsahující metody pro \nčasto používané operace, například \"Navyš kredit\" v případě VoIP.\n\nNová odvozená třída vzniká tak že jméno třídy je název sekce.\n\nTzn. Pokud chceme odvodit \nnovou třídu pro sekci \"simcards\" bude vypadat takto:\n\n```php\n    \u003c?php\n    class Simcards extends /IPEXB2B/ApiClient\n    {\n        /**\n         * Evidence užitá objektem.\n         *\n         * @var string\n         */\n        public $evidence = 'merna-jednotka';\n    }\n```\n\nA poté je již snadné si simkarty na 2 řádky vypsat:\n    \n```php\n    $jednotky = new Simcards();\n    print_r( $jednotky-\u003erequestData() );\n```\n\nDocker\n------\n\n    docker pull vitexsoftware/ipex-b2b\n\nDebian/Ubuntu\n-------------\n\nPro Linux jsou k dispozici .deb balíčky. Prosím použijte repo:\n\n\n```shell\nsudo apt install lsb-release wget apt-transport-https bzip2\n\nsudo wget -O /usr/share/keyrings/vitexsoftware.gpg https://repo.vitexsoftware.cz/keyring.gpg\necho \"deb [signed-by=/usr/share/keyrings/vitexsoftware.gpg]  https://repo.vitexsoftware.cz  $(lsb_release -sc) main\" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list\nsudo apt update\n\nsudo apt install php-spojenet-ipex-b2b\n```\n\n\nV tomto případě je potřeba do souboru composer.json vaší aplikace přidat:\n\n```json\n    \"require\": {\n        \"deb/ipex-b2b\": \"*\",\n        \"deb/ease-core\": \"*\"\n    },\n    \"repositories\": [\n        {\n            \"type\": \"path\",\n            \"url\": \"/usr/share/php/IPEXB2B\",\n            \"options\": {\n                \"symlink\": true\n            }\n        },\n        {\n            \"type\": \"path\",\n            \"url\": \"/usr/share/php/EaseCore\",\n            \"options\": {\n                \"symlink\": true\n            }\n        }\n    ]\n```\n\nTakže při instalaci závislostí bude vypadat nějak takto:\n\n    Loading composer repositories with package information\n    Installing dependencies from lock file\n      - Installing deb/ease-framework (1.24)\n        Symlinked from /usr/share/php/Ease\n\n      - Installing deb/ipex-b2b (0.2.1)\n        Symlinked from /usr/share/php/IPEXB2B\n\nA aktualizaci bude možné dělat globálně pro celý systém prostřednictvím apt-get.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoje-net%2Fipex-b2b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoje-net%2Fipex-b2b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoje-net%2Fipex-b2b/lists"}