{"id":24581377,"url":"https://github.com/andydune/currencyratecbr","last_synced_at":"2025-07-04T21:07:24.862Z","repository":{"id":56948174,"uuid":"137323648","full_name":"AndyDune/CurrencyRateCbr","owner":"AndyDune","description":"Библиотека для получения и парсинга XML-данных о курсах валют Центрального банка РФ.","archived":false,"fork":false,"pushed_at":"2018-08-15T08:41:52.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T03:03:33.108Z","etag":null,"topics":["cbr","currency-rates","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/AndyDune.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":"2018-06-14T07:40:16.000Z","updated_at":"2018-08-15T08:41:53.000Z","dependencies_parsed_at":"2022-08-21T07:20:30.496Z","dependency_job_id":null,"html_url":"https://github.com/AndyDune/CurrencyRateCbr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/AndyDune/CurrencyRateCbr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyDune%2FCurrencyRateCbr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyDune%2FCurrencyRateCbr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyDune%2FCurrencyRateCbr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyDune%2FCurrencyRateCbr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndyDune","download_url":"https://codeload.github.com/AndyDune/CurrencyRateCbr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyDune%2FCurrencyRateCbr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263619804,"owners_count":23489562,"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":["cbr","currency-rates","php"],"created_at":"2025-01-24T02:56:16.654Z","updated_at":"2025-07-04T21:07:24.845Z","avatar_url":"https://github.com/AndyDune.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Курсы валют ЦБ России\n\n[![Build Status](https://travis-ci.org/AndyDune/CurrencyRateCbr.svg?branch=master)](https://travis-ci.org/AndyDune/CurrencyRateCbr)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Packagist Version](https://img.shields.io/packagist/v/andydune/currency-rate-cbr.svg?style=flat-square)](https://packagist.org/packages/andydune/currency-rate-cbr)\n[![Total Downloads](https://img.shields.io/packagist/dt/andydune/currency-rate-cbr.svg?style=flat-square)](https://packagist.org/packages/andydune/currency-rate-cbr)\n\n\nБиблиотека для получения и парсинга XML-данных о курсах валют.\n\nИсточник данных: [Получение данных, используя XML](http://www.cbr.ru/development/SXML/)\n\n\nУставнока\n------------\n\nУставнока через композер:\n\n```\ncomposer require andydune/currency-rate-cbr\n```\nOr if composer was not installed globally:\n```\nphp composer.phar require andydune/currency-rate-cbr\n```\nOr edit your `composer.json`:\n```\n\"require\" : {\n     \"andydune/currency-rate-cbr\": \"^1\"\n}\n\n```\nЗапустить команду:\n```\nphp composer.phar update\n```\n\nИспользование\n--------------\n\n```php\nuse AndyDune\\CurrencyRateCbr\\DailyRate;\n\n$rate = new DailyRate();\n$rate-\u003esetDate(new \\DateTime()); // не обязательно - по умолчанию используется текущая дата \n$isOk = $rate-\u003eretrieve(); // true если данные успешно получены\n\n// Извлекаем курс доллара \n\n/** @var DailyRateItem $item */\n$item = $rate-\u003eget('usd'); // код валюты, регистр не важен\n\n$item-\u003egetDate(); // \\DateTime::class - объект даты\n$item-\u003egetCharCode(); // код валюты: USD\n$item-\u003egetValue(); // цена: 63,1394\n$item-\u003egetNominal(); // номинал: 1\n$item-\u003egetName(); // наименование: Доллар США\n$item-\u003egetValueId(); // ID валюты: R01235\n$item-\u003egetNumCode(); // числовой код: 208\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandydune%2Fcurrencyratecbr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandydune%2Fcurrencyratecbr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandydune%2Fcurrencyratecbr/lists"}