Repository: ivknv/yadisk Branch: master Commit: dec9f27eeb09 Files: 172 Total size: 2.3 MB Directory structure: gitextract_wzpapcjd/ ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report--english-.md │ │ ├── bug-report--русский-.md │ │ ├── feature-request--english-.md │ │ ├── feature-request--русский-.md │ │ ├── question--english-.md │ │ └── question--русский-.md │ └── workflows/ │ └── lint_and_test.yml ├── .gitignore ├── .readthedocs.yaml ├── CONTRIBUTING.rst ├── CONTRIBUTORS.rst ├── COPYING ├── COPYING.lesser ├── MANIFEST.in ├── README.en.rst ├── README.rst ├── README.ru.rst ├── docs/ │ ├── Makefile │ ├── api_reference/ │ │ ├── async_api.rst │ │ ├── exceptions.rst │ │ ├── index.rst │ │ ├── response_objects.rst │ │ ├── session_interface.rst │ │ ├── sessions.rst │ │ ├── settings.rst │ │ ├── sync_api.rst │ │ ├── types.rst │ │ └── utilities.rst │ ├── changelog.rst │ ├── conf.py │ ├── index.rst │ ├── intro.rst │ ├── known_issues.rst │ ├── locales/ │ │ └── ru/ │ │ └── LC_MESSAGES/ │ │ ├── api_reference.po │ │ ├── changelog.po │ │ ├── index.po │ │ ├── intro.po │ │ ├── known_issues.po │ │ └── migration_guide.po │ ├── make.bat │ ├── migration_guide.rst │ ├── requirements.in │ └── requirements.txt ├── pyproject.toml ├── requirements-dev.in ├── requirements-dev.txt ├── src/ │ └── yadisk/ │ ├── __init__.py │ ├── _api/ │ │ ├── __init__.py │ │ ├── api_request.py │ │ ├── auth.py │ │ ├── disk.py │ │ ├── operations.py │ │ └── resources.py │ ├── _async_client.py │ ├── _async_client.pyi │ ├── _async_session.py │ ├── _client.py │ ├── _client.pyi │ ├── _client_common.py │ ├── _common.py │ ├── _import_session.py │ ├── _session.py │ ├── _typing_compat.py │ ├── exceptions.py │ ├── objects/ │ │ ├── __init__.py │ │ ├── _auth.py │ │ ├── _disk.py │ │ ├── _error_object.py │ │ ├── _link_object.py │ │ ├── _operations.py │ │ ├── _operations.pyi │ │ ├── _resources.py │ │ ├── _resources.pyi │ │ └── _yadisk_object.py │ ├── py.typed │ ├── sessions/ │ │ ├── __init__.py │ │ ├── _httpx_common.py │ │ ├── aiohttp_session.py │ │ ├── async_httpx_session.py │ │ ├── httpx_session.py │ │ ├── pycurl_session.py │ │ └── requests_session.py │ ├── settings.py │ ├── types.py │ └── utils.py └── tests/ ├── __init__.py ├── async_client_test.py ├── auth_test.py ├── auto_retry_test.py ├── client_test.py ├── conftest.py ├── disk_gateway.py ├── import_session_test.py ├── recorded/ │ ├── async/ │ │ ├── test_auth_async.json │ │ ├── test_check_token.json │ │ ├── test_copy.json │ │ ├── test_device_code_auth_async.json │ │ ├── test_download_by_link_error.json │ │ ├── test_get_disk_info.json │ │ ├── test_get_files.json │ │ ├── test_get_last_uploaded.json │ │ ├── test_get_meta.json │ │ ├── test_get_public_resources.json │ │ ├── test_get_upload_link_object.json │ │ ├── test_is_file.json │ │ ├── test_issue7.json │ │ ├── test_listdir.json │ │ ├── test_listdir_fields.json │ │ ├── test_listdir_on_file.json │ │ ├── test_listdir_with_limits.json │ │ ├── test_listdir_with_max_items.json │ │ ├── test_makedirs_with_scheme.json │ │ ├── test_makedirs_without_scheme.json │ │ ├── test_mkdir_and_exists.json │ │ ├── test_move.json │ │ ├── test_none_args.json │ │ ├── test_operation_error_triggers_retry.json │ │ ├── test_patch.json │ │ ├── test_permanent_remove.json │ │ ├── test_public_listdir.json │ │ ├── test_public_settings.json │ │ ├── test_publish_unpublish.json │ │ ├── test_remove_trash.json │ │ ├── test_rename.json │ │ ├── test_restore_trash.json │ │ ├── test_save_to_disk.json │ │ ├── test_streaming_requests.json │ │ ├── test_upload_and_download.json │ │ ├── test_upload_and_download_async.json │ │ ├── test_upload_download_non_seekable.json │ │ ├── test_upload_url.json │ │ └── test_wait_for_operation.json │ └── sync/ │ ├── test_auth.json │ ├── test_check_token.json │ ├── test_copy.json │ ├── test_device_code_auth.json │ ├── test_download_by_link_error.json │ ├── test_get_disk_info.json │ ├── test_get_files.json │ ├── test_get_last_uploaded.json │ ├── test_get_meta.json │ ├── test_get_public_resources.json │ ├── test_get_upload_link_object.json │ ├── test_issue7.json │ ├── test_listdir.json │ ├── test_listdir_fields.json │ ├── test_listdir_on_file.json │ ├── test_listdir_with_limits.json │ ├── test_listdir_with_max_items.json │ ├── test_makedirs_with_scheme.json │ ├── test_makedirs_without_scheme.json │ ├── test_mkdir_and_exists.json │ ├── test_move.json │ ├── test_none_args.json │ ├── test_operation_error_triggers_retry.json │ ├── test_patch.json │ ├── test_permanent_remove.json │ ├── test_public_listdir.json │ ├── test_public_settings.json │ ├── test_publish_unpublish.json │ ├── test_remove_trash.json │ ├── test_rename.json │ ├── test_restore_trash.json │ ├── test_save_to_disk.json │ ├── test_streaming_requests.json │ ├── test_upload_and_download.json │ ├── test_upload_download_non_seekable.json │ ├── test_upload_generator.json │ ├── test_upload_url.json │ └── test_wait_for_operation.json └── test_session.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ *.json binary ================================================ FILE: .github/ISSUE_TEMPLATE/bug-report--english-.md ================================================ --- name: Bug report (English) about: Create a report to help improve the library title: "[Bug] " labels: bug, language-english assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior (preferably, an example code snippet). **Expected behavior** A clear and concise description of what you expected to happen. **System Info (please complete the following information):** - OS: [e.g. Windows, Linux, Mac OS] - `yadisk` version: [e.g. 2.0.0] - Python version: [e.g. 3.12.1] **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/bug-report--русский-.md ================================================ --- name: Bug report (Русский) about: Создать баг репорт, чтобы помочь улучшить библиотеку title: "[Bug] <название issue>" labels: bug, language-russian assignees: '' --- **Опишите баг** Четкое и краткое описание бага. **Действия по воспроизведению бага** Действия по воспроизведению: (например, пример кода или просто описание). **Ожидаемое поведение** Четкое и краткое описание ожидаемого поведения. **Информация о вашей системе (заполните следующую информацию):** - ОС: [например, Windows, Linux, Mac OS] - Версия библиотеки `yadisk`: [например, 2.0.0] - Версия Python: [например, 3.12.1] **Дополнительая информация** Здесь может быть любая дополнительная информация о проблеме. ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request--english-.md ================================================ --- name: Feature request (English) about: Suggest an idea for this project title: "[Feature Request] " labels: enhancement, language-english assignees: '' --- **Describe why you want this feature** A clear and concise description of what the problem is. **Describe the solution you'd like** A clear and concise description of what you want to happen. **Additional context** Add any other context about the feature request here. ================================================ FILE: .github/ISSUE_TEMPLATE/feature-request--русский-.md ================================================ --- name: Feature request (Русский) about: Предложить идею title: "[Feature Request] <название issue>" labels: enhancement, language-russian assignees: '' --- **Опишите проблему** Четкое и краткое описание проблемы, которую вы предлагаете решить. **Опишите ваше решение** Четкое и краткое описание вашего решения. **Дополнительная информация** Здесь может быть любая другая дополнительная информация. ================================================ FILE: .github/ISSUE_TEMPLATE/question--english-.md ================================================ --- name: Question (English) about: Ask a question title: "[Question] " labels: language-english, question assignees: '' --- **Short description of your question** Your question in detail. ================================================ FILE: .github/ISSUE_TEMPLATE/question--русский-.md ================================================ --- name: Question (Русский) about: Задать вопрос title: "[Question] <название issue>" labels: language-russian, question assignees: '' --- **Краткое описание вашего вопроса** Подробное содержание вопроса. ================================================ FILE: .github/workflows/lint_and_test.yml ================================================ name: Perform linting and run tests permissions: contents: read on: push: branches: - master - dev pull_request: branches: - master - dev jobs: build: strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt - name: Lint with ruff run: ruff check - name: Lint with mypy run: mypy - name: Build the package run: python -m build - name: Install the built wheel shell: bash run: | # Use the wheel to prevent broken releases, instead of the editable install pip uninstall -y yadisk pip install dist/yadisk-*.whl - name: Run pre-recored tests shell: bash env: PYTHON_YADISK_APP_ID: ${{ vars.PYTHON_YADISK_APP_ID }} PYTHON_YADISK_APP_SECRET: ${{ secrets.PYTHON_YADISK_APP_SECRET }} PYTHON_YADISK_APP_TOKEN: ${{ secrets.PYTHON_YADISK_APP_TOKEN }} PYTHON_YADISK_TEST_ROOT: ${{ vars.PYTHON_YADISK_TEST_ROOT }} PYTHON_YADISK_GATEWAY_HOST: ${{ vars.PYTHON_YADISK_GATEWAY_HOST }} PYTHON_YADISK_GATEWAY_PORT: ${{ vars.PYTHON_YADISK_GATEWAY_PORT }} PYTHON_YADISK_REPLAY_ENABLED: 1 run: | if [[ "${{ matrix.os }}" == "windows-latest" ]]; then # running with --cov fails on Windows in CI pytest -v --log-cli-level=WARNING tests else source_path=$(python -c 'import importlib.util, os; print(os.path.dirname(importlib.util.find_spec("yadisk").origin))') pytest --cov="$source_path" -v --log-cli-level=WARNING tests fi - name: Upload coverage env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: | if [[ "${{ matrix.os }}" == "ubuntu-latest" ]] && [[ "${{ matrix.python-version }}" == "3.14" ]]; then pip install coveralls coveralls fi ================================================ FILE: .gitignore ================================================ .*.sw[a-z] *.py[co] dist/ build/ yadisk.egg-info/ docs/_build .venv/ pyrightconfig.json .vim/ .coverage .tool-versions *.mo ================================================ FILE: .readthedocs.yaml ================================================ # .readthedocs.yaml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-22.04 tools: python: "3.11" apt_packages: - libssl-dev - libcurl4-openssl-dev - python3-dev # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # Optionally declare the Python requirements required to build your docs python: install: - requirements: docs/requirements.txt ================================================ FILE: CONTRIBUTING.rst ================================================ Contributing ============ .. contents:: Table of contents: Bug reports, feedback, questions, feature requests, etc. ******************************************************** If you've found a bug, have some questions, a feature request, or some other form of feedback, feel free to `open an issue `_, use the appropriate template. Issues are accepted in 2 languages: English or Russian, whichever is more comfortable. Pull requests ************* Pull requests are also welcome, however, be prepared to have your PR rejected, since some changes might not be appropriate for this project. If you would like to contribute a PR, keep the following in mind: #. This is a general-purpose API client library meant for developers, not an end-user tool #. The main goal of this library is to provide simple, convenient and reliable access to the Yandex.Disk's REST API, mostly mirroring it #. Reliability and correctness are valued above API convenience #. Some changes may seem useful but may also end up inadvertently creating edge cases, making the feature unreliable or complicated to use safely. See if that's the case for your PR. #. Tests are appreciated but not necessary for the initial PR, they can be added later by this repository's maintainer #. There is quite a lot of code duplication, mostly due to implementation of both sync/async interfaces, beware of that If you're unsure if your PR can make it into the repository, consider opening an issue instead. Here are some PR examples that are likely to be merged: * Bug fixes * New/enhanced tests (that cover something that isn't adequately tested at the moment) * Documentation (e.g, added examples, corrections, additional REST API insight) * Support for an HTTP library (see Sessions and Session Interface in the documentation) Pull request workflow --------------------- The pull request workflow looks as follows: #. Fork the repository #. Create a new branch with a unique name, specific to your PR, use the :code:`dev` branch as the starting point #. Run linting tools #. Run tests #. If everything is good, commit changes #. Push to your forked repository #. Submit a pull request, set :code:`dev` as the destination branch Branch structure **************** The :code:`master` branch is used for stable releases, while the :code:`dev` branch is used for work in progress. All changes have to go through the :code:`dev` branch before being merged into :code:`master`. Setting up the development environment ************************************** Assuming you already have the appropriate Python version installed, first, setup the virtualenv: .. code:: bash # Optional: use .venv/$PYTHON_VERSION to manage venvs for multiple Python versions python3 -m venv .venv After setting up the virtualenv you can activate it and install all the development dependencies and tools: .. code:: bash # Enter the created virtual environment source .venv/bin/activate # Now install development dependencies and tools, including the tools needed # to build the documentation pip install -r requirements-dev.txt Linting ******* Before committing changes run linting tools and fix reported errors: .. code:: bash ruff check mypy Both :code:`ruff` and :code:`mypy` are configured in :code:`pyproject.toml`. Testing ******* Traffic recording / traffic replay ---------------------------------- Testing the API client has several challenges: * Sometimes the servers may be unavailable or simply malfunction * Sending requests takes a very long time * It is possible to hit a quota for certain functions in the process * Have to use a real user account * Cloud storage is persistent, so it has to be repeatedly cleaned up * There is a risk of data loss due to bugs or misconfiguration This makes it unsuitable for continuous integration. However, we can record real traffic and then replay it in tests to solve all of the above problems at once. An **API gateway** is used for this purpose. It's a simple HTTP server (see :code:`tests/disk_gateway.py`), that can either **relay** all the requests to the actual Yandex.Disk servers while **recording** them to a JSON file, or **replay** them from a recorded JSON file without actually sending them anywhere. Of course, it is still necessary to occasionally re-record them, since the actual API behavior may change over time. Configuration ------------- In order to run most tests you need to configure a set of environment variables: .. code:: bash export PYTHON_YADISK_APP_ID='' export PYTHON_YADISK_APP_SECRET='' export PYTHON_YADISK_APP_TOKEN='' export PYTHON_YADISK_TEST_ROOT='' export PYTHON_YADISK_REPLAY_ENABLED='<0 or 1 (default), 0 disables traffic replay, 1 enables it>' export PYTHON_YADISK_RECORDING_ENABLED='<0 (default) or 1, 1 enables traffic recording, 0 disables it>' export PYTHON_YADISK_GATEWAY_HOST='<127.0.0.1 by default, host for the test API gateway>' export PYTHON_YADISK_GATEWAY_PORT='<8080 by default, port for the test API gateway>' .. note:: Be very careful with the location of :code:`PYTHON_YADISK_TEST_ROOT`. Specifing the wrong directory may lead to **permanent loss of data in that folder**. .. note:: :code:`PYTHON_YADISK_APP_ID` and :code:`PYTHON_YADISK_APP_SECRET` are only used in some authentication/authorization tests (see :code:`tests/test_auth.py`), during replays they **do not have to be valid**, they only need to be valid at the time of recording of these tests (although they still **have to match**). In fact, if you ever find yourself recording tests that use :code:`PYTHON_YADISK_APP_SECRET`, make sure to **generate a new application secret** afterwards. Replaying tests --------------- Testing is done with :code:`pytest`. To only **replay**, set :code:`PYTHON_YADISK_RECORDING_ENABLED=0` and :code:`PYTHON_YADISK_REPLAY_ENABLED=1` (this is the default behavior): .. code:: bash pytest -vx tests # or the same thing more explicitly PYTHON_YADISK_RECORDING_ENABLED=0 PYTHON_YADISK_REPLAY_ENABLED=1 pytest -vx tests .. note:: Running tests in replay mode will only work if :code:`PYTHON_YADISK_APP_ID`, :code:`PYTHON_YADISK_APP_SECRET` and :code:`PYTHON_YADISK_TEST_ROOT` all match with those at the time of recording. :code:`PYTHON_YADISK_APP_TOKEN` is not stored anywhere and doesn't need to be valid nor match the value at the time of recording. Environment variables, necessary for running replays of the recorded tests are provided in the :code:`tests/.env` file. Note that the secret in that file is not actually valid. Recording tests --------------- To **record** tests, set :code:`PYTHON_YADISK_RECORDING_ENABLED=1` and :code:`PYTHON_YADISK_REPLAY_ENABLED=0`: .. code:: bash PYTHON_YADISK_RECORDING_ENABLED=1 PYTHON_YADISK_REPLAY_ENABLED=0 pytest -vx tests The recorded JSON files are stored in :code:`tests/recorded/{sync,async}`. .. note:: Recorded JSON files may contain **personal information**, such as your name and other account information (see :code:`test_get_disk_info()`), as well as some information about your files (see :code:`test_get_last_uploaded()`, :code:`test_get_public_resources()`, :code:`test_get_files()`). Inspect the files after recording them. Content of requests and responses is compressed with zlib and encoded with Base64 (see :code:`tests/disk_gateway.py`) Running tests without either recording or replaying --------------------------------------------------- It is also possible to run tests without recording or replay: .. code:: bash PYTHON_YADISK_RECORDING_ENABLED=0 PYTHON_YADISK_REPLAY_ENABLED=0 pytest -vx tests Documentation ************* .. _Read the Docs (en): https://yadisk.readthedocs.io/en/latest/ .. _Read the Docs (ru): https://yadisk.readthedocs.io/ru/latest/ All documentation is written in English and then additionally localized to Russian. Documentation is built with :code:`sphinx` and reSructuredText (:code:`.rst` files). It is published at `Read the Docs (en)`_ and `Read the Docs (ru)`_ Building documentation ---------------------- To build the documentation in HTML format, go the :code:`docs/` directory and run the following command: .. code:: bash make html This will build the documentation in English. The resulting files can be found in the :code:`docs/_build/html` directory. To build documentation in Russian, run the following command: .. code:: bash make -e SPHINXOPTS='-D language=ru' html Translation ----------- .. _Sphinx/Internationalization: https://www.sphinx-doc.org/en/master/usage/advanced/intl.html The translation workflow looks something like this: #. Extract translatable messages with :code:`make gettext` #. Generate :code:`.po` files with :code:`sphinx-intl update -p _build/gettext -l ru` (can be found in :code:`locales/ru/LC_MESSAGES`) #. Translate :code:`.po` files #. Build translated documentation with :code:`make -e SPHINXOPTS='-D language=ru' html` See `Sphinx/Internationalization`_ for more instructions. Building the package ******************** To build the wheel (:code:`.whl` file) and the source archive, use the following command: .. code:: bash python -m build Afterwards you should have the built wheel and source archive in the :code:`dist/` directory. New release workflow ********************** .. _Read the Docs (dev, en): https://yadisk.readthedocs.io/en/dev/ .. _Read the Docs (dev, ru): https://yadisk.readthedocs.io/ru/dev/ This is the general workflow for publishing a new release: #. Commit changes to the :code:`dev` branch #. Update documentation #. Run tests and linting #. Update translations #. Push changes #. Run tests and linting with Github Actions, ensure there are no errors #. Check that the documentation is not broken at `Read the Docs (dev, en)`_ and `Read the Docs (dev, ru)`_ #. Bump version number in several files (follow semantic versioning): #. :code:`__version__` in :code:`src/yadisk/__init__.py` #. :code:`version` in :code:`docs/conf.py` #. Write the release notes and translate them, put them in the following files: #. :code:`docs/changelog.rst` #. :code:`README.rst` #. :code:`README.en.rst` #. :code:`README.ru.rst` #. Push the changes #. Run tests and linting with Github Actions, ensure there are no errors #. Check that the documentation is not broken at `Read the Docs (dev, en)`_ and `Read the Docs (dev, ru)`_ #. Create a PR and merge changes to :code:`master` #. Build the package (wheel and source archive) #. Upload the built package to PyPI #. Add a new release on Github ================================================ FILE: CONTRIBUTORS.rst ================================================ Contributors ============ - Ivan Konovalov (`@ivknv `_) (author, maintainer) - Yuri Kobets (`@tordex `_) - Vladislav (`@Omnivanitate `_) - `@unix3dgforce `_ - Nikita Kolesov (`@NikitaKolesov `_) - Katant Savelev (`@KatantDev `_) ================================================ FILE: COPYING ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: COPYING.lesser ================================================ GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ================================================ FILE: MANIFEST.in ================================================ include COPYING include COPYING.lesser include CONTRIBUTORS.rst include README.rst include README.en.rst include README.ru.rst include src/yadisk/py.typed ================================================ FILE: README.en.rst ================================================ YaDisk ====== .. |RTD Badge| image:: https://img.shields.io/readthedocs/yadisk.svg :alt: Read the Docs :target: https://yadisk.readthedocs.io/en/latest/ .. |CI Badge| image:: https://img.shields.io/github/actions/workflow/status/ivknv/yadisk/lint_and_test.yml :alt: GitHub Actions Workflow Status .. |PyPI Badge| image:: https://img.shields.io/pypi/v/yadisk.svg :alt: PyPI :target: https://pypi.org/project/yadisk .. |Python Version Badge| image:: https://img.shields.io/pypi/pyversions/yadisk :alt: PyPI - Python Version .. |Coverage Badge| image:: https://coveralls.io/repos/github/ivknv/yadisk/badge.svg?branch=master :alt: Coverage :target: https://coveralls.io/github/ivknv/yadisk |RTD Badge| |CI Badge| |PyPI Badge| |Python Version Badge| |Coverage Badge| YaDisk is a Yandex.Disk REST API client library. .. _Read the Docs (EN): https://yadisk.readthedocs.io .. _Read the Docs (RU): https://yadisk.readthedocs.io/ru/latest Documentation is available at `Read the Docs (EN)`_ and `Read the Docs (RU)`_. .. contents:: Table of contents: Installation ************ :code:`yadisk` supports multiple HTTP client libraries and has both synchronous and asynchronous API. The following HTTP client libraries are currently supported: * :code:`requests` (used by default for synchronous API) * :code:`httpx` (both synchronous and asynchronous, used by default for asynchronous API) * :code:`aiohttp` (asynchronous only) * :code:`pycurl` (synchronous only) For synchronous API (installs :code:`requests`): .. code:: bash pip install yadisk[sync-defaults] For asynchronous API (installs :code:`aiofiles` and :code:`httpx`): .. code:: bash pip install yadisk[async-defaults] Alternatively, you can manually choose which optional libraries to install: .. code:: bash # For use with pycurl pip install yadisk[pycurl] # For use with aiohttp, will also install aiofiles pip install yadisk[async-files,aiofiles] Examples ******** Synchronous API --------------- .. code:: python import yadisk client = yadisk.Client(token="") # or # client = yadisk.Client("", "", "") # You can either use the with statement or manually call client.close() later with client: # Check if the token is valid print(client.check_token()) # Get disk information print(client.get_disk_info()) # Print files and directories at "/some/path" print(list(client.listdir("/some/path"))) # Upload "file_to_upload.txt" to "/destination.txt" client.upload("file_to_upload.txt", "/destination.txt") # Same thing with open("file_to_upload.txt", "rb") as f: client.upload(f, "/destination.txt") # Download "/some-file-to-download.txt" to "downloaded.txt" client.download("/some-file-to-download.txt", "downloaded.txt") # Permanently remove "/file-to-remove" client.remove("/file-to-remove", permanently=True) # Create a new directory at "/test-dir" print(client.mkdir("/test-dir")) Asynchronous API ---------------- .. code:: python import yadisk import aiofiles client = yadisk.AsyncClient(token="") # or # client = yadisk.AsyncClient("", "", "") # You can either use the with statement or manually call client.close() later async with client: # Check if the token is valid print(await client.check_token()) # Get disk information print(await client.get_disk_info()) # Print files and directories at "/some/path" print([i async for i in client.listdir("/some/path")]) # Upload "file_to_upload.txt" to "/destination.txt" await client.upload("file_to_upload.txt", "/destination.txt") # Same thing async with aiofiles.open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Same thing but with regular files with open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Download "/some-file-to-download.txt" to "downloaded.txt" await client.download("/some-file-to-download.txt", "downloaded.txt") # Same thing async with aiofiles.open("downloaded.txt", "wb") as f: await client.download("/some-file-to-download.txt", f) # Permanently remove "/file-to-remove" await client.remove("/file-to-remove", permanently=True) # Create a new directory at "/test-dir" print(await client.mkdir("/test-dir")) Contributing ************ If you would like to contribute to this project, see `CONTRIBUTING.rst `_. Changelog ********* .. _issue #2: https://github.com/ivknv/yadisk/issues/2 .. _issue #4: https://github.com/ivknv/yadisk/issues/4 .. _issue #7: https://github.com/ivknv/yadisk/issues/7 .. _issue #23: https://github.com/ivknv/yadisk/issues/23 .. _issue #26: https://github.com/ivknv/yadisk/issues/26 .. _issue #28: https://github.com/ivknv/yadisk/issues/28 .. _issue #29: https://github.com/ivknv/yadisk/issues/29 .. _PR #31: https://github.com/ivknv/yadisk/pull/31 .. _issue #43: https://github.com/ivknv/yadisk/issues/43 .. _issue #45: https://github.com/ivknv/yadisk/issues/45 .. _issue #49: https://github.com/ivknv/yadisk/issues/49 .. _issue #53: https://github.com/ivknv/yadisk/issues/53 .. _Introduction: https://yadisk.readthedocs.io/en/latest/intro.html .. _API Reference: https://yadisk.readthedocs.io/en/latest/api_reference/index.html .. _Available Session Implementations: https://yadisk.readthedocs.io/en/latest/api_reference/sessions.html .. _Session Interface: https://yadisk.readthedocs.io/en/latest/api_reference/session_interface.html .. _requests: https://pypi.org/project/requests .. _Migration Guide: https://yadisk.readthedocs.io/en/latest/migration_guide.html .. _PR #57: https://github.com/ivknv/yadisk/pull/57 .. _issue #62: https://github.com/ivknv/yadisk/issues/62 * **Release 3.4.1 (2026-04-16)** * Bug fixes: * Fixed a :code:`TypeError` when passing a file path to :code:`AsyncClient.download()` or :code:`AsyncClient.upload()` while not having :code:`aiofiles` installed (see `issue #62`_) * Work around Yandex.Disk ignoring request body for :code:`Client.patch()` and :code:`Client.update_public_settings()` when using :code:`pycurl` due to setting :code:`Transfer-Encoding: chunked` by default * **Release 3.4.0 (2025-07-10)** * New features: * Added methods for managing public settings of resources: * :code:`Client.update_public_settings()` * :code:`Client.get_public_settings()` * :code:`Client.get_public_available_settings()` Note, it appears that these API endpoints do not fully conform to the official REST API documentation, their functionality is limited in practice. * Added new exception class :code:`PasswordRequiredError` * Added several new fields for :code:`DiskInfoObject`: * :code:`deletion_restricion_days` * :code:`hide_screenshots_in_photoslice` * :code:`is_legal_entity` * Implemented the :code:`__dir__()` method for response objects * Improvements: * :code:`repr()` of API response objects now only shows the keys that are actually present (instead of displaying them as :code:`None` like before) * **Release 3.3.0 (2025-04-29)** * New features: * User-Agent spoofing to bypass Yandex.Disk's upload speed limit (see `PR #57`_). :code:`Client.upload()` and related methods (including :code:`AsyncClient`) have a new optional parameter :code:`spoof_user_agent`, which is set to :code:`True` by default. This parameter can be used to disable User-Agent spoofing if necessary. * Added IPython's pretty printing support for :code:`YaDiskObject` and derived classes * Bug fixes: * :code:`Client.wait_for_operation()` now uses :code:`time.monotonic()` instead of :code:`time.time()` * Improvements: * REST API error messages are now clearly divided into four parts (message, description, error code and HTTP status code) * **Release 3.2.0 (2025-02-03)** * New features: * Added new method: :code:`Client.makedirs()` / :code:`AsyncClient.makedirs()` (see `issue #53`_) * Added several missing fields for :code:`DiskInfoObject`: * :code:`photounlim_size` * :code:`will_be_overdrawn` * :code:`free_photounlim_end_date` * :code:`payment_flow` * Added missing field :code:`sizes` for :code:`ResourceObject` and related objects * Bug fixes: * :code:`Client.rename()` / :code:`AsyncClient.rename()` now raises :code:`ValueError` on attempt to rename the root directory * Automatic retry attempt numbers were logged off by one, now they are logged correctly * **Release 3.1.0 (2024-07-12)** * New features: * Added new exception classes: :code:`GoneError` and :code:`ResourceDownloadLimitExceededError` * Added a new method: :code:`Client.get_all_public_resources()` and :code:`AsyncClient.get_all_public_resources()` * Bug fixes: * Fixed setting :code:`headers` and session arguments to :code:`None` causing errors * Fixed incorrect handling of empty filename in :code:`Client.rename()` and :code:`AsyncClient.rename()` * Fixed several typos in async convenience method implementations (:code:`listdir()` and related) * Fixed :code:`PublicResourceListObject` having the wrong type for its :code:`items` member * Fixed API requests not working with :code:`PycURLSession` when :code:`stream=True` is set * No data will be written to the output file by :code:`Client.download()`, :code:`Client.download_by_link()`, :code:`AsyncClient.download()` and :code:`AsyncClient.download_by_link()` if the server returns a bad status code * **Release 3.0.1 (2024-07-09)** * Fixed broken :code:`pyproject.toml` that did not include full package contents (see `issue #49`_) * **Release 3.0.0 (2024-07-09)** * Breaking changes: - See `Migration Guide`_ for full details - All methods wait for asynchronous operations to complete by default (see the new :code:`wait=` parameter) - Iterating over the result of :code:`AsyncClient.listdir()` no longer requires the additional await keyword. - Number of returned items of :code:`Client.get_files()` / :code:`AsyncClient.get_files()` is now controlled by the :code:`max_items` parameter, rather than :code:`limit` - Methods :code:`set_token()`, :code:`set_headers()` of :code:`Session` and :code:`AsyncSession` were removed - Some methods no longer accept the :code:`fields` parameter - :code:`Client.get_last_uploaded()` / :code:`AsyncClient.get_last_uploaded()` now return a list instead of a generator - :code:`yadisk.api` is now a private module - All private modules were renamed to have names that start with :code:`_` (e.g, :code:`yadisk._api`) * New features: - Added methods to wait until an asynchronous operation completes (see :code:`Client.wait_for_operation()` / :code:`AsyncClient.wait_for_operation()`) - Methods that may start an asynchronous operation now accept additional parameters: :code:`wait: bool = True`, :code:`poll_interval: float = 1.0` and :code:`poll_timeout: Optional[float] = None` - :code:`Client.listdir()`, :code:`Client.get_files()` and their async variants now accept a new parameter :code:`max_items: Optional[int] = None`, which can be used to limit the maximum number of returned items - Most :code:`Client` and :code:`AsyncClient` methods now accept an optional parameter :code:`retry_on: Optional[Tuple[Type[Exception], ...]] = None`, which lets you specify a tuple of additional exceptions that can trigger an automatic retry - :code:`yadisk.types` module is now public - Added basic logging of outgoing API requests and automatic retries - The logger instance for the library can be accessed as :code:`yadisk.settings.logger` - Added :code:`YaDiskObject.field()` and the :code:`@` operator (:code:`YaDiskObject.__matmul__()`) which verify that the given field is not :code:`None` - Added :code:`Client.get_upload_link_object()`, :code:`AsyncClient.get_upload_link_object()` whose return values additionally contain :code:`operation_id` - :code:`utils.auto_retry()` now accepts more parameters - Added a few missing fields for :code:`DiskInfoObject` - :code:`EXIFObject` now contains GPS coordinates - :code:`CaseInsensitiveDict` is now part of :code:`yadisk.utils` * Improvements: - Added full type hints for :code:`Client`, :code:`AsyncClient` through :code:`.pyi` stub files - Docstrings for :code:`Client` / :code:`AsyncClient` now include more parameters - Errors during JSON processing (e.g. :code:`InvalidResponseError`) also trigger automatic retries - Error message when the default session module is not available is now less confusing (see `issue #43`_) - Reduced :code:`Client.listdir()`'s default :code:`limit` to :code:`500` from :code:`10000` to avoid timeouts on large directories (see `issue #45`_) - Reduced :code:`Client.get_files()`'s default :code:`limit` to :code:`200` from :code:`1000` to avoid timeouts - :code:`Client.download()` and similar methods no longer set :code:`Connection: close` header, since it's not necessary (unlike with :code:`Client.upload()`) - :code:`UnknownYaDiskError` now includes status code in the error message * Bug fixes: - Fixed :code:`httpx`- and :code:`aiohttp`-based session implementations not converting their exceptions to :code:`RequestError` in their :code:`Response.json()` / :code:`AsyncResponse.json()` implementations - Fixed :code:`stream=True` not being set by default in :code:`AsyncClient.download()`, :code:`AsyncClient.download_public()` * Other changes: - :code:`typing_extensions` is now required for Python < 3.10 * **Release 2.1.0 (2024-01-03)** * Fixed a bug where POST request parameters were not encoded correctly * Fixed a bug in :code:`PycURLSession.send_request()` that made it ignore passed headers * :code:`RequestsSession.close()` now closes all underlying session instances, instead of only the current thread-local one * All methods of :code:`Client` and :code:`AsyncClient` now use existing session * Removed :code:`session_factory` attribute and :code:`make_session()` method of :code:`Client` and :code:`AsyncClient` * Session class can now be specified as a string * Added :code:`Client.get_device_code()`/:code:`AsyncClient.get_device_code()` methods * Added :code:`Client.get_token_from_device_code()`/:code:`AsyncClient.get_token_from_device_code()` methods * Added missing :code:`redirect_uri` parameter for :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()` and :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` * Added support for PKCE parameters for :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()`, :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` and :code:`Client.get_token()`/:code:`AsyncClient.get_token()` * Added :code:`scope` attribute for :code:`TokenObject` * Added new exception classes: :code:`InvalidClientError`, :code:`InvalidGrantError`, :code:`AuthorizationPendingError`, :code:`BadVerificationCodeError` and :code:`UnsupportedTokenTypeError` * **Release 2.0.0 (2023-12-12)** * The library now provides both synchronous and asynchronous APIs (see `Introduction`_ and `API Reference`_) * Multiple HTTP libraries are supported by default (see `Available Session Implementations`_ for the full list) * It is now possible to add support for any HTTP library (see `Session Interface`_) * `requests`_ is now an optional dependency (although it's still used by default for synchronous API) * Note that now requests-specific arguments must be passed differently (see `Available Session Implementations`_) * Preferred HTTP client libraries must be explicitly installed now (see `Introduction`_) * :code:`Client.upload()` and :code:`Client.upload_by_link()` can now accept a function that returns an iterator (or a generator) as a payload * **Release 1.3.4 (2023-10-15)** * :code:`upload()` and :code:`download()` (and related) methods can now upload/download non-seekable file-like objects (e.g. :code:`stdin` or :code:`stdout` when open in binary mode), see `PR #31`_ * **Release 1.3.3 (2023-04-22)** * :code:`app:/` paths now work correctly (see `issue #26`_) * **Release 1.3.2 (2023-03-20)** * Fixed `issue #29`_: TypeError: 'type' object is not subscriptable * **Release 1.3.1 (2023-02-28)** * Fixed `issue #28`_: calling :code:`download_public()` with :code:`path` keyword argument raises :code:`TypeError` * Fixed :code:`AttributeError` raised when calling :code:`ResourceLinkObject.public_listdir()` * **Release 1.3.0 (2023-01-30)** * Added convenience methods to :code:`...Object` objects (e.g. see :code:`ResourceObject` in docs) * Added type hints * Improved error checking and response validation * Added :code:`InvalidResponseError`, :code:`PayloadTooLargeError`, :code:`UploadTrafficLimitExceededError` * Added a few missing fields to :code:`DiskInfoObject` and :code:`SystemFoldersObject` * Added :code:`rename()`, :code:`upload_by_link()` and :code:`download_by_link()` methods * Added :code:`default_args` field for :code:`YaDisk` object * :code:`download()` and :code:`upload()` now return :code:`ResourceLinkObject` * Returned :code:`LinkObject` instances have been replaced by more specific subclasses * :code:`ConnectionError` now also triggers a retry * **Release 1.2.19 (2023-01-20)** * Fixed incorrect behavior of the fix from 1.2.18 for paths :code:`disk:` and :code:`trash:` (only these two). * **Release 1.2.18 (2023-01-20)** * Fixed `issue #26`_: ':' character in filenames causes :code:`BadRequestError`. This is due the behavior of Yandex.Disk's REST API itself but is avoided on the library level with this fix. * **Release 1.2.17 (2022-12-11)** * Fixed a minor bug which could cause a :code:`ReferenceError` (which would not cause a crash, but still show an error message). The bug involved using :code:`__del__()` method in :code:`SelfDestructingSession` to automatically close the sessions it seems to affect primarily old Python versions (such as 3.4). * **Release 1.2.16 (2022-08-17)** * Fixed a bug in :code:`check_token()`: could throw :code:`ForbiddenError` if the application lacks necessary permissions (`issue #23`_). * **Release 1.2.15 (2021-12-31)** * Fixed an issue where :code:`http://` links were not recognized as operation links (they were assumed to always be :code:`https://`, since all the other requests are always HTTPS). Occasionally, Yandex.Disk can for some reason return an :code:`http://` link to an asynchronous operation instead of :code:`https://`. Both links are now recognized correctly and an :code:`https://` version will always be used by :code:`get_operation_status()`, regardless of which one Yandex.Disk returned. * **Release 1.2.14 (2019-03-26)** * Fixed a :code:`TypeError` in :code:`get_public_*` functions when passing :code:`path` parameter (see `issue #7`_) * Added :code:`unlimited_autoupload_enabled` attribute for :code:`DiskInfoObject` * **Release 1.2.13 (2019-02-23)** * Added :code:`md5` parameter for :code:`remove()` * Added :code:`UserPublicInfoObject` * Added :code:`country` attribute for :code:`UserObject` * Added :code:`photoslice_time` attribute for :code:`ResourceObject`, :code:`PublicResourceObject` and :code:`TrashResourceObject` * **Release 1.2.13 (2019-02-23)** * Added :code:`md5` parameter for :code:`remove()` * Added :code:`UserPublicInfoObject` * Added :code:`country` attribute for :code:`UserObject` * Added :code:`photoslice_time` attribute for :code:`ResourceObject`, :code:`PublicResourceObject` and :code:`TrashResourceObject` * **Release 1.2.12 (2018-10-11)** * Fixed `fields` parameter not working properly in `listdir()` (`issue #4`_) * **Release 1.2.11 (2018-06-30)** * Added the missing parameter :code:`sort` for :code:`get_meta()` * Added :code:`file` and :code:`antivirus_status` attributes for :code:`ResourceObject`, :code:`PublicResourceObject` and :code:`TrashResourceObject` * Added :code:`headers` parameter * Fixed a typo in :code:`download()` and :code:`download_public()` (`issue #2`_) * Removed :code:`*args` parameter everywhere * **Release 1.2.10 (2018-06-14)** * Fixed :code:`timeout=None` behavior. :code:`None` is supposed to mean 'no timeout' but in the older versions it was synonymous with the default timeout. * **Release 1.2.9 (2018-04-28)** * Changed the license to LGPLv3 (see :code:`COPYING` and :code:`COPYING.lesser`) * Other package info updates * **Release 1.2.8 (2018-04-17)** * Fixed a couple of typos: :code:`PublicResourceListObject.items` and :code:`TrashResourceListObject.items` had wrong types * Substitute field aliases in :code:`fields` parameter when performing API requests (e.g. :code:`embedded` -> :code:`_embedded`) * **Release 1.2.7 (2018-04-15)** * Fixed a file rewinding bug when uploading/downloading files after a retry * **Release 1.2.6 (2018-04-13)** * Now caching :code:`requests` sessions so that open connections can be reused (which can significantly speed things up sometimes) * Disable :code:`keep-alive` when uploading/downloading files by default * **Release 1.2.5 (2018-03-31)** * Fixed an off-by-one bug in :code:`utils.auto_retry()` (which could sometimes result in :code:`AttributeError`) * Retry the whole request for :code:`upload()`, :code:`download()` and :code:`download_public()` * Set :code:`stream=True` for :code:`download()` and :code:`download_public()` * Other minor fixes * **Release 1.2.4 (2018-02-19)** * Fixed :code:`TokenObject` having :code:`exprires_in` instead of :code:`expires_in` (fixed a typo) * **Release 1.2.3 (2018-01-20)** * Fixed a :code:`TypeError` when :code:`WrongResourceTypeError` is raised * **Release 1.2.2 (2018-01-19)** * :code:`refresh_token()` no longer requires a valid or empty token. * **Release 1.2.1 (2018-01-14)** * Fixed auto retries not working. Whoops. * **Release 1.2.0 (2018-01-14)** * Fixed passing :code:`n_retries=0` to :code:`upload()`, :code:`download()` and :code:`download_public()` * :code:`upload()`, :code:`download()` and :code:`download_public()` no longer return anything (see the docs) * Added :code:`utils` module (see the docs) * Added :code:`RetriableYaDiskError`, :code:`WrongResourceTypeError`, :code:`BadGatewayError` and :code:`GatewayTimeoutError` * :code:`listdir()` now raises :code:`WrongResourceTypeError` instead of :code:`NotADirectoryError` * **Release 1.1.1 (2017-12-29)** * Fixed argument handling in :code:`upload()`, :code:`download()` and :code:`download_public()`. Previously, passing :code:`n_retries` and :code:`retry_interval` would raise an exception (:code:`TypeError`). * **Release 1.1.0 (2017-12-27)** * Better exceptions (see the docs) * Added support for :code:`force_async` parameter * Minor bug fixes * **Release 1.0.8 (2017-11-29)** * Fixed yet another :code:`listdir()` bug * **Release 1.0.7 (2017-11-04)** * Added :code:`install_requires` argument to :code:`setup.py` * **Release 1.0.6 (2017-11-04)** * Return :code:`OperationLinkObject` in some functions * **Release 1.0.5 (2017-10-29)** * Fixed :code:`setup.py` to exclude tests * **Release 1.0.4 (2017-10-23)** * Fixed bugs in :code:`upload`, :code:`download` and :code:`listdir` functions * Set default :code:`listdir` :code:`limit` to :code:`10000` * **Release 1.0.3 (2017-10-22)** * Added settings * **Release 1.0.2 (2017-10-19)** * Fixed :code:`get_code_url` function (added missing parameters) * **Release 1.0.1 (2017-10-18)** * Fixed a major bug in :code:`GetTokenRequest` (added missing parameter) * **Release 1.0.0 (2017-10-18)** * Initial release ================================================ FILE: README.rst ================================================ YaDisk ====== .. |RTD Badge| image:: https://img.shields.io/readthedocs/yadisk.svg :alt: Read the Docs :target: https://yadisk.readthedocs.io/ru/latest/ .. |CI Badge| image:: https://img.shields.io/github/actions/workflow/status/ivknv/yadisk/lint_and_test.yml :alt: GitHub Actions Workflow Status .. |PyPI Badge| image:: https://img.shields.io/pypi/v/yadisk.svg :alt: PyPI :target: https://pypi.org/project/yadisk .. |Python Version Badge| image:: https://img.shields.io/pypi/pyversions/yadisk :alt: PyPI - Python Version .. |Coverage Badge| image:: https://coveralls.io/repos/github/ivknv/yadisk/badge.svg?branch=master :alt: Coverage :target: https://coveralls.io/github/ivknv/yadisk |RTD Badge| |CI Badge| |PyPI Badge| |Python Version Badge| |Coverage Badge| .. _English version of this document: https://github.com/ivknv/yadisk/blob/master/README.en.rst `English version of this document`_ YaDisk - это библиотека-клиент REST API Яндекс.Диска. .. _Read the Docs (EN): https://yadisk.readthedocs.io .. _Read the Docs (RU): https://yadisk.readthedocs.io/ru/latest Документация доступна на `Read the Docs (RU)`_ и `Read the Docs (EN)`_. .. contents:: Содержание: Установка ********* :code:`yadisk` поддерживает несколько HTTP библиотек и реализует одновременно как синхронный, так и асинхронный API. На данный момент поддерживаются следующие HTTP библиотеки: * :code:`requests` (используется по умолчанию для синхронного API) * :code:`httpx` (синхронный и асинхронный API, используется по умолчанию для асинхронного API) * :code:`aiohttp` (асинхронный API) * :code:`pycurl` (синхронный API) Для синхронного API (устанавливает :code:`requests`): .. code:: bash pip install yadisk[sync-defaults] Для асинхронного API (устанавливает :code:`httpx` и :code:`aiofiles`): .. code:: bash pip install yadisk[async-defaults] Вы можете также вручную установить нужные библиотеки: .. code:: bash # Для использования совместно с pycurl pip install yadisk[pycurl] # Для использования совместно с aiohttp, также установит aiofiles pip install yadisk[async-files,aiohttp] Примеры ******* Синхронный API -------------- .. code:: python import yadisk client = yadisk.Client(token="<токен>") # или # client = yadisk.Client("", "", "<токен>") # Вы можете использовать либо конструкцию with, либо вручную вызвать client.close() в конце with client: # Проверяет, валиден ли токен print(client.check_token()) # Получает общую информацию о диске print(client.get_disk_info()) # Выводит содержимое "/some/path" print(list(client.listdir("/some/path"))) # Загружает "file_to_upload.txt" в "/destination.txt" client.upload("file_to_upload.txt", "/destination.txt") # То же самое with open("file_to_upload.txt", "rb") as f: client.upload(f, "/destination.txt") # Скачивает "/some-file-to-download.txt" в "downloaded.txt" client.download("/some-file-to-download.txt", "downloaded.txt") # Безвозвратно удаляет "/file-to-remove" client.remove("/file-to-remove", permanently=True) # Создаёт новую папку "/test-dir" print(client.mkdir("/test-dir")) Асинхронный API --------------- .. code:: python import yadisk import aiofiles client = yadisk.AsyncClient(token="") # или # client = yadisk.AsyncClient("", "", "") # Вы можете использовать либо конструкцию with, либо вручную вызвать client.close() в конце async with client: # Проверяет, валиден ли токен print(await client.check_token()) # Получает общую информацию о диске print(await client.get_disk_info()) # Выводит содержимое "/some/path" print([i async for i in client.listdir("/some/path")]) # Загружает "file_to_upload.txt" в "/destination.txt" await client.upload("file_to_upload.txt", "/destination.txt") # То же самое async with aiofiles.open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # То же самое, но с обычными файлами with open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Скачивает "/some-file-to-download.txt" в "downloaded.txt" await client.download("/some-file-to-download.txt", "downloaded.txt") # То же самое async with aiofiles.open("downloaded.txt", "wb") as f: await client.download("/some-file-to-download.txt", f) # Безвозвратно удаляет "/file-to-remove" await client.remove("/file-to-remove", permanently=True) # Создаёт новую папку "/test-dir" print(await client.mkdir("/test-dir")) Участие в разработке ******************** Если вы хотите поучаствовать в разработке, см. `CONTRIBUTING.rst `_. История изменений ***************** .. _issue #2: https://github.com/ivknv/yadisk/issues/2 .. _issue #4: https://github.com/ivknv/yadisk/issues/4 .. _issue #7: https://github.com/ivknv/yadisk/issues/7 .. _issue #23: https://github.com/ivknv/yadisk/issues/23 .. _issue #26: https://github.com/ivknv/yadisk/issues/26 .. _issue #28: https://github.com/ivknv/yadisk/issues/28 .. _issue #29: https://github.com/ivknv/yadisk/issues/29 .. _PR #31: https://github.com/ivknv/yadisk/pull/31 .. _issue #43: https://github.com/ivknv/yadisk/issues/43 .. _issue #45: https://github.com/ivknv/yadisk/issues/45 .. _issue #49: https://github.com/ivknv/yadisk/issues/49 .. _issue #53: https://github.com/ivknv/yadisk/issues/53 .. _Введение: https://yadisk.readthedocs.io/ru/latest/intro.html .. _Справочник API: https://yadisk.readthedocs.io/ru/latest/api_reference/index.html .. _Доступные реализации сессий: https://yadisk.readthedocs.io/ru/latest/api_reference/sessions.html .. _Интерфейс Session: https://yadisk.readthedocs.io/ru/latest/api_reference/session_interface.html .. _requests: https://pypi.org/project/requests .. _Руководство по миграции: https://yadisk.readthedocs.io/ru/latest/migration_guide.html .. _PR #57: https://github.com/ivknv/yadisk/pull/57 .. _issue #62: https://github.com/ivknv/yadisk/issues/62 * **Release 3.4.1 (2026-04-16)** * Исправления: * Исправлена ошибка :code:`TypeError` при передаче пути к файлу в :code:`AsyncClient.download()` или :code:`AsyncClient.upload()` без установленного :code:`aiofiles` (см. `issue #62`_) * Обход проблемы, когда Яндекс.Диск игнорирует тело запроса для :code:`Client.patch()` и :code:`Client.update_public_settings()` при использовании :code:`pycurl` из-за задания заголовка :code:`Transfer-Encoding: chunked` по умолчанию * **Release 3.4.0 (2025-07-10)** * Нововведения: * Добавлены методы для управления настройками публичного доступа к ресурсам: * :code:`Client.update_public_settings()` * :code:`Client.get_public_settings()` * :code:`Client.get_public_available_settings()` Внимание: похоже, что эти эндпоинты не полностью соответствуют официальной документации REST API, их функциональность на практике ограничена. * Добавлен новый класс исключений :code:`PasswordRequiredError` * Добавлено несколько новых полей :code:`DiskInfoObject`: * :code:`deletion_restricion_days` * :code:`hide_screenshots_in_photoslice` * :code:`is_legal_entity` * Реализован метод :code:`__dir__()` для объектов ответов сервера * Улучшения: * :code:`repr()` объектов ответов API теперь показывает только те ключи, которые фактически присутствуют (вместо отображения их значений как :code:`None`, как раньше) * **Release 3.3.0 (2025-04-29)** * Нововведения: * Спуфинг User-Agent для обхода ограничения скорости загрузки файлов на Диск (см. `PR #57`_). :code:`Client.upload()` и связанные с ним методы (включая :code:`AsyncClient`) имеют новый опциональный параметр :code:`spoof_user_agent`, который по умолчанию имеет значение :code:`True`. Этот параметр можно использовать для отключения спуфинга, если это необходимо. * Добавлена поддержка pretty-printing в IPython для :code:`YaDiskObject` и производных классов * Исправления: * :code:`Client.wait_for_operation()` теперь использует :code:`time.monotonic()` вместо :code:`time.time()` * Улучшения: * Сообщения об ошибках REST API теперь чётко разделены на четыре части (сообщение, описание, код ошибки и код состояния HTTP) * **Release 3.2.0 (2025-02-03)** * Нововведения: * Добавлен новый метод: :code:`Client.makedirs()` и :code:`AsyncClient.makedirs()` (см. `issue #53`_) * Добавлено несколько недостающих полей :code:`DiskInfoObject` * :code:`photounlim_size` * :code:`will_be_overdrawn` * :code:`free_photounlim_end_date` * :code:`payment_flow` * Добавлено недостающее поле :code:`sizes` для :code:`ResourceObject` и связанных с ним объектов * Исправления: * :code:`Client.rename()` / :code:`AsyncClient.rename()` теперь вызывает :code:`ValueError` при попытке переименовать корневую папку * Номера автоматических повторных попыток логировались с ошибкой на единицу, теперь они логируются правильно * **Release 3.1.0 (2024-07-12)** * Нововведения: * Добавлены новые исключения: :code:`GoneError` и :code:`ResourceDownloadLimitExceededError` * Добавлен новый метод: :code:`Client.get_all_public_resources()` и :code:`AsyncClient.get_all_public_resources()` * Исправления: * Задание :code:`headers` и других опциональных параметров сессии как :code:`None` больше не вызывает ошибок * Исправлено неправильное поведение :code:`Client.rename()` и :code:`AsyncClient.rename()` при указании пустого имени файла * Исправлено несколько опечаток в асинхронных реализациях convenience-методов (:code:`listdir()` и аналогичных) * Исправлен неправильный тип данных у атрибута :code:`items` класса :code:`PublicResourceListObject` * Исправлены ошибки при отправке запросов API с помощью :code:`PycURLSession` при задании :code:`stream=True` * Данные не будут записаны в файл методами :code:`Client.download()`, :code:`Client.download_by_link()`, :code:`AsyncClient.download()` и :code:`AsyncClient.download_by_link()`, если сервер вернул ошибочный код состояния * **Release 3.0.1 (2024-07-09)** * Исправлен сломанный :code:`pyproject.toml`, который не включал в сборку полное содержимое пакета (см. `issue #49`_) * **Release 3.0.0 (2024-07-09)** * Несовместимые изменения: - См. `Руководство по миграции`_ для подробностей - Все методы теперь ожидают завершения асинхронных операций по умолчанию (см. новый параметр :code:`wait=`) - Итерация по результату :code:`AsyncClient.listdir()` больше не требует дополнительного ключевого слова await - Число возвращаемых файлов :code:`Client.get_files()` / :code:`AsyncClient.get_files()` теперь контролируется параметром :code:`max_items`, вместо :code:`limit` - Методы :code:`set_token()`, :code:`set_headers()` интерфейсов :code:`Session` и :code:`AsyncSession` были удалены - Некоторые методы больше не принимают параметр :code:`fields` - :code:`Client.get_last_uploaded()` / :code:`AsyncClient.get_last_uploaded()` теперь возвращает список вместо генератора - :code:`yadisk.api` - теперь скрытый модуль - Все скрытые модули были переименованы, их имена начинаются с :code:`_` (например, :code:`yadisk._api`) * Нововведения: - Добавлены методы для ожидания завершения асинхронной операции (см. :code:`Client.wait_for_operation()` / :code:`AsyncClient.wait_for_operation()`) - Методы, которые могут запускать асинхронную операцию, теперь принимают дополнительные параметры: :code:`wait: bool = True`, :code:`poll_interval: float = 1.0` и :code:`poll_timeout: Optional[float] = None` - :code:`Client.listdir()`, :code:`Client.get_files()` и их асинхронные вариации теперь принимают новый параметр :code:`max_items: Optional[int] = None`, который может быть использован, чтобы ограничить максимальное число возвращаемых файлов - Большинство методов :code:`Client` и :code:`AsyncClient` теперь принимает :code:`retry_on: Optional[Tuple[Type[Exception], ...]] = None`, который позволяет указывать кортеж из дополнительных исключений, которые могут вызвать автоматическую повторную попытку - Модуль :code:`yadisk.types` - теперь публичный - Добавлено логирование исходящих запросов к API и автоматических повторных попыток - Объект логгера библиотеки доступен как :code:`yadisk.settings.logger` - Добавлен метод :code:`YaDiskObject.field()` и оператор :code:`@` (:code:`YaDiskObject.__matmul__()`), который удостоверяется, что указанное поле объекта не является :code:`None` - Добавлены методы :code:`Client.get_upload_link_object()`, :code:`AsyncClient.get_upload_link_object()`, возвращаемые значения которых дополнительно содержат :code:`operation_id` - :code:`utils.auto_retry()` теперь принимает больше параметров - Добавлено несколько недостающих полей :code:`DiskInfoObject` - :code:`EXIFObject` теперь содержит GPS-координаты - :code:`CaseInsensitiveDict` - теперь часть :code:`yadisk.utils` * Улучшения: - Добавлены полные подсказки типов для :code:`Client` и :code:`AsyncClient` с помощью файлов :code:`.pyi` - Строки документации для :code:`Client` / :code:`AsyncClient` теперь включают в себя больше параметров - Ошибки во время обработки JSON (например, :code:`InvalidResponseError`) также вызывают автоматические повторные попытки - Сообщение об ошибке в случае, когда модуль сессии по умолчанию недоступен, теперь не вводит в заблуждение (см. `issue #43`_) - Уменьшено значение :code:`limit` до :code:`500` (было :code:`10000`) для :code:`Client.listdir()` для избежания таймаутов при больших папках (см. `issue #45`_) - Уменьшено значение :code:`limit` до :code:`200` (было :code:`1000`) для :code:`Client.get_files()` для избежания таймаутов - :code:`Client.download()` и подобные методы больше не задают заголовок :code:`Connection: close` т.к. в этом нет необходимости (в отличие от :code:`Client.upload()`) - :code:`UnknownYaDiskError` теперь включает код статуса в сообщение об ошибке * Исправления: - Исправлены реализации на основе :code:`httpx` и :code:`aiohttp`: реализации методов :code:`Response.json()` / :code:`AsyncResponse.json()` не преобразовывали свои исключения в :code:`RequestError` - Исправлено: параметр :code:`stream=True` был не задан по умолчанию в :code:`AsyncClient.download()`, :code:`AsyncClient.download_public()` * Другие изменения: - :code:`typing_extensions` теперь требуется для Python < 3.10 * **Release 2.1.0 (2024-01-03)** * Исправлен баг, из-за которого параметры в теле POST-запроса неправильно кодировались * Исправлен баг в :code:`PycURLSession.send_request()`, из-за которого переданные заголовки игнорировались * :code:`RequestsSession.close()` теперь закрывает сессию для всех потоков * Все методы :code:`Client` и :code:`AsyncClient` теперь используют существующую сессию * Удалены аттрибут :code:`session_factory` и метод :code:`make_session()` классов :code:`Client` и :code:`AsyncClient` * Класс сессии теперь может быть указан в качестве строки (см. :code:`Client`/:code:`AsyncClient`) * Добавлены методы :code:`Client.get_device_code()`/:code:`AsyncClient.get_device_code()` * Добавлены методы :code:`Client.get_token_from_device_code()`/:code:`AsyncClient.get_token_from_device_code()` * Добавлен недостающий параметр :code:`redirect_uri` для :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()` и :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` * Добавлена поддержка параметров PKCE для :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()`, :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` и :code:`Client.get_token()`/:code:`AsyncClient.get_token()` * Добавлен аттрибут :code:`scope` для :code:`TokenObject` * Добавлены новые классы исключений: :code:`InvalidClientError`, :code:`InvalidGrantError`, :code:`AuthorizationPendingError`, :code:`BadVerificationCodeError` и :code:`UnsupportedTokenTypeError` * **Release 2.0.0 (2023-12-12)** * Библиотека теперь предоставляет как синхронный, так и асинхронный API (см. `Введение`_ и `Справочник API`_) * Теперь поддерживается несколько HTTP библиотек (см. `Доступные реализации сессий`_ для полного списка) * Теперь возможно добавить поддержку любой HTTP библиотеки (см. `Интерфейс Session`_) * `requests`_ - теперь опциональная зависимость (хотя всё ещё используется по умолчанию для синхронного API) * Обратите внимание, что аргументы, специфичные для requests теперь передаются по другому (см. `Доступные реализации сессий`_) * Предпочитаемые HTTP библиотеки теперь должны быть установлены явным образом (см. `Введение`_) * :code:`Client.upload()` и :code:`Client.upload_by_link()` теперь могут принимать функцию, возвращающую итератор (или генератор) в качестве полезной нагрузки * **Release 1.3.4 (2023-10-15)** * Методы :code:`upload()` и :code:`download()` (и связянные с ними) теперь могут загружать/скачивать файлы, не поддерживающие операцию :code:`seek()` (например, :code:`stdin` и :code:`stdout`, при условии, что они открыты в режиме :code:`"rb"` или :code:`"wb"`), см. `PR #31`_ * **Release 1.3.3 (2023-04-22)** * Пути вида :code:`app:/` теперь работают правильно (см. `issue #26`_) * **Release 1.3.2 (2023-03-20)** * Исправлено `issue #29`_: TypeError: 'type' object is not subscriptable * **Release 1.3.1 (2023-02-28)** * Исправлено `issue #28`_: :code:`TypeError` при вызове :code:`download_public()` с параметром :code:`path` * Исправлено :code:`AttributeError` при вызове :code:`ResourceLinkObject.public_listdir()` * **Release 1.3.0 (2023-01-30)** * Добавлены convenience-методы для объектов :code:`...Object` (например, см. :code:`ResourceObject`) * Добавлены подсказки типов (type hints) * Улучшены проверки ошибок и проверка ответа * Добавлены :code:`InvalidResponseError`, :code:`PayloadTooLargeError`, :code:`UploadTrafficLimitExceededError` * Добавлено несколько недостающих полей объектов :code:`DiskInfoObject` и :code:`SystemFoldersObject` * Добавлены методы :code:`rename()`, :code:`upload_by_link()` и :code:`download_by_link()` * Добавлен аттрибут :code:`default_args` объекта :code:`YaDisk` * :code:`download()` и :code:`upload()` теперь возвращают :code:`ResourceLinkObject` * До этого возвращаемые объекты :code:`LinkObject` были заменены более конкретными подклассами * :code:`ConnectionError` теперь тоже вызывает повторную попытку * **Release 1.2.19 (2023-01-20)** * Исправлено неправильное поведение фикса из 1.2.18 для путей :code:`disk:` и :code:`trash:`. * **Release 1.2.18 (2023-01-20)** * Исправлено `issue #26`_: символ ':' в именах файлов приводит к :code:`BadRequestError`. Это поведение вызвано работой самого REST API Яндекс.Диска, но было исправлено на уровне библиотеки. * **Release 1.2.17 (2022-12-11)** * Исправлен баг, связанный с автоматическим закрытием сессии. Использование метода :code:`__del__()` приводило в некоторых случаях к ошибке :code:`ReferenceError` (ошибка игнорировалась, но сообщение выводилось). Баг проявляется по большей части в старых версиях Python (например 3.4). * **Release 1.2.16 (2022-08-17)** * Исправлен баг в :code:`check_token()`: функция могла вызвать :code:`ForbiddenError`, если у приложения недостатчно прав (`issue #23`_). * **Release 1.2.15 (2021-12-31)** * Исправлено: не распознавались ссылки на асинхронные операции, если они использовали :code:`http://` (вместо :code:`https://`). Иногда Яндекс.Диск может вернуть :code:`http://` ссылку на асинхронную операцию. Теперь обе версии ссылок распознаются правильно, при этом, при получении информации об операции (через :code:`get_operation_status()`) всегда используется :code:`https://` версия ссылки, даже если Яндекс.Диск вернул :code:`http://`. * **Release 1.2.14 (2019-03-26)** * Исправлена ошибка :code:`TypeError` в функциях :code:`get_public_*` при использовании с параметром :code:`path` (`issue #7`_) * Добавлен аттрибут :code:`unlimited_autoupload_enabled` для :code:`DiskInfoObject` * **Release 1.2.13 (2019-02-23)** * Добавлен :code:`md5` параметр для :code:`remove()` * Добавлен :code:`UserPublicInfoObject` * Добавлен аттрибут :code:`country` для :code:`UserObject` * Добавлен аттрибут :code:`photoslice_time` для :code:`ResourceObject`, :code:`PublicResourceObject` и :code:`TrashResourceObject` * **Release 1.2.12 (2018-10-11)** * Исправлен баг: не работает параметр `fields` в `listdir()` (`issue #4`_) * **Release 1.2.11 (2018-06-30)** * Добавлен недостающий параметр :code:`sort` для :code:`get_meta()` * Добавлены аттрибуты :code:`file` и :code:`antivirus_status` для :code:`ResourceObject`, :code:`PublicResourceObject` и :code:`TrashResourceObject` * Добавлен параметр :code:`headers` * Исправлена опечатка в :code:`download()` и :code:`download_public()` (`issue #2`_) * Убран параметр :code:`*args` * **Release 1.2.10 (2018-06-14)** * Исправлено поведение :code:`timeout=None`. :code:`None` должен означать „без таймаута“, но в предыдущих версиях значение :code:`None` было синонимично со стандартным таймаутом. * **Release 1.2.9 (2018-04-28)** * Изменена лицензия на LGPLv3 (см. :code:`COPYING` и :code:`COPYING.lesser`) * Другие изменения информации о пакете * **Release 1.2.8 (2018-04-17)** * Исправлено несколько опечаток: у :code:`PublicResourceListObject.items` и :code:`TrashResourceListObject.items` были неправильные типы данных * Псевдонимы полей в параметре :code:`fields` заменяются при выполнении запросов API (например, :code:`embedded` -> :code:`_embedded`) * **Release 1.2.7 (2018-04-15)** * Исправлен баг перемотки файла при загрузке/скачивании после повторной попытки * **Release 1.2.6 (2018-04-13)** * Теперь объекты сессий :code:`requests` кэшируются, чтобы их можно было переиспользовать (иногда может существенно ускорить выполнение запросов) * :code:`keep-alive` отключается при загрузке/скачивании файлов по умолчанию * **Release 1.2.5 (2018-03-31)** * Исправлен баг (ошибка на единицу) в :code:`utils.auto_retry()` (иногда мог вызвать :code:`AttributeError`) * Повторные попытки применяются для :code:`upload()`, :code:`download()` и :code:`download_public()` целиком * Задано :code:`stream=True` для :code:`download()` и :code:`download_public()` * Другие мелкие исправления * **Release 1.2.4 (2018-02-19)** * Исправлена опечатка (:code:`TokenObject.exprires_in` -> :code:`TokenObject.expires_in`) * **Release 1.2.3 (2018-01-20)** * Исправлено :code:`TypeError` при вызове :code:`WrongResourceTypeError` * **Release 1.2.2 (2018-01-19)** * :code:`refresh_token()` больше не требует валидный или пустой токен. * **Release 1.2.1 (2018-01-14)** * Исправлена неработоспособность повторных попыток. * **Release 1.2.0 (2018-01-14)** * Исправлено использование :code:`n_retries=0` в :code:`upload()`, :code:`download()` и :code:`download_public()` * :code:`upload()`, :code:`download()` и :code:`download_public()` больше не возвращают ничего (см. документацию) * Добавлен модуль :code:`utils` (см. документацию) * Добавлены :code:`RetriableYaDiskError`, :code:`WrongResourceTypeError`, :code:`BadGatewayError` и :code:`GatewayTimeoutError` * :code:`listdir()` теперь вызывает :code:`WrongResourceTypeError` вместо :code:`NotADirectoryError` * **Release 1.1.1 (2017-12-29)** * Исправлена обработка аргументов в :code:`upload()`, :code:`download()` и :code:`download_public()`. До этого использование :code:`n_retries` и :code:`retry_interval` вызывало исключение (:code:`TypeError`). * **Release 1.1.0 (2017-12-27)** * Усовершенствованные исключения (см. документацию) * Добавлена поддержка параметра :code:`force_async` * Мелкие исправления багов * **Release 1.0.8 (2017-11-29)** * Исправлен ещё один баг в :code:`listdir()` * **Release 1.0.7 (2017-11-04)** * Добавлен :code:`install_requires` в :code:`setup.py` * **Release 1.0.6 (2017-11-04)** * Некоторые функции теперь возвращают :code:`OperationLinkObject` * **Release 1.0.5 (2017-10-29)** * Исправлен :code:`setup.py`, теперь исключает тесты * **Release 1.0.4 (2017-10-23)** * Исправлены баги в :code:`upload`, :code:`download` и :code:`listdir` * Значение по-умолчанию :code:`limit` в :code:`listdir` установлено в :code:`10000` * **Release 1.0.3 (2017-10-22)** * Добавлен модуль :code:`settings` * **Release 1.0.2 (2017-10-19)** * Исправлена функция :code:`get_code_url` (добавлены недостающие параметры) * **Release 1.0.1 (2017-10-18)** * Исправлен серьёзный баг в :code:`GetTokenRequest` (добавлен недостающий параметр) * **Release 1.0.0 (2017-10-18)** * Первый релиз ================================================ FILE: README.ru.rst ================================================ YaDisk ====== .. |RTD Badge| image:: https://img.shields.io/readthedocs/yadisk.svg :alt: Read the Docs :target: https://yadisk.readthedocs.io/ru/latest/ .. |CI Badge| image:: https://img.shields.io/github/actions/workflow/status/ivknv/yadisk/lint_and_test.yml :alt: GitHub Actions Workflow Status .. |PyPI Badge| image:: https://img.shields.io/pypi/v/yadisk.svg :alt: PyPI :target: https://pypi.org/project/yadisk .. |Python Version Badge| image:: https://img.shields.io/pypi/pyversions/yadisk :alt: PyPI - Python Version .. |Coverage Badge| image:: https://coveralls.io/repos/github/ivknv/yadisk/badge.svg?branch=master :alt: Coverage :target: https://coveralls.io/github/ivknv/yadisk |RTD Badge| |CI Badge| |PyPI Badge| |Python Version Badge| |Coverage Badge| .. _English version of this document: https://github.com/ivknv/yadisk/blob/master/README.en.rst `English version of this document`_ YaDisk - это библиотека-клиент REST API Яндекс.Диска. .. _Read the Docs (EN): https://yadisk.readthedocs.io .. _Read the Docs (RU): https://yadisk.readthedocs.io/ru/latest Документация доступна на `Read the Docs (RU)`_ и `Read the Docs (EN)`_. .. contents:: Содержание: Установка ********* :code:`yadisk` поддерживает несколько HTTP библиотек и реализует одновременно как синхронный, так и асинхронный API. На данный момент поддерживаются следующие HTTP библиотеки: * :code:`requests` (используется по умолчанию для синхронного API) * :code:`httpx` (синхронный и асинхронный API, используется по умолчанию для асинхронного API) * :code:`aiohttp` (асинхронный API) * :code:`pycurl` (синхронный API) Для синхронного API (устанавливает :code:`requests`): .. code:: bash pip install yadisk[sync-defaults] Для асинхронного API (устанавливает :code:`httpx` и :code:`aiofiles`): .. code:: bash pip install yadisk[async-defaults] Вы можете также вручную установить нужные библиотеки: .. code:: bash # Для использования совместно с pycurl pip install yadisk[pycurl] # Для использования совместно с aiohttp, также установит aiofiles pip install yadisk[async-files,aiohttp] Примеры ******* Синхронный API -------------- .. code:: python import yadisk client = yadisk.Client(token="<токен>") # или # client = yadisk.Client("", "", "<токен>") # Вы можете использовать либо конструкцию with, либо вручную вызвать client.close() в конце with client: # Проверяет, валиден ли токен print(client.check_token()) # Получает общую информацию о диске print(client.get_disk_info()) # Выводит содержимое "/some/path" print(list(client.listdir("/some/path"))) # Загружает "file_to_upload.txt" в "/destination.txt" client.upload("file_to_upload.txt", "/destination.txt") # То же самое with open("file_to_upload.txt", "rb") as f: client.upload(f, "/destination.txt") # Скачивает "/some-file-to-download.txt" в "downloaded.txt" client.download("/some-file-to-download.txt", "downloaded.txt") # Безвозвратно удаляет "/file-to-remove" client.remove("/file-to-remove", permanently=True) # Создаёт новую папку "/test-dir" print(client.mkdir("/test-dir")) Асинхронный API --------------- .. code:: python import yadisk import aiofiles client = yadisk.AsyncClient(token="") # или # client = yadisk.AsyncClient("", "", "") # Вы можете использовать либо конструкцию with, либо вручную вызвать client.close() в конце async with client: # Проверяет, валиден ли токен print(await client.check_token()) # Получает общую информацию о диске print(await client.get_disk_info()) # Выводит содержимое "/some/path" print([i async for i in client.listdir("/some/path")]) # Загружает "file_to_upload.txt" в "/destination.txt" await client.upload("file_to_upload.txt", "/destination.txt") # То же самое async with aiofiles.open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # То же самое, но с обычными файлами with open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Скачивает "/some-file-to-download.txt" в "downloaded.txt" await client.download("/some-file-to-download.txt", "downloaded.txt") # То же самое async with aiofiles.open("downloaded.txt", "wb") as f: await client.download("/some-file-to-download.txt", f) # Безвозвратно удаляет "/file-to-remove" await client.remove("/file-to-remove", permanently=True) # Создаёт новую папку "/test-dir" print(await client.mkdir("/test-dir")) Участие в разработке ******************** Если вы хотите поучаствовать в разработке, см. `CONTRIBUTING.rst `_. История изменений ***************** .. _issue #2: https://github.com/ivknv/yadisk/issues/2 .. _issue #4: https://github.com/ivknv/yadisk/issues/4 .. _issue #7: https://github.com/ivknv/yadisk/issues/7 .. _issue #23: https://github.com/ivknv/yadisk/issues/23 .. _issue #26: https://github.com/ivknv/yadisk/issues/26 .. _issue #28: https://github.com/ivknv/yadisk/issues/28 .. _issue #29: https://github.com/ivknv/yadisk/issues/29 .. _PR #31: https://github.com/ivknv/yadisk/pull/31 .. _issue #43: https://github.com/ivknv/yadisk/issues/43 .. _issue #45: https://github.com/ivknv/yadisk/issues/45 .. _issue #49: https://github.com/ivknv/yadisk/issues/49 .. _issue #53: https://github.com/ivknv/yadisk/issues/53 .. _Введение: https://yadisk.readthedocs.io/ru/latest/intro.html .. _Справочник API: https://yadisk.readthedocs.io/ru/latest/api_reference/index.html .. _Доступные реализации сессий: https://yadisk.readthedocs.io/ru/latest/api_reference/sessions.html .. _Интерфейс Session: https://yadisk.readthedocs.io/ru/latest/api_reference/session_interface.html .. _requests: https://pypi.org/project/requests .. _Руководство по миграции: https://yadisk.readthedocs.io/ru/latest/migration_guide.html .. _PR #57: https://github.com/ivknv/yadisk/pull/57 .. _issue #62: https://github.com/ivknv/yadisk/issues/62 * **Release 3.4.1 (2026-04-16)** * Исправления: * Исправлена ошибка :code:`TypeError` при передаче пути к файлу в :code:`AsyncClient.download()` или :code:`AsyncClient.upload()` без установленного :code:`aiofiles` (см. `issue #62`_) * Обход проблемы, когда Яндекс.Диск игнорирует тело запроса для :code:`Client.patch()` и :code:`Client.update_public_settings()` при использовании :code:`pycurl` из-за задания заголовка :code:`Transfer-Encoding: chunked` по умолчанию * **Release 3.4.0 (2025-07-10)** * Нововведения: * Добавлены методы для управления настройками публичного доступа к ресурсам: * :code:`Client.update_public_settings()` * :code:`Client.get_public_settings()` * :code:`Client.get_public_available_settings()` Внимание: похоже, что эти эндпоинты не полностью соответствуют официальной документации REST API, их функциональность на практике ограничена. * Добавлен новый класс исключений :code:`PasswordRequiredError` * Добавлено несколько новых полей :code:`DiskInfoObject`: * :code:`deletion_restricion_days` * :code:`hide_screenshots_in_photoslice` * :code:`is_legal_entity` * Реализован метод :code:`__dir__()` для объектов ответов сервера * Улучшения: * :code:`repr()` объектов ответов API теперь показывает только те ключи, которые фактически присутствуют (вместо отображения их значений как :code:`None`, как раньше) * **Release 3.3.0 (2025-04-29)** * Нововведения: * Спуфинг User-Agent для обхода ограничения скорости загрузки файлов на Диск (см. `PR #57`_). :code:`Client.upload()` и связанные с ним методы (включая :code:`AsyncClient`) имеют новый опциональный параметр :code:`spoof_user_agent`, который по умолчанию имеет значение :code:`True`. Этот параметр можно использовать для отключения спуфинга, если это необходимо. * Добавлена поддержка pretty-printing в IPython для :code:`YaDiskObject` и производных классов * Исправления: * :code:`Client.wait_for_operation()` теперь использует :code:`time.monotonic()` вместо :code:`time.time()` * Улучшения: * Сообщения об ошибках REST API теперь чётко разделены на четыре части (сообщение, описание, код ошибки и код состояния HTTP) * **Release 3.2.0 (2025-02-03)** * Нововведения: * Добавлен новый метод: :code:`Client.makedirs()` и :code:`AsyncClient.makedirs()` (см. `issue #53`_) * Добавлено несколько недостающих полей :code:`DiskInfoObject` * :code:`photounlim_size` * :code:`will_be_overdrawn` * :code:`free_photounlim_end_date` * :code:`payment_flow` * Добавлено недостающее поле :code:`sizes` для :code:`ResourceObject` и связанных с ним объектов * Исправления: * :code:`Client.rename()` / :code:`AsyncClient.rename()` теперь вызывает :code:`ValueError` при попытке переименовать корневую папку * Номера автоматических повторных попыток логировались с ошибкой на единицу, теперь они логируются правильно * **Release 3.1.0 (2024-07-12)** * Нововведения: * Добавлены новые исключения: :code:`GoneError` и :code:`ResourceDownloadLimitExceededError` * Добавлен новый метод: :code:`Client.get_all_public_resources()` и :code:`AsyncClient.get_all_public_resources()` * Исправления: * Задание :code:`headers` и других опциональных параметров сессии как :code:`None` больше не вызывает ошибок * Исправлено неправильное поведение :code:`Client.rename()` и :code:`AsyncClient.rename()` при указании пустого имени файла * Исправлено несколько опечаток в асинхронных реализациях convenience-методов (:code:`listdir()` и аналогичных) * Исправлен неправильный тип данных у атрибута :code:`items` класса :code:`PublicResourceListObject` * Исправлены ошибки при отправке запросов API с помощью :code:`PycURLSession` при задании :code:`stream=True` * Данные не будут записаны в файл методами :code:`Client.download()`, :code:`Client.download_by_link()`, :code:`AsyncClient.download()` и :code:`AsyncClient.download_by_link()`, если сервер вернул ошибочный код состояния * **Release 3.0.1 (2024-07-09)** * Исправлен сломанный :code:`pyproject.toml`, который не включал в сборку полное содержимое пакета (см. `issue #49`_) * **Release 3.0.0 (2024-07-09)** * Несовместимые изменения: - См. `Руководство по миграции`_ для подробностей - Все методы теперь ожидают завершения асинхронных операций по умолчанию (см. новый параметр :code:`wait=`) - Итерация по результату :code:`AsyncClient.listdir()` больше не требует дополнительного ключевого слова await - Число возвращаемых файлов :code:`Client.get_files()` / :code:`AsyncClient.get_files()` теперь контролируется параметром :code:`max_items`, вместо :code:`limit` - Методы :code:`set_token()`, :code:`set_headers()` интерфейсов :code:`Session` и :code:`AsyncSession` были удалены - Некоторые методы больше не принимают параметр :code:`fields` - :code:`Client.get_last_uploaded()` / :code:`AsyncClient.get_last_uploaded()` теперь возвращает список вместо генератора - :code:`yadisk.api` - теперь скрытый модуль - Все скрытые модули были переименованы, их имена начинаются с :code:`_` (например, :code:`yadisk._api`) * Нововведения: - Добавлены методы для ожидания завершения асинхронной операции (см. :code:`Client.wait_for_operation()` / :code:`AsyncClient.wait_for_operation()`) - Методы, которые могут запускать асинхронную операцию, теперь принимают дополнительные параметры: :code:`wait: bool = True`, :code:`poll_interval: float = 1.0` и :code:`poll_timeout: Optional[float] = None` - :code:`Client.listdir()`, :code:`Client.get_files()` и их асинхронные вариации теперь принимают новый параметр :code:`max_items: Optional[int] = None`, который может быть использован, чтобы ограничить максимальное число возвращаемых файлов - Большинство методов :code:`Client` и :code:`AsyncClient` теперь принимает :code:`retry_on: Optional[Tuple[Type[Exception], ...]] = None`, который позволяет указывать кортеж из дополнительных исключений, которые могут вызвать автоматическую повторную попытку - Модуль :code:`yadisk.types` - теперь публичный - Добавлено логирование исходящих запросов к API и автоматических повторных попыток - Объект логгера библиотеки доступен как :code:`yadisk.settings.logger` - Добавлен метод :code:`YaDiskObject.field()` и оператор :code:`@` (:code:`YaDiskObject.__matmul__()`), который удостоверяется, что указанное поле объекта не является :code:`None` - Добавлены методы :code:`Client.get_upload_link_object()`, :code:`AsyncClient.get_upload_link_object()`, возвращаемые значения которых дополнительно содержат :code:`operation_id` - :code:`utils.auto_retry()` теперь принимает больше параметров - Добавлено несколько недостающих полей :code:`DiskInfoObject` - :code:`EXIFObject` теперь содержит GPS-координаты - :code:`CaseInsensitiveDict` - теперь часть :code:`yadisk.utils` * Улучшения: - Добавлены полные подсказки типов для :code:`Client` и :code:`AsyncClient` с помощью файлов :code:`.pyi` - Строки документации для :code:`Client` / :code:`AsyncClient` теперь включают в себя больше параметров - Ошибки во время обработки JSON (например, :code:`InvalidResponseError`) также вызывают автоматические повторные попытки - Сообщение об ошибке в случае, когда модуль сессии по умолчанию недоступен, теперь не вводит в заблуждение (см. `issue #43`_) - Уменьшено значение :code:`limit` до :code:`500` (было :code:`10000`) для :code:`Client.listdir()` для избежания таймаутов при больших папках (см. `issue #45`_) - Уменьшено значение :code:`limit` до :code:`200` (было :code:`1000`) для :code:`Client.get_files()` для избежания таймаутов - :code:`Client.download()` и подобные методы больше не задают заголовок :code:`Connection: close` т.к. в этом нет необходимости (в отличие от :code:`Client.upload()`) - :code:`UnknownYaDiskError` теперь включает код статуса в сообщение об ошибке * Исправления: - Исправлены реализации на основе :code:`httpx` и :code:`aiohttp`: реализации методов :code:`Response.json()` / :code:`AsyncResponse.json()` не преобразовывали свои исключения в :code:`RequestError` - Исправлено: параметр :code:`stream=True` был не задан по умолчанию в :code:`AsyncClient.download()`, :code:`AsyncClient.download_public()` * Другие изменения: - :code:`typing_extensions` теперь требуется для Python < 3.10 * **Release 2.1.0 (2024-01-03)** * Исправлен баг, из-за которого параметры в теле POST-запроса неправильно кодировались * Исправлен баг в :code:`PycURLSession.send_request()`, из-за которого переданные заголовки игнорировались * :code:`RequestsSession.close()` теперь закрывает сессию для всех потоков * Все методы :code:`Client` и :code:`AsyncClient` теперь используют существующую сессию * Удалены аттрибут :code:`session_factory` и метод :code:`make_session()` классов :code:`Client` и :code:`AsyncClient` * Класс сессии теперь может быть указан в качестве строки (см. :code:`Client`/:code:`AsyncClient`) * Добавлены методы :code:`Client.get_device_code()`/:code:`AsyncClient.get_device_code()` * Добавлены методы :code:`Client.get_token_from_device_code()`/:code:`AsyncClient.get_token_from_device_code()` * Добавлен недостающий параметр :code:`redirect_uri` для :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()` и :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` * Добавлена поддержка параметров PKCE для :code:`Client.get_auth_url()`/:code:`AsyncClient.get_auth_url()`, :code:`Client.get_code_url()`/:code:`AsyncClient.get_code_url()` и :code:`Client.get_token()`/:code:`AsyncClient.get_token()` * Добавлен аттрибут :code:`scope` для :code:`TokenObject` * Добавлены новые классы исключений: :code:`InvalidClientError`, :code:`InvalidGrantError`, :code:`AuthorizationPendingError`, :code:`BadVerificationCodeError` и :code:`UnsupportedTokenTypeError` * **Release 2.0.0 (2023-12-12)** * Библиотека теперь предоставляет как синхронный, так и асинхронный API (см. `Введение`_ и `Справочник API`_) * Теперь поддерживается несколько HTTP библиотек (см. `Доступные реализации сессий`_ для полного списка) * Теперь возможно добавить поддержку любой HTTP библиотеки (см. `Интерфейс Session`_) * `requests`_ - теперь опциональная зависимость (хотя всё ещё используется по умолчанию для синхронного API) * Обратите внимание, что аргументы, специфичные для requests теперь передаются по другому (см. `Доступные реализации сессий`_) * Предпочитаемые HTTP библиотеки теперь должны быть установлены явным образом (см. `Введение`_) * :code:`Client.upload()` и :code:`Client.upload_by_link()` теперь могут принимать функцию, возвращающую итератор (или генератор) в качестве полезной нагрузки * **Release 1.3.4 (2023-10-15)** * Методы :code:`upload()` и :code:`download()` (и связянные с ними) теперь могут загружать/скачивать файлы, не поддерживающие операцию :code:`seek()` (например, :code:`stdin` и :code:`stdout`, при условии, что они открыты в режиме :code:`"rb"` или :code:`"wb"`), см. `PR #31`_ * **Release 1.3.3 (2023-04-22)** * Пути вида :code:`app:/` теперь работают правильно (см. `issue #26`_) * **Release 1.3.2 (2023-03-20)** * Исправлено `issue #29`_: TypeError: 'type' object is not subscriptable * **Release 1.3.1 (2023-02-28)** * Исправлено `issue #28`_: :code:`TypeError` при вызове :code:`download_public()` с параметром :code:`path` * Исправлено :code:`AttributeError` при вызове :code:`ResourceLinkObject.public_listdir()` * **Release 1.3.0 (2023-01-30)** * Добавлены convenience-методы для объектов :code:`...Object` (например, см. :code:`ResourceObject`) * Добавлены подсказки типов (type hints) * Улучшены проверки ошибок и проверка ответа * Добавлены :code:`InvalidResponseError`, :code:`PayloadTooLargeError`, :code:`UploadTrafficLimitExceededError` * Добавлено несколько недостающих полей объектов :code:`DiskInfoObject` и :code:`SystemFoldersObject` * Добавлены методы :code:`rename()`, :code:`upload_by_link()` и :code:`download_by_link()` * Добавлен аттрибут :code:`default_args` объекта :code:`YaDisk` * :code:`download()` и :code:`upload()` теперь возвращают :code:`ResourceLinkObject` * До этого возвращаемые объекты :code:`LinkObject` были заменены более конкретными подклассами * :code:`ConnectionError` теперь тоже вызывает повторную попытку * **Release 1.2.19 (2023-01-20)** * Исправлено неправильное поведение фикса из 1.2.18 для путей :code:`disk:` и :code:`trash:`. * **Release 1.2.18 (2023-01-20)** * Исправлено `issue #26`_: символ ':' в именах файлов приводит к :code:`BadRequestError`. Это поведение вызвано работой самого REST API Яндекс.Диска, но было исправлено на уровне библиотеки. * **Release 1.2.17 (2022-12-11)** * Исправлен баг, связанный с автоматическим закрытием сессии. Использование метода :code:`__del__()` приводило в некоторых случаях к ошибке :code:`ReferenceError` (ошибка игнорировалась, но сообщение выводилось). Баг проявляется по большей части в старых версиях Python (например 3.4). * **Release 1.2.16 (2022-08-17)** * Исправлен баг в :code:`check_token()`: функция могла вызвать :code:`ForbiddenError`, если у приложения недостатчно прав (`issue #23`_). * **Release 1.2.15 (2021-12-31)** * Исправлено: не распознавались ссылки на асинхронные операции, если они использовали :code:`http://` (вместо :code:`https://`). Иногда Яндекс.Диск может вернуть :code:`http://` ссылку на асинхронную операцию. Теперь обе версии ссылок распознаются правильно, при этом, при получении информации об операции (через :code:`get_operation_status()`) всегда используется :code:`https://` версия ссылки, даже если Яндекс.Диск вернул :code:`http://`. * **Release 1.2.14 (2019-03-26)** * Исправлена ошибка :code:`TypeError` в функциях :code:`get_public_*` при использовании с параметром :code:`path` (`issue #7`_) * Добавлен аттрибут :code:`unlimited_autoupload_enabled` для :code:`DiskInfoObject` * **Release 1.2.13 (2019-02-23)** * Добавлен :code:`md5` параметр для :code:`remove()` * Добавлен :code:`UserPublicInfoObject` * Добавлен аттрибут :code:`country` для :code:`UserObject` * Добавлен аттрибут :code:`photoslice_time` для :code:`ResourceObject`, :code:`PublicResourceObject` и :code:`TrashResourceObject` * **Release 1.2.12 (2018-10-11)** * Исправлен баг: не работает параметр `fields` в `listdir()` (`issue #4`_) * **Release 1.2.11 (2018-06-30)** * Добавлен недостающий параметр :code:`sort` для :code:`get_meta()` * Добавлены аттрибуты :code:`file` и :code:`antivirus_status` для :code:`ResourceObject`, :code:`PublicResourceObject` и :code:`TrashResourceObject` * Добавлен параметр :code:`headers` * Исправлена опечатка в :code:`download()` и :code:`download_public()` (`issue #2`_) * Убран параметр :code:`*args` * **Release 1.2.10 (2018-06-14)** * Исправлено поведение :code:`timeout=None`. :code:`None` должен означать „без таймаута“, но в предыдущих версиях значение :code:`None` было синонимично со стандартным таймаутом. * **Release 1.2.9 (2018-04-28)** * Изменена лицензия на LGPLv3 (см. :code:`COPYING` и :code:`COPYING.lesser`) * Другие изменения информации о пакете * **Release 1.2.8 (2018-04-17)** * Исправлено несколько опечаток: у :code:`PublicResourceListObject.items` и :code:`TrashResourceListObject.items` были неправильные типы данных * Псевдонимы полей в параметре :code:`fields` заменяются при выполнении запросов API (например, :code:`embedded` -> :code:`_embedded`) * **Release 1.2.7 (2018-04-15)** * Исправлен баг перемотки файла при загрузке/скачивании после повторной попытки * **Release 1.2.6 (2018-04-13)** * Теперь объекты сессий :code:`requests` кэшируются, чтобы их можно было переиспользовать (иногда может существенно ускорить выполнение запросов) * :code:`keep-alive` отключается при загрузке/скачивании файлов по умолчанию * **Release 1.2.5 (2018-03-31)** * Исправлен баг (ошибка на единицу) в :code:`utils.auto_retry()` (иногда мог вызвать :code:`AttributeError`) * Повторные попытки применяются для :code:`upload()`, :code:`download()` и :code:`download_public()` целиком * Задано :code:`stream=True` для :code:`download()` и :code:`download_public()` * Другие мелкие исправления * **Release 1.2.4 (2018-02-19)** * Исправлена опечатка (:code:`TokenObject.exprires_in` -> :code:`TokenObject.expires_in`) * **Release 1.2.3 (2018-01-20)** * Исправлено :code:`TypeError` при вызове :code:`WrongResourceTypeError` * **Release 1.2.2 (2018-01-19)** * :code:`refresh_token()` больше не требует валидный или пустой токен. * **Release 1.2.1 (2018-01-14)** * Исправлена неработоспособность повторных попыток. * **Release 1.2.0 (2018-01-14)** * Исправлено использование :code:`n_retries=0` в :code:`upload()`, :code:`download()` и :code:`download_public()` * :code:`upload()`, :code:`download()` и :code:`download_public()` больше не возвращают ничего (см. документацию) * Добавлен модуль :code:`utils` (см. документацию) * Добавлены :code:`RetriableYaDiskError`, :code:`WrongResourceTypeError`, :code:`BadGatewayError` и :code:`GatewayTimeoutError` * :code:`listdir()` теперь вызывает :code:`WrongResourceTypeError` вместо :code:`NotADirectoryError` * **Release 1.1.1 (2017-12-29)** * Исправлена обработка аргументов в :code:`upload()`, :code:`download()` и :code:`download_public()`. До этого использование :code:`n_retries` и :code:`retry_interval` вызывало исключение (:code:`TypeError`). * **Release 1.1.0 (2017-12-27)** * Усовершенствованные исключения (см. документацию) * Добавлена поддержка параметра :code:`force_async` * Мелкие исправления багов * **Release 1.0.8 (2017-11-29)** * Исправлен ещё один баг в :code:`listdir()` * **Release 1.0.7 (2017-11-04)** * Добавлен :code:`install_requires` в :code:`setup.py` * **Release 1.0.6 (2017-11-04)** * Некоторые функции теперь возвращают :code:`OperationLinkObject` * **Release 1.0.5 (2017-10-29)** * Исправлен :code:`setup.py`, теперь исключает тесты * **Release 1.0.4 (2017-10-23)** * Исправлены баги в :code:`upload`, :code:`download` и :code:`listdir` * Значение по-умолчанию :code:`limit` в :code:`listdir` установлено в :code:`10000` * **Release 1.0.3 (2017-10-22)** * Добавлен модуль :code:`settings` * **Release 1.0.2 (2017-10-19)** * Исправлена функция :code:`get_code_url` (добавлены недостающие параметры) * **Release 1.0.1 (2017-10-18)** * Исправлен серьёзный баг в :code:`GetTokenRequest` (добавлен недостающий параметр) * **Release 1.0.0 (2017-10-18)** * Первый релиз ================================================ FILE: docs/Makefile ================================================ # Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx SPHINXPROJ = YaDisk SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ================================================ FILE: docs/api_reference/async_api.rst ================================================ Asynchronous API ================ .. autoclass:: yadisk.AsyncClient .. automethod:: close .. autoclass:: yadisk.AsyncYaDisk Authentication -------------- .. automethod:: yadisk.AsyncClient.check_token .. automethod:: yadisk.AsyncClient.get_auth_url .. automethod:: yadisk.AsyncClient.get_code_url .. automethod:: yadisk.AsyncClient.get_device_code .. automethod:: yadisk.AsyncClient.get_token .. automethod:: yadisk.AsyncClient.get_token_from_device_code .. automethod:: yadisk.AsyncClient.refresh_token .. automethod:: yadisk.AsyncClient.revoke_token Disk Info --------- .. automethod:: yadisk.AsyncClient.get_disk_info Metadata About Files -------------------- .. automethod:: yadisk.AsyncClient.get_meta .. automethod:: yadisk.AsyncClient.listdir .. automethod:: yadisk.AsyncClient.exists .. automethod:: yadisk.AsyncClient.get_type .. automethod:: yadisk.AsyncClient.is_file .. automethod:: yadisk.AsyncClient.is_dir .. automethod:: yadisk.AsyncClient.get_files .. automethod:: yadisk.AsyncClient.get_last_uploaded Uploading Files --------------- .. automethod:: yadisk.AsyncClient.upload .. automethod:: yadisk.AsyncClient.get_upload_link .. automethod:: yadisk.AsyncClient.get_upload_link_object .. automethod:: yadisk.AsyncClient.upload_by_link .. automethod:: yadisk.AsyncClient.upload_url Downloading Files ----------------- .. automethod:: yadisk.AsyncClient.download .. automethod:: yadisk.AsyncClient.get_download_link .. automethod:: yadisk.AsyncClient.download_by_link File Operations --------------- Creating Directories ^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.mkdir .. automethod:: yadisk.AsyncClient.makedirs Removing Files ^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.remove Copying Files ^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.copy Moving Files ^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.move .. automethod:: yadisk.AsyncClient.rename Setting Custom Properties ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.patch Public Files ------------ Publishing/Unpublishing Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.publish .. automethod:: yadisk.AsyncClient.unpublish Metadata About Public Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.get_public_meta .. automethod:: yadisk.AsyncClient.get_public_type .. automethod:: yadisk.AsyncClient.is_public_dir .. automethod:: yadisk.AsyncClient.is_public_file .. automethod:: yadisk.AsyncClient.public_exists Downloading Public Files ^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.get_public_download_link .. automethod:: yadisk.AsyncClient.download_public Saving Public Resources to Disk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.save_to_disk Listing Public Files ^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.AsyncClient.get_public_resources .. automethod:: yadisk.AsyncClient.get_all_public_resources Public Access Settings ---------------------- .. automethod:: yadisk.AsyncClient.get_public_settings .. automethod:: yadisk.AsyncClient.get_public_available_settings .. automethod:: yadisk.AsyncClient.update_public_settings Trash ----- .. automethod:: yadisk.AsyncClient.get_trash_meta .. automethod:: yadisk.AsyncClient.trash_exists .. automethod:: yadisk.AsyncClient.restore_trash .. automethod:: yadisk.AsyncClient.remove_trash .. automethod:: yadisk.AsyncClient.trash_listdir .. automethod:: yadisk.AsyncClient.get_trash_type .. automethod:: yadisk.AsyncClient.is_trash_dir .. automethod:: yadisk.AsyncClient.is_trash_file Checking Operation Status ------------------------- .. automethod:: yadisk.AsyncClient.get_operation_status .. automethod:: yadisk.AsyncClient.wait_for_operation ================================================ FILE: docs/api_reference/exceptions.rst ================================================ Exceptions ========== .. automodule:: yadisk.exceptions :members: :show-inheritance: ================================================ FILE: docs/api_reference/index.rst ================================================ API Reference ============= .. toctree:: :maxdepth: 1 :caption: Contents: sync_api async_api types sessions settings exceptions response_objects session_interface utilities ================================================ FILE: docs/api_reference/response_objects.rst ================================================ Response Objects ================ .. automodule:: yadisk.objects :members: :special-members: __matmul__ :show-inheritance: ================================================ FILE: docs/api_reference/session_interface.rst ================================================ Session Interface ================= The :any:`Session` and :any:`AsyncSession` are abstract classes that act as adapters to underlying HTTP client libraries. A session instance is used by :any:`Client` or :any:`AsyncClient` to perform all the HTTP requests to the Yandex.Disk API. These interfaces can be implemented to add support for any HTTP library. For a concrete example, see the source code of any existing implementation (e.g. :any:`HTTPXSession`). Synchronous ########### .. autoclass:: yadisk.Session :members: .. autoclass:: yadisk.Response :members: Asynchronous ############ .. autoclass:: yadisk.AsyncSession :members: .. autoclass:: yadisk.AsyncResponse :members: ================================================ FILE: docs/api_reference/sessions.rst ================================================ Available Session Implementations ================================= You can choose which HTTP library will be used by :any:`Client` and :any:`AsyncClient` by specifying the :code:`session` parameter. Below you can see the list of session implementations that are shipped with the :code:`yadisk` library. Alternatively, you can make your own :any:`Session`/:any:`AsyncSession` implementation. For a concrete example, take a look at the source code of any existing implementations (e.g. :any:`HTTPXSession`). Synchronous Implementations ########################### .. autoclass:: yadisk.sessions.requests_session.RequestsSession :show-inheritance: .. autoclass:: yadisk.sessions.httpx_session.HTTPXSession :show-inheritance: .. autoclass:: yadisk.sessions.pycurl_session.PycURLSession :show-inheritance: Asynchronous Implementations ############################ .. autoclass:: yadisk.sessions.aiohttp_session.AIOHTTPSession :show-inheritance: .. autoclass:: yadisk.sessions.async_httpx_session.AsyncHTTPXSession :show-inheritance: Importing Session Classes ######################### You can use the following functions to import a session class by name: .. autofunction:: yadisk.import_session .. autofunction:: yadisk.import_async_session ================================================ FILE: docs/api_reference/settings.rst ================================================ Settings ======== The following settings can be accessed and changed at runtime in `yadisk.settings` module: .. automodule:: yadisk.settings :members: :show-inheritance: ================================================ FILE: docs/api_reference/sync_api.rst ================================================ Synchronous API =============== .. autoclass:: yadisk.Client .. automethod:: close .. autoclass:: yadisk.YaDisk Authentication -------------- .. automethod:: yadisk.Client.check_token .. automethod:: yadisk.Client.get_auth_url .. automethod:: yadisk.Client.get_code_url .. automethod:: yadisk.Client.get_device_code .. automethod:: yadisk.Client.get_token .. automethod:: yadisk.Client.get_token_from_device_code .. automethod:: yadisk.Client.refresh_token .. automethod:: yadisk.Client.revoke_token Disk Info --------- .. automethod:: yadisk.Client.get_disk_info Metadata About Files -------------------- .. automethod:: yadisk.Client.get_meta .. automethod:: yadisk.Client.listdir .. automethod:: yadisk.Client.exists .. automethod:: yadisk.Client.get_type .. automethod:: yadisk.Client.is_file .. automethod:: yadisk.Client.is_dir .. automethod:: yadisk.Client.get_files .. automethod:: yadisk.Client.get_last_uploaded Uploading Files --------------- .. automethod:: yadisk.Client.upload .. automethod:: yadisk.Client.get_upload_link .. automethod:: yadisk.Client.get_upload_link_object .. automethod:: yadisk.Client.upload_by_link .. automethod:: yadisk.Client.upload_url Downloading Files ----------------- .. automethod:: yadisk.Client.download .. automethod:: yadisk.Client.get_download_link .. automethod:: yadisk.Client.download_by_link File Operations --------------- Creating Directories ^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.mkdir .. automethod:: yadisk.Client.makedirs Removing Files ^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.remove Copying Files ^^^^^^^^^^^^^ .. automethod:: yadisk.Client.copy Moving Files ^^^^^^^^^^^^ .. automethod:: yadisk.Client.move .. automethod:: yadisk.Client.rename Setting Custom Properties ^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.patch Public Files ------------ Publishing/Unpublishing Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.publish .. automethod:: yadisk.Client.unpublish Metadata About Public Files ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.get_public_meta .. automethod:: yadisk.Client.get_public_type .. automethod:: yadisk.Client.is_public_dir .. automethod:: yadisk.Client.is_public_file .. automethod:: yadisk.Client.public_exists Downloading Public Files ^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.get_public_download_link .. automethod:: yadisk.Client.download_public Saving Public Resources to Disk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.save_to_disk Listing Public Files ^^^^^^^^^^^^^^^^^^^^ .. automethod:: yadisk.Client.get_public_resources .. automethod:: yadisk.Client.get_all_public_resources Public Access Settings ---------------------- .. automethod:: yadisk.Client.get_public_settings .. automethod:: yadisk.Client.get_public_available_settings .. automethod:: yadisk.Client.update_public_settings Trash ----- .. automethod:: yadisk.Client.get_trash_meta .. automethod:: yadisk.Client.trash_exists .. automethod:: yadisk.Client.restore_trash .. automethod:: yadisk.Client.remove_trash .. automethod:: yadisk.Client.trash_listdir .. automethod:: yadisk.Client.get_trash_type .. automethod:: yadisk.Client.is_trash_dir .. automethod:: yadisk.Client.is_trash_file Checking Operation Status ------------------------- .. automethod:: yadisk.Client.get_operation_status .. automethod:: yadisk.Client.wait_for_operation ================================================ FILE: docs/api_reference/types.rst ================================================ Types ===== .. automodule:: yadisk.types :members: :show-inheritance: ================================================ FILE: docs/api_reference/utilities.rst ================================================ Utilities ========= .. automodule:: yadisk.utils :members: ================================================ FILE: docs/changelog.rst ================================================ Changelog ========= .. _issue #2: https://github.com/ivknv/yadisk/issues/2 .. _issue #4: https://github.com/ivknv/yadisk/issues/4 .. _issue #7: https://github.com/ivknv/yadisk/issues/7 .. _issue #23: https://github.com/ivknv/yadisk/issues/23 .. _issue #26: https://github.com/ivknv/yadisk/issues/26 .. _issue #28: https://github.com/ivknv/yadisk/issues/28 .. _issue #29: https://github.com/ivknv/yadisk/issues/29 .. _PR #31: https://github.com/ivknv/yadisk/pull/31 .. _issue #43: https://github.com/ivknv/yadisk/issues/43 .. _issue #45: https://github.com/ivknv/yadisk/issues/45 .. _issue #49: https://github.com/ivknv/yadisk/issues/49 .. _issue #53: https://github.com/ivknv/yadisk/issues/53 .. _requests: https://pypi.org/project/requests .. _PR #57: https://github.com/ivknv/yadisk/pull/57 .. _issue #62: https://github.com/ivknv/yadisk/issues/62 .. role:: python(code) :language: python * **Release 3.4.1 (2026-04-16)** * Bug fixes: * Fixed a :code:`TypeError` when passing a file path to :any:`AsyncClient.download()` or :any:`AsyncClient.upload()` while not having :code:`aiofiles` installed (see `issue #62`_) * Work around Yandex.Disk ignoring request body for :any:`Client.patch()` and :any:`Client.update_public_settings()` when using :code:`pycurl` due to setting :code:`Transfer-Encoding: chunked` by default * **Release 3.4.0 (2025-07-10)** * New features: * Added methods for managing public settings of resources: * :any:`Client.update_public_settings()` * :any:`Client.get_public_settings()` * :any:`Client.get_public_available_settings()` Note, it appears that these API endpoints do not fully conform to the official REST API documentation, their functionality is limited in practice. * Added new exception class :any:`PasswordRequiredError` * Added several new fields for :any:`DiskInfoObject`: * :code:`deletion_restricion_days` * :code:`hide_screenshots_in_photoslice` * :code:`is_legal_entity` * Implemented the :code:`__dir__()` method for response objects * Improvements: * :code:`repr()` of API response objects now only shows the keys that are actually present (instead of displaying them as :code:`None` like before) * **Release 3.3.0 (2025-04-29)** * New features: * User-Agent spoofing to bypass Yandex.Disk's upload speed limit (see `PR #57`_). :any:`Client.upload()` and related methods (including :any:`AsyncClient`) have a new optional parameter :code:`spoof_user_agent`, which is set to :code:`True` by default. This parameter can be used to disable User-Agent spoofing if necessary. * Added IPython's pretty printing support for :any:`YaDiskObject` and derived classes * Bug fixes: * :any:`Client.wait_for_operation()` now uses :code:`time.monotonic()` instead of :code:`time.time()` * Improvements: * REST API error messages are now clearly divided into four parts (message, description, error code and HTTP status code) * **Release 3.2.0 (2025-02-03)** * New features: * Added new method: :any:`Client.makedirs()` / :any:`AsyncClient.makedirs()` (see `issue #53`_) * Added several missing fields for :any:`DiskInfoObject`: * :code:`photounlim_size` * :code:`will_be_overdrawn` * :code:`free_photounlim_end_date` * :code:`payment_flow` * Added missing field :code:`sizes` for :any:`ResourceObject` and related objects * Bug fixes: * :any:`Client.rename()` / :any:`AsyncClient.rename()` now raises :any:`ValueError` on attempt to rename the root directory * Automatic retry attempt numbers were logged off by one, now they are logged correctly * **Release 3.1.0 (2024-07-12)** * New features: * Added new exception classes: :any:`GoneError` and :any:`ResourceDownloadLimitExceededError` * Added a new method: :any:`Client.get_all_public_resources()` and :any:`AsyncClient.get_all_public_resources()` * Bug fixes: * Fixed setting :code:`headers` and session arguments to :code:`None` causing errors * Fixed incorrect handling of empty filename in :any:`Client.rename()` and :any:`AsyncClient.rename()` * Fixed several typos in async convenience method implementations (:code:`listdir()` and related) * Fixed :any:`PublicResourceListObject` having the wrong type for its :code:`items` member * Fixed API requests not working with :any:`PycURLSession` when :code:`stream=True` is set * No data will be written to the output file by :any:`Client.download()`, :any:`Client.download_by_link()`, :any:`AsyncClient.download()` and :any:`AsyncClient.download_by_link()` if the server returns a bad status code * **Release 3.0.1 (2024-07-09)** * Fixed broken :code:`pyproject.toml` that did not include full package contents (see `issue #49`_) * **Release 3.0.0 (2024-07-09)** * Breaking changes: - See :doc:`/migration_guide` for full details - All methods wait for asynchronous operations to complete by default (see the new :code:`wait=` parameter) - Iterating over the result of :any:`AsyncClient.listdir()` no longer requires the additional await keyword. - Number of returned items of :any:`Client.get_files()` / :any:`AsyncClient.get_files()` is now controlled by the :code:`max_items` parameter, rather than :code:`limit` - Methods :code:`set_token()`, :code:`set_headers()` of :any:`Session` and :any:`AsyncSession` were removed - Some methods no longer accept the :code:`fields` parameter - :any:`Client.get_last_uploaded()` / :any:`AsyncClient.get_last_uploaded()` now return a list instead of a generator - :code:`yadisk.api` is now a private module - All private modules were renamed to have names that start with :code:`_` (e.g, :code:`yadisk._api`) * New features: - Added methods to wait until an asynchronous operation completes (see :any:`Client.wait_for_operation()` / :any:`AsyncClient.wait_for_operation()`) - Methods that may start an asynchronous operation now accept additional parameters: :python:`wait: bool = True`, :python:`poll_interval: float = 1.0` and :python:`poll_timeout: Optional[float] = None` - :any:`Client.listdir()`, :any:`Client.get_files()` and their async variants now accept a new parameter :python:`max_items: Optional[int] = None`, which can be used to limit the maximum number of returned items - Most :any:`Client` and :any:`AsyncClient` methods now accept an optional parameter :python:`retry_on: Optional[Tuple[Type[Exception], ...]] = None`, which lets you specify a tuple of additional exceptions that can trigger an automatic retry - :any:`yadisk.types` module is now public - Added basic logging of outgoing API requests and automatic retries - The logger instance for the library can be accessed as :any:`yadisk.settings.logger` - Added :any:`YaDiskObject.field()` and the :code:`@` operator (:any:`YaDiskObject.__matmul__()`) which verify that the given field is not :code:`None` - Added :any:`Client.get_upload_link_object()`, :any:`AsyncClient.get_upload_link_object()` whose return values additionally contain :code:`operation_id` - :any:`utils.auto_retry()` now accepts more parameters - Added a few missing fields for :any:`DiskInfoObject` - :any:`EXIFObject` now contains GPS coordinates - :any:`CaseInsensitiveDict` is now part of :any:`yadisk.utils` * Improvements: - Added full type hints for :any:`Client`, :any:`AsyncClient` through :code:`.pyi` stub files - Docstrings for :any:`Client` / :any:`AsyncClient` now include more parameters - Errors during JSON processing (e.g. :any:`InvalidResponseError`) also trigger automatic retries - Error message when the default session module is not available is now less confusing (see `issue #43`_) - Reduced :any:`Client.listdir()`'s default :code:`limit` to :code:`500` from :code:`10000` to avoid timeouts on large directories (see `issue #45`_) - Reduced :any:`Client.get_files()`'s default :code:`limit` to :code:`200` from :code:`1000` to avoid timeouts - :any:`Client.download()` and similar methods no longer set :code:`Connection: close` header, since it's not necessary (unlike with :any:`Client.upload()`) - :any:`UnknownYaDiskError` now includes status code in the error message * Bug fixes: - Fixed :code:`httpx`- and :code:`aiohttp`-based session implementations not converting their exceptions to :any:`RequestError` in their :any:`Response.json()` / :any:`AsyncResponse.json()` implementations - Fixed :python:`stream=True` not being set by default in :any:`AsyncClient.download()`, :any:`AsyncClient.download_public()` * Other changes: - :code:`typing_extensions` is now required for Python < 3.10 * **Release 2.1.0 (2024-01-03)** * Fixed a bug where POST request parameters were not encoded correctly * Fixed a bug in :code:`PycURLSession.send_request()` that made it ignore passed headers * :code:`RequestsSession.close()` now closes all underlying session instances, instead of only the current thread-local one * All methods of :any:`Client` and :any:`AsyncClient` now use existing session * Removed :code:`session_factory` attribute and :code:`make_session()` method of :any:`Client` and :any:`AsyncClient` * Session class can now be specified as a string (see :any:`Client`/:any:`AsyncClient`) * Added :any:`Client.get_device_code()`/:any:`AsyncClient.get_device_code()` methods * Added :any:`Client.get_token_from_device_code()`/:any:`AsyncClient.get_token_from_device_code()` methods * Added missing :code:`redirect_uri` parameter for :any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()` and :any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()` * Added support for PKCE parameters for :any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()`, :any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()` and :any:`Client.get_token()`/:any:`AsyncClient.get_token()` * Added :code:`scope` attribute for :any:`TokenObject` * Added new exception classes: :any:`InvalidClientError`, :any:`InvalidGrantError`, :any:`AuthorizationPendingError`, :any:`BadVerificationCodeError` and :any:`UnsupportedTokenTypeError` * **Release 2.0.0 (2023-12-12)** * The library now provides both synchronous and asynchronous APIs (see :doc:`/intro` and :doc:`/api_reference/index`) * Multiple HTTP libraries are supported by default (see :doc:`/api_reference/sessions` for the full list) * It is now possible to add support for any HTTP library (see :doc:`/api_reference/session_interface`) * `requests`_ is now an optional dependency (although it's still used by default for synchronous API) * Note that now requests-specific arguments must be passed differently (see :doc:`/api_reference/sessions`) * Preferred HTTP client libraries must be explicitly installed now (see :doc:`/intro`) * :any:`Client.upload()` and :any:`Client.upload_by_link()` can now accept a function that returns an iterator (or a generator) as a payload * **Release 1.3.4 (2023-10-15)** * `upload()` and `download()` (and related) methods can now upload/download non-seekable file-like objects (e.g. `stdin` or `stdout` when open in binary mode), see `PR #31`_ * **Release 1.3.3 (2023-04-22)** * `app:/` paths now work correctly (see `issue #26`_) * **Release 1.3.2 (2023-03-20)** * Fixed `issue #29`_: TypeError: 'type' object is not subscriptable * **Release 1.3.1 (2023-02-28)** * Fixed `issue #28`_: calling `download_public()` with `path` keyword argument raises `TypeError` * Fixed `AttributeError` raised when calling `ResourceLinkObject.public_listdir()` * **Release 1.3.0 (2023-01-30)** * Added convenience methods to `...Object` objects (e.g. see `ResourceObject`) * Added type hints * Improved error checking and response validation * Added `InvalidResponseError`, `PayloadTooLargeError`, `UploadTrafficLimitExceededError` * Added a few missing fields to `DiskInfoObject` and `SystemFoldersObject` * Added `rename()`, `upload_by_link()` and `download_by_link()` methods * Added `default_args` field for `YaDisk` object * `download()` and `upload()` now return `ResourceLinkObject` * Returned `LinkObject` instances have been replaced by more specific subclasses * :any:`ConnectionError` now also triggers a retry * **Release 1.2.19 (2023-01-20)** * Fixed incorrect behavior of the fix from 1.2.18 for paths `disk:` and `trash:` (only these two). * **Release 1.2.18 (2023-01-20)** * Fixed `issue #26`_: ':' character in filenames causes `BadRequestError`. This is due the behavior of Yandex.Disk's REST API itself but is avoided on the library level with this fix. * **Release 1.2.17 (2022-12-11)** * Fixed a minor bug which could cause a `ReferenceError` (which would not cause a crash, but still show an error message). The bug involved using `__del__()` method in `SelfDestructingSession` to automatically close the sessions it seems to affect primarily old Python versions (such as 3.4). * **Release 1.2.16 (2022-08-17)** * Fixed a bug in `check_token()`: could throw `ForbiddenError` if the application lacks necessary permissions (`issue #23`_). * **Release 1.2.15 (2021-12-31)** * Fixed an issue where `http://` links were not recognized as operation links (they were assumed to always be `https://`, since all the other requests are always HTTPS). Occasionally, Yandex.Disk can for some reason return an `http://` link to an asynchronous operation instead of `https://`. Both links are now recognized correctly and an `https://` version will always be used by `get_operation_status()`, regardless of which one Yandex.Disk returned. * **Release 1.2.14 (2019-03-26)** * Fixed a `TypeError` in `get_public_*` functions when passing `path` parameter (see `issue #7`_) * Added `unlimited_autoupload_enabled` attribute for `DiskInfoObject` * **Release 1.2.13 (2019-02-23)** * Added `md5` parameter for `remove()` * Added `UserPublicInfoObject` * Added `country` attribute for `UserObject` * Added `photoslice_time` attribute for `ResourceObject`, `PublicResourceObject` and `TrashResourceObject` * **Release 1.2.12 (2018-10-11)** * Fixed `fields` parameter not working properly in `listdir()` (`issue #4`_) * **Release 1.2.11 (2018-06-30)** * Added the missing parameter `sort` for `get_meta()` * Added `file` and `antivirus_status` attributes for `ResourceObject`, `PublicResourceObject` and `TrashResourceObject` * Added `headers` parameter * Fixed a typo in `download()` and `download_public()` (`issue #2`_) * Removed `*args` parameter everywhere * **Release 1.2.10 (2018-06-14)** * Fixed `timeout=None` behavior. `None` is supposed to mean 'no timeout' but in the older versions it was synonymous with the default timeout. * **Release 1.2.9 (2018-04-28)** * Changed the license to LGPLv3 (see `COPYING` and `COPYING.lesser`) * Other package info updates * **Release 1.2.8 (2018-04-17)** * Fixed a couple of typos: `PublicResourceListObject.items` and `TrashResourceListObject.items` had wrong types * Substitute field aliases in `fields` parameter when performing API requests (e.g. `embedded` -> `_embedded`) * **Release 1.2.7 (2018-04-15)** * Fixed a file rewinding bug when uploading/downloading files after a retry * **Release 1.2.6 (2018-04-13)** * Now caching `requests` sessions so that open connections can be reused (which can significantly speed things up sometimes) * Disable `keep-alive` when uploading/downloading files by default * **Release 1.2.5 (2018-03-31)** * Fixed an off-by-one bug in `utils.auto_retry()` (which could sometimes result in `AttributeError`) * Retry the whole request for `upload()`, `download()` and `download_public()` * Set `stream=True` for `download()` and `download_public()` * Other minor fixes * **Release 1.2.4 (2018-02-19)** * Fixed `TokenObject` having `exprires_in` instead of `expires_in` (fixed a typo) * **Release 1.2.3 (2018-01-20)** * Fixed a `TypeError` when `WrongResourceTypeError` is raised * **Release 1.2.2 (2018-01-19)** * `refresh_token()` no longer requires a valid or empty token. * **Release 1.2.1 (2018-01-14)** * Fixed auto retries not working. Whoops. * **Release 1.2.0 (2018-01-14)** * Fixed passing `n_retries=0` to `upload()`, `download()` and `download_public()` * `upload()`, `download()` and `download_public()` no longer return anything (see the docs) * Added `utils` module (see the docs) * Added `RetriableYaDiskError`, `WrongResourceTypeError`, `BadGatewayError` and `GatewayTimeoutError` * `listdir()` now raises `WrongResourceTypeError` instead of `NotADirectoryError` * **Release 1.1.1 (2017-12-29)** * Fixed argument handling in `upload()`, `download()` and `download_public()`. Previously, passing `n_retries` and `retry_interval` would raise an exception (`TypeError`). * **Release 1.1.0 (2017-12-27)** * Better exceptions (see the docs) * Added support for `force_async` parameter * Minor bug fixes * **Release 1.0.8 (2017-11-29)** * Fixed yet another `listdir()` bug * **Release 1.0.7 (2017-11-04)** * Added `install_requires` argument to `setup.py` * **Release 1.0.6 (2017-11-04)** * Return `OperationLinkObject` in some functions * **Release 1.0.5 (2017-10-29)** * Fixed `setup.py` to exclude tests * **Release 1.0.4 (2017-10-23)** * Fixed bugs in `upload`, `download` and `listdir` functions * Set default `listdir` `limit` to `10000` * **Release 1.0.3 (2017-10-22)** * Added settings * **Release 1.0.2 (2017-10-19)** * Fixed `get_code_url` function (added missing parameters) * **Release 1.0.1 (2017-10-18)** * Fixed a major bug in `GetTokenRequest` (added missing parameter) * **Release 1.0.0 (2017-10-18)** * Initial release ================================================ FILE: docs/conf.py ================================================ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # YaDisk documentation build configuration file, created by # sphinx-quickstart on Sun Oct 1 19:06:55 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx'] intersphinx_mapping = {"python": ("https://docs.python.org/3", None), "requests": ("https://requests.readthedocs.io/en/latest", None), "aiohttp": ("https://docs.aiohttp.org/en/stable", None), "pycurl": ("http://pycurl.io/docs/latest", None)} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = 'YaDisk' copyright = '2026, Ivan Konovalov' author = 'Ivan Konovalov' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '3.4.1' # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars html_sidebars = { '**': [ 'about.html', 'navigation.html', 'relations.html', # needs 'show_related': True theme option to display 'searchbox.html', 'donate.html', ] } # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = 'YaDiskdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'YaDisk.tex', 'YaDisk Documentation', 'Ivan Konovalov', 'manual'), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'yadisk', 'YaDisk Documentation', [author], 1) ] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'YaDisk', 'YaDisk Documentation', author, 'YaDisk', 'One line description of project.', 'Miscellaneous'), ] ================================================ FILE: docs/index.rst ================================================ .. YaDisk documentation master file, created by sphinx-quickstart on Sun Oct 1 19:06:55 2017. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to YaDisk's documentation! ================================== .. toctree:: :maxdepth: 2 :caption: Contents: intro known_issues migration_guide api_reference/index changelog Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` ================================================ FILE: docs/intro.rst ================================================ Introduction ============ YaDisk is a Yandex.Disk REST API client library. Installation ************ :code:`yadisk` supports multiple HTTP client libraries and has both synchronous and asynchronous API. The following HTTP client libraries are currently supported: * :code:`requests` (used by default for synchronous API) * :code:`httpx` (both synchronous and asynchronous, used by default for asynchronous API) * :code:`aiohttp` (asynchronous only) * :code:`pycurl` (synchronous only) For synchronous API (installs :code:`requests`): .. code:: bash pip install yadisk[sync-defaults] For asynchronous API (installs :code:`aiofiles` and :code:`httpx`): .. code:: bash pip install yadisk[async-defaults] Alternatively, you can manually choose which optional libraries to install: .. code:: bash # For use with pycurl pip install yadisk[pycurl] # For use with aiohttp, will also install aiofiles pip install yadisk[async-files,aiohttp] Links to Official Yandex.Disk REST API Docs ******************************************* | `Official Yandex.Disk REST API Docs `__ | `Polygon `__ Examples ******** Synchronous API --------------- .. code:: python import yadisk client = yadisk.Client(token="") # or # client = yadisk.Client("", "", "") # You can either use the with statement or manually call client.close() later with client: # Check if the token is valid print(client.check_token()) # Get disk information print(client.get_disk_info()) # Print files and directories at "/some/path" print(list(client.listdir("/some/path"))) # Upload "file_to_upload.txt" to "/destination.txt" client.upload("file_to_upload.txt", "/destination.txt") # Same thing with open("file_to_upload.txt", "rb") as f: client.upload(f, "/destination.txt") # Download "/some-file-to-download.txt" to "downloaded.txt" client.download("/some-file-to-download.txt", "downloaded.txt") # Permanently remove "/file-to-remove" client.remove("/file-to-remove", permanently=True) # Create a new directory at "/test-dir" print(client.mkdir("/test-dir")) Receiving token with confirmation code ###################################### .. code:: python import sys import yadisk def main(): with yadisk.Client("application-id>", "") as client: url = client.get_code_url() print(f"Go to the following url: {url}") code = input("Enter the confirmation code: ") try: response = client.get_token(code) except yadisk.exceptions.BadRequestError: print("Bad code") return client.token = response.access_token if client.check_token(): print("Sucessfully received token!") else: print("Something went wrong. Not sure how though...") main() Recursive upload ################ .. code:: python import posixpath import os import yadisk def recursive_upload(client: yadisk.Client, from_dir: str, to_dir: str): for root, dirs, files in os.walk(from_dir): p = root.split(from_dir)[1].strip(os.path.sep) dir_path = posixpath.join(to_dir, p) try: client.mkdir(dir_path) except yadisk.exceptions.PathExistsError: pass for file in files: file_path = posixpath.join(dir_path, file) p_sys = p.replace("/", os.path.sep) in_path = os.path.join(from_dir, p_sys, file) try: client.upload(in_path, file_path) except yadisk.exceptions.PathExistsError: pass client = yadisk.Client(token="") to_dir = "/test" from_dir = "/home/ubuntu" recursive_upload(client, from_dir, to_dir) Setting custom properties of files ################################## .. code:: python import yadisk def main(): with yadisk.Client(token="") as client: path = input("Enter a path to patch: ") properties = {"speed_of_light": 299792458, "speed_of_light_units": "meters per second", "message_for_owner": "MWAHAHA! Your file has been patched by an evil script!"} meta = client.patch(path, properties) print("\nNew properties: ") for k, v in meta.custom_properties.items(): print(f"{k}: {repr(v)}") answer = input("\nWant to get rid of them? (y/[n]) ") if answer.lower() in ("y", "yes"): properties = {k: None for k in properties} client.patch(path, properties) print("Everything's back as usual") main() Emptying the trash bin ###################### .. code:: python import sys import yadisk def main(): answer = input("Are you sure about this? (y/[n]) ") if answer.lower() not in ("y", "yes"): print("Not going to do anything") return with yadisk.Client(token="") as client: print("Emptying the trash bin...") print("It might take a while...") client.remove_trash("/") print("Success!") main() Specifying HTTP client library ############################## .. code:: python import yadisk # Will use httpx for making requests with yadisk.Client(token="", session="httpx") as client: print(client.check_token()) Asynchronous API ---------------- .. code:: python import yadisk import aiofiles client = yadisk.AsyncClient(token="") # or # client = yadisk.AsyncClient("", "", "") # You can either use the with statement or manually call client.close() later async with client: # Check if the token is valid print(await client.check_token()) # Get disk information print(await client.get_disk_info()) # Print files and directories at "/some/path" print([i async for i in client.listdir("/some/path")]) # Upload "file_to_upload.txt" to "/destination.txt" await client.upload("file_to_upload.txt", "/destination.txt") # Same thing async with aiofiles.open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Same thing but with regular files with open("file_to_upload.txt", "rb") as f: await client.upload(f, "/destination.txt") # Download "/some-file-to-download.txt" to "downloaded.txt" await client.download("/some-file-to-download.txt", "downloaded.txt") # Same thing async with aiofiles.open("downloaded.txt", "wb") as f: await client.download("/some-file-to-download.txt", f) # Permanently remove "/file-to-remove" await client.remove("/file-to-remove", permanently=True) # Create a new directory at "/test-dir" print(await client.mkdir("/test-dir")) Receiving token with confirmation code ###################################### .. code:: python import asyncio import sys import yadisk async def main(): async with yadisk.AsyncClient("application-id>", "") as client: url = client.get_code_url() print(f"Go to the following url: {url}") code = input("Enter the confirmation code: ") try: response = await client.get_token(code) except yadisk.exceptions.BadRequestError: print("Bad code") return client.token = response.access_token if await client.check_token(): print("Sucessfully received token!") else: print("Something went wrong. Not sure how though...") asyncio.run(main()) Recursive upload ################ .. code:: python import asyncio import posixpath import os import yadisk async def recursive_upload(from_dir: str, to_dir: str, n_parallel_requests: int = 5): async with yadisk.AsyncClient(token="") as client: async def upload_files(queue): while queue: in_path, out_path = queue.pop(0) print(f"Uploading {in_path} -> {out_path}") try: await client.upload(in_path, out_path) except yadisk.exceptions.PathExistsError: print(f"{out_path} already exists") async def create_dirs(queue): while queue: path = queue.pop(0) print(f"Creating directory {path}") try: await client.mkdir(path) except yadisk.exceptions.PathExistsError: print(f"{path} already exists") mkdir_queue = [] upload_queue = [] print(f"Creating directory {to_dir}") try: await client.mkdir(to_dir) except yadisk.exceptions.PathExistsError: print(f"{to_dir} already exists") for root, dirs, files in os.walk(from_dir): rel_dir_path = root.split(from_dir)[1].strip(os.path.sep) rel_dir_path = rel_dir_path.replace(os.path.sep, "/") dir_path = posixpath.join(to_dir, rel_dir_path) for dirname in dirs: mkdir_queue.append(posixpath.join(dir_path, dirname)) for filename in files: out_path = posixpath.join(dir_path, filename) rel_dir_path_sys = rel_dir_path.replace("/", os.path.sep) in_path = os.path.join(from_dir, rel_dir_path_sys, filename) upload_queue.append((in_path, out_path)) tasks = [upload_files(upload_queue) for i in range(n_parallel_requests)] tasks.extend(create_dirs(mkdir_queue) for i in range(n_parallel_requests)) await asyncio.gather(*tasks) from_dir = input("Directory to upload: ") to_dir = input("Destination directory: ") asyncio.run(recursive_upload(from_dir, to_dir, 5)) Setting custom properties of files ################################## .. code:: python import asyncio import yadisk async def main(): async with yadisk.AsyncClient(token="") as client: path = input("Enter a path to patch: ") properties = {"speed_of_light": 299792458, "speed_of_light_units": "meters per second", "message_for_owner": "MWAHAHA! Your file has been patched by an evil script!"} meta = await client.patch(path, properties) print("\nNew properties: ") for k, v in meta.custom_properties.items(): print(f"{k}: {repr(v)}") answer = input("\nWant to get rid of them? (y/[n]) ") if answer.lower() in ("y", "yes"): properties = {k: None for k in properties} await client.patch(path, properties) print("Everything's back as usual") asyncio.run(main()) Emptying the trash bin ###################### .. code:: python import asyncio import sys import yadisk async def main(): answer = input("Are you sure about this? (y/[n]) ") if answer not in ("y", "yes"): print("Not going to do anything") return async with yadisk.AsyncClient(token="") as client: print("Emptying the trash bin...") print("It might take a while...") await client.remove_trash("/") print("Success!") asyncio.run(main()) Specifying HTTP client library ############################## .. code:: python import yadisk # Will use aiohttp for making requests async with yadisk.AsyncClient(token="", session="aiohttp") as client: print(await client.check_token()) ================================================ FILE: docs/known_issues.rst ================================================ Known Issues ============ Very Slow Upload of Certain Types of Files ########################################## Yandex.Disk's REST API limits upload speeds up to 128 KiB/s for certain MIME types of files. More specifically, throttling takes place based on value of :code:`media_type` (see :any:`yadisk.Client.get_meta`). It appears there are 3 types of media types that are throttled: 1) :code:`data` (.db, .dat, etc.) 2) :code:`compressed` (.zip, .gz, .tgz, .rar, .etc) 3) :code:`video` (.3gp, .mp4, .avi, etc.) This behavior of throttling is predetermined at the moment of requesting an upload link (with :any:`yadisk.Client.get_upload_link`). The content of the uploaded file does not matter. The reason why this problem cannot be observed when uploading through the official website, is that this throttling does not apply to internal services (the Yandex.Disk website uses an intermediate internal API to obtain upload links). While it is not clear what the purpose of this throttling is, it is certain at this point that this is not a bug. One workaround is to upload files with changed filename extensions (or without them entirely). For example, if you want to upload a file named :code:`"my_database.db"`, you can initially upload it under the name :code:`"my_database.some_other_extension"` and then rename it back to :code:`"my_database.db"`. Another workaround is to spoof user agent (see `PR#57 `_). Starting with version :code:`3.3.0`, the user agent is spoofed by default (see :any:`yadisk.Client.get_upload_link()`'s :code:`spoof_user_agent` parameter). Low Upload Speed on Windows When Using requests ############################################### .. _requests: https://pypi.org/project/requests .. _httpx: https://pypi.org/project/httpx If you use `requests`_ and experience low upload speeds on Windows, the reason might be due to Python's standard library internally using :code:`select()` to wait for sockets. The best way around it is to use a different HTTP library (e.g. `httpx`_, see :doc:`/api_reference/sessions`) ================================================ FILE: docs/locales/ru/LC_MESSAGES/api_reference.po ================================================ # api_reference/*.rst translations. # Copyright (C) 2025, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2025. # msgid "" msgstr "" "Project-Id-Version: YaDisk 3.4.0\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2025-07-10 18:15+0500\n" "PO-Revision-Date: 2025-07-10 18:19+0500\n" "Last-Translator: Ivan Konovalov \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.17.0\n" #: ../../api_reference/async_api.rst:2 msgid "Asynchronous API" msgstr "Асинхронный API" #: of yadisk._async_client.AsyncClient:1 msgid "Implements access to Yandex.Disk REST API (provides asynchronous API)." msgstr "Реализует доступ к REST API Яндекс.Диска (реализует асинхронный API)." #: of yadisk._async_client.AsyncClient:3 msgid "" "HTTP client implementation can be specified using the :code:`session` " "parameter. :any:`AsyncHTTPXSession` is used by default. For other " "options, see :doc:`/api_reference/sessions`." msgstr "" "Реализация HTTP-клиента может быть указана с помощью параметра " ":code:`session`. По умолчанию используется :any:`AsyncHTTPXSession`. см. " ":doc:`/api_reference/sessions` для других списка других доступных " "вариантов." #: of yadisk._async_client.AsyncClient:7 msgid "" "Almost all methods of :any:`AsyncClient` (the ones that accept " "`**kwargs`) accept some additional arguments:" msgstr "" "Почти все методы :any:`AsyncClient` (те, которые принимают `**kwargs`) " "принимают некоторые дополнительные параметры:" #: of yadisk._async_client.AsyncClient:10 yadisk._client.Client:10 msgid "**n_retries** - `int`, maximum number of retries for a request" msgstr "**n_retries** - `int`, максимальное число повторных попыток запроса" #: of yadisk._async_client.AsyncClient:11 yadisk._client.Client:11 msgid "**retry_interval** - `float`, delay between retries (in seconds)" msgstr "" "**retry_interval** - `float`, задержка между повторными попытками (в " "секундах)" #: of yadisk._async_client.AsyncClient:12 yadisk._client.Client:12 msgid "**headers** - `dict` or `None`, additional request headers" msgstr "**headers** - `dict` или `None`, дополнительные заголовки запроса" #: of yadisk._async_client.AsyncClient:13 yadisk._client.Client:13 msgid "" "**timeout** - `tuple` (:code:`(, )`) or " "`float` (specifies both connect and read timeout), request timeout (in " "seconds)" msgstr "" "**timeout** - `tuple` (:code:`(, )`) или " "`float` (указывает одновременно и connect и read timeout), таймаут " "запроса в секундах" #: of yadisk._async_client.AsyncClient:17 msgid "" "Additional parameters, specific to a given HTTP client library can also " "be passed, see documentation for specific :any:`AsyncSession` subclasses " "(:doc:`/api_reference/sessions`)." msgstr "" "Дополнительные параметры, относящиеся к конкретной HTTP библиотеке могут " "также быть переданы, см. документацию для конкретных подклассов " ":any:`AsyncSession` (:doc:`/api_reference/sessions`)." #: of yadisk._async_client.AsyncClient:22 msgid "" "Do not forget to call :any:`AsyncClient.close` or use the `async with` " "statement to close all the connections. Otherwise, you may get a warning." msgstr "" "Не забывайте вызывать :any:`AsyncClient.close` или используйте `async " "with`, чтобы закрыть все соединения. Иначе, вы можете получить " "предупреждение." #: of yadisk._async_client.AsyncClient:25 msgid "" "In :any:`Client` this is handled in the destructor, but since " ":any:`AsyncClient.close` is a coroutine function the same cannot be done " "here, so you have to do it explicitly." msgstr "" "В :any:`Client` это делалается в деструкторе, но т.к. " ":any:`AsyncClient.close` - корутина, здесь этого сделать нельзя, поэтому " "приходится делать это явно." #: of yadisk._async_client.AsyncClient #: yadisk._async_client.AsyncClient.check_token #: yadisk._async_client.AsyncClient.copy #: yadisk._async_client.AsyncClient.download #: yadisk._async_client.AsyncClient.download_by_link #: yadisk._async_client.AsyncClient.download_public #: yadisk._async_client.AsyncClient.exists #: yadisk._async_client.AsyncClient.get_all_public_resources #: yadisk._async_client.AsyncClient.get_auth_url #: yadisk._async_client.AsyncClient.get_code_url #: yadisk._async_client.AsyncClient.get_device_code #: yadisk._async_client.AsyncClient.get_disk_info #: yadisk._async_client.AsyncClient.get_download_link #: yadisk._async_client.AsyncClient.get_files #: yadisk._async_client.AsyncClient.get_last_uploaded #: yadisk._async_client.AsyncClient.get_meta #: yadisk._async_client.AsyncClient.get_operation_status #: yadisk._async_client.AsyncClient.get_public_available_settings #: yadisk._async_client.AsyncClient.get_public_download_link #: yadisk._async_client.AsyncClient.get_public_meta #: yadisk._async_client.AsyncClient.get_public_resources #: yadisk._async_client.AsyncClient.get_public_settings #: yadisk._async_client.AsyncClient.get_public_type #: yadisk._async_client.AsyncClient.get_token #: yadisk._async_client.AsyncClient.get_token_from_device_code #: yadisk._async_client.AsyncClient.get_trash_meta #: yadisk._async_client.AsyncClient.get_trash_type #: yadisk._async_client.AsyncClient.get_type #: yadisk._async_client.AsyncClient.get_upload_link #: yadisk._async_client.AsyncClient.get_upload_link_object #: yadisk._async_client.AsyncClient.is_dir #: yadisk._async_client.AsyncClient.is_file #: yadisk._async_client.AsyncClient.is_public_dir #: yadisk._async_client.AsyncClient.is_public_file #: yadisk._async_client.AsyncClient.is_trash_dir #: yadisk._async_client.AsyncClient.is_trash_file #: yadisk._async_client.AsyncClient.listdir #: yadisk._async_client.AsyncClient.makedirs #: yadisk._async_client.AsyncClient.mkdir yadisk._async_client.AsyncClient.move #: yadisk._async_client.AsyncClient.patch #: yadisk._async_client.AsyncClient.public_exists #: yadisk._async_client.AsyncClient.publish #: yadisk._async_client.AsyncClient.refresh_token #: yadisk._async_client.AsyncClient.remove #: yadisk._async_client.AsyncClient.remove_trash #: yadisk._async_client.AsyncClient.rename #: yadisk._async_client.AsyncClient.restore_trash #: yadisk._async_client.AsyncClient.revoke_token #: yadisk._async_client.AsyncClient.save_to_disk #: yadisk._async_client.AsyncClient.trash_exists #: yadisk._async_client.AsyncClient.trash_listdir #: yadisk._async_client.AsyncClient.unpublish #: yadisk._async_client.AsyncClient.update_public_settings #: yadisk._async_client.AsyncClient.upload #: yadisk._async_client.AsyncClient.upload_by_link #: yadisk._async_client.AsyncClient.upload_url #: yadisk._async_client.AsyncClient.wait_for_operation #: yadisk._async_session.AsyncResponse.download #: yadisk._async_session.AsyncSession.send_request yadisk._client.Client #: yadisk._client.Client.check_token yadisk._client.Client.copy #: yadisk._client.Client.download yadisk._client.Client.download_by_link #: yadisk._client.Client.download_public yadisk._client.Client.exists #: yadisk._client.Client.get_all_public_resources #: yadisk._client.Client.get_auth_url yadisk._client.Client.get_code_url #: yadisk._client.Client.get_device_code yadisk._client.Client.get_disk_info #: yadisk._client.Client.get_download_link yadisk._client.Client.get_files #: yadisk._client.Client.get_last_uploaded yadisk._client.Client.get_meta #: yadisk._client.Client.get_operation_status #: yadisk._client.Client.get_public_available_settings #: yadisk._client.Client.get_public_download_link #: yadisk._client.Client.get_public_meta #: yadisk._client.Client.get_public_resources #: yadisk._client.Client.get_public_settings #: yadisk._client.Client.get_public_type yadisk._client.Client.get_token #: yadisk._client.Client.get_token_from_device_code #: yadisk._client.Client.get_trash_meta yadisk._client.Client.get_trash_type #: yadisk._client.Client.get_type yadisk._client.Client.get_upload_link #: yadisk._client.Client.get_upload_link_object yadisk._client.Client.is_dir #: yadisk._client.Client.is_file yadisk._client.Client.is_public_dir #: yadisk._client.Client.is_public_file yadisk._client.Client.is_trash_dir #: yadisk._client.Client.is_trash_file yadisk._client.Client.listdir #: yadisk._client.Client.makedirs yadisk._client.Client.mkdir #: yadisk._client.Client.move yadisk._client.Client.patch #: yadisk._client.Client.public_exists yadisk._client.Client.publish #: yadisk._client.Client.refresh_token yadisk._client.Client.remove #: yadisk._client.Client.remove_trash yadisk._client.Client.rename #: yadisk._client.Client.restore_trash yadisk._client.Client.revoke_token #: yadisk._client.Client.save_to_disk yadisk._client.Client.trash_exists #: yadisk._client.Client.trash_listdir yadisk._client.Client.unpublish #: yadisk._client.Client.update_public_settings yadisk._client.Client.upload #: yadisk._client.Client.upload_by_link yadisk._client.Client.upload_url #: yadisk._client.Client.wait_for_operation #: yadisk._import_session.import_async_session #: yadisk._import_session.import_session yadisk._session.Response.download #: yadisk._session.Session.send_request yadisk.exceptions.YaDiskError #: yadisk.objects._auth.DeviceCodeObject yadisk.objects._auth.TokenObject #: yadisk.objects._auth.TokenRevokeStatusObject #: yadisk.objects._disk.DiskInfoObject yadisk.objects._disk.SystemFoldersObject #: yadisk.objects._disk.UserObject yadisk.objects._disk.UserPublicInfoObject #: yadisk.objects._error_object.ErrorObject #: yadisk.objects._link_object.LinkObject #: yadisk.objects._operations.AsyncOperationLinkObject #: yadisk.objects._operations.AsyncOperationLinkObject.get_status #: yadisk.objects._operations.AsyncOperationLinkObject.wait #: yadisk.objects._operations.OperationLinkObject #: yadisk.objects._operations.OperationStatusObject #: yadisk.objects._operations.SyncOperationLinkObject #: yadisk.objects._operations.SyncOperationLinkObject.get_status #: yadisk.objects._operations.SyncOperationLinkObject.wait #: yadisk.objects._resources.AsyncFilesResourceListObject #: yadisk.objects._resources.AsyncLastUploadedResourceListObject #: yadisk.objects._resources.AsyncPublicResourceLinkObject #: yadisk.objects._resources.AsyncPublicResourceListObject #: yadisk.objects._resources.AsyncPublicResourceObject #: yadisk.objects._resources.AsyncPublicResourcesListObject #: yadisk.objects._resources.AsyncResourceLinkObject #: yadisk.objects._resources.AsyncResourceListObject #: yadisk.objects._resources.AsyncResourceObject #: yadisk.objects._resources.AsyncTrashResourceListObject #: yadisk.objects._resources.AsyncTrashResourceObject #: yadisk.objects._resources.AsyncTrashResourceObject.exists #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta #: yadisk.objects._resources.AsyncTrashResourceObject.get_type #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir #: yadisk.objects._resources.AsyncTrashResourceObject.is_file #: yadisk.objects._resources.AsyncTrashResourceObject.listdir #: yadisk.objects._resources.AsyncTrashResourceObject.remove #: yadisk.objects._resources.AsyncTrashResourceObject.restore #: yadisk.objects._resources.CommentIDsObject #: yadisk.objects._resources.EXIFObject #: yadisk.objects._resources.FilesResourceListObject #: yadisk.objects._resources.LastUploadedResourceListObject #: yadisk.objects._resources.PublicResourceLinkObject #: yadisk.objects._resources.PublicResourceListObject #: yadisk.objects._resources.PublicResourceObject #: yadisk.objects._resources.PublicResourcesListObject #: yadisk.objects._resources.ResourceDownloadLinkObject #: yadisk.objects._resources.ResourceLinkObject #: yadisk.objects._resources.ResourceListObject #: yadisk.objects._resources.ResourceObject #: yadisk.objects._resources.ResourceUploadLinkObject #: yadisk.objects._resources.ShareInfoObject #: yadisk.objects._resources.SyncFilesResourceListObject #: yadisk.objects._resources.SyncLastUploadedResourceListObject #: yadisk.objects._resources.SyncPublicResourceLinkObject #: yadisk.objects._resources.SyncPublicResourceListObject #: yadisk.objects._resources.SyncPublicResourceObject #: yadisk.objects._resources.SyncPublicResourcesListObject #: yadisk.objects._resources.SyncResourceLinkObject #: yadisk.objects._resources.SyncResourceListObject #: yadisk.objects._resources.SyncResourceObject #: yadisk.objects._resources.SyncTrashResourceListObject #: yadisk.objects._resources.SyncTrashResourceObject #: yadisk.objects._resources.SyncTrashResourceObject.exists #: yadisk.objects._resources.SyncTrashResourceObject.get_meta #: yadisk.objects._resources.SyncTrashResourceObject.get_type #: yadisk.objects._resources.SyncTrashResourceObject.is_dir #: yadisk.objects._resources.SyncTrashResourceObject.is_file #: yadisk.objects._resources.SyncTrashResourceObject.listdir #: yadisk.objects._resources.SyncTrashResourceObject.remove #: yadisk.objects._resources.SyncTrashResourceObject.restore #: yadisk.objects._resources.TrashResourceListObject #: yadisk.objects._resources.TrashResourceObject #: yadisk.objects._yadisk_object.YaDiskObject #: yadisk.objects._yadisk_object.YaDiskObject.__matmul__ #: yadisk.objects._yadisk_object.YaDiskObject.field #: yadisk.objects._yadisk_object.YaDiskObject.import_fields #: yadisk.objects._yadisk_object.YaDiskObject.remove_alias #: yadisk.objects._yadisk_object.YaDiskObject.remove_field #: yadisk.objects._yadisk_object.YaDiskObject.set_alias #: yadisk.objects._yadisk_object.YaDiskObject.set_field_type #: yadisk.objects._yadisk_object.YaDiskObject.set_field_types #: yadisk.types.AsyncFileLike.read yadisk.types.AsyncFileLike.seek #: yadisk.types.AsyncFileLike.write yadisk.types.BinaryAsyncFileLike.read #: yadisk.types.BinaryAsyncFileLike.seek yadisk.types.BinaryAsyncFileLike.write #: yadisk.utils.async_auto_retry yadisk.utils.auto_retry #: yadisk.utils.get_exception msgid "Parameters" msgstr "Параметры" #: of yadisk._async_client.AsyncClient:29 yadisk._client.Client:21 msgid "application ID" msgstr "идентификатор приложения" #: of yadisk._async_client.AsyncClient:30 yadisk._client.Client:22 msgid "application secret password" msgstr "пароль приложения" #: of yadisk._async_client.AsyncClient:31 yadisk._client.Client:23 msgid "application token" msgstr "токен" #: of yadisk._async_client.AsyncClient:32 yadisk._client.Client:24 msgid "" "`dict` or `None`, default arguments for methods. Can be used to set the " "default timeout, headers, etc." msgstr "" "`dict` или `None`, аргументы по умолчанию для методов. Можно " "использовать, чтобы задать стандартный таймаут, заголовки и т.д." #: of yadisk._async_client.AsyncClient:34 msgid "" "`None`, `str` or an instance of :any:`AsyncSession`. If :code:`session` " "is a string, the appropriate session class will be imported, it must be " "one of the following values: * :code:`\"aiohttp\"` - " ":any:`AIOHTTPSession` * :code:`\"httpx\"` - :any:`AsyncHTTPXSession`" msgstr "" "`None`, `str` или объект :any:`AsyncSession`. Если :code:`session` - " "строка, то нужный класс будет автоматически импортирован, допустимые " "значения: * :code:`\"aiohttp\"` - :any:`AIOHTTPSession` * " ":code:`\"httpx\"` - :any:`AsyncHTTPXSession`" #: of yadisk._async_client.AsyncClient:34 msgid "" "`None`, `str` or an instance of :any:`AsyncSession`. If :code:`session` " "is a string, the appropriate session class will be imported, it must be " "one of the following values:" msgstr "" "`None`, `str` или объект :any:`AsyncSession`. Если :code:`session` - " "строка, то нужный класс будет автоматически импортирован, допустимые " "значения:" #: of yadisk._async_client.AsyncClient:39 #: yadisk._import_session.import_async_session:7 msgid ":code:`\"aiohttp\"` - :any:`AIOHTTPSession`" msgstr ":code:`\"aiohttp\"` - :any:`AIOHTTPSession`" #: of yadisk._async_client.AsyncClient:40 #: yadisk._import_session.import_async_session:8 msgid ":code:`\"httpx\"` - :any:`AsyncHTTPXSession`" msgstr ":code:`\"httpx\"` - :any:`AsyncHTTPXSession`" #: of yadisk._async_client.AsyncClient:42 msgid "" "`None` or an async function that opens a file for reading or writing " "(:code:`aiofiles.open()` by default)" msgstr "" "`None` или асинхронная функция, которая открывает файл для чтения или " "записи (:code:`aiofiles.open()` по умолчанию)" #: of yadisk._async_client.AsyncClient:44 msgid "" "kept for compatibility, callable that returns an instance of " ":any:`AsyncSession`" msgstr "" "оставлен для совместимости, функция, возвращающая объект " ":any:`AsyncSession`" #: of yadisk._async_client.AsyncClient yadisk._async_session.AsyncResponse #: yadisk._client.Client yadisk._session.Response yadisk.exceptions.YaDiskError #: yadisk.objects._auth.DeviceCodeObject yadisk.objects._auth.TokenObject #: yadisk.objects._auth.TokenRevokeStatusObject #: yadisk.objects._disk.DiskInfoObject yadisk.objects._disk.SystemFoldersObject #: yadisk.objects._disk.UserObject yadisk.objects._disk.UserPublicInfoObject #: yadisk.objects._error_object.ErrorObject #: yadisk.objects._link_object.LinkObject #: yadisk.objects._operations.AsyncOperationLinkObject #: yadisk.objects._operations.OperationLinkObject #: yadisk.objects._operations.OperationStatusObject #: yadisk.objects._operations.SyncOperationLinkObject #: yadisk.objects._resources.AsyncFilesResourceListObject #: yadisk.objects._resources.AsyncLastUploadedResourceListObject #: yadisk.objects._resources.AsyncPublicResourceLinkObject #: yadisk.objects._resources.AsyncPublicResourceListObject #: yadisk.objects._resources.AsyncPublicResourceObject #: yadisk.objects._resources.AsyncPublicResourcesListObject #: yadisk.objects._resources.AsyncResourceLinkObject #: yadisk.objects._resources.AsyncResourceListObject #: yadisk.objects._resources.AsyncResourceObject #: yadisk.objects._resources.AsyncTrashResourceListObject #: yadisk.objects._resources.AsyncTrashResourceObject #: yadisk.objects._resources.AvailableUntilVerboseObject #: yadisk.objects._resources.CommentIDsObject #: yadisk.objects._resources.EXIFObject #: yadisk.objects._resources.ExternalOrganizationIdVerboseObject #: yadisk.objects._resources.FilesResourceListObject #: yadisk.objects._resources.LastUploadedResourceListObject #: yadisk.objects._resources.PasswordVerboseObject #: yadisk.objects._resources.PublicAccessObject #: yadisk.objects._resources.PublicAvailableSettingsObject #: yadisk.objects._resources.PublicDefaultObject #: yadisk.objects._resources.PublicResourceLinkObject #: yadisk.objects._resources.PublicResourceListObject #: yadisk.objects._resources.PublicResourceObject #: yadisk.objects._resources.PublicResourcesListObject #: yadisk.objects._resources.PublicSettingsObject #: yadisk.objects._resources.ResourceDownloadLinkObject #: yadisk.objects._resources.ResourceLinkObject #: yadisk.objects._resources.ResourceListObject #: yadisk.objects._resources.ResourceObject #: yadisk.objects._resources.ResourceUploadLinkObject #: yadisk.objects._resources.ShareInfoObject #: yadisk.objects._resources.SyncFilesResourceListObject #: yadisk.objects._resources.SyncLastUploadedResourceListObject #: yadisk.objects._resources.SyncPublicResourceLinkObject #: yadisk.objects._resources.SyncPublicResourceListObject #: yadisk.objects._resources.SyncPublicResourceObject #: yadisk.objects._resources.SyncPublicResourcesListObject #: yadisk.objects._resources.SyncResourceLinkObject #: yadisk.objects._resources.SyncResourceListObject #: yadisk.objects._resources.SyncResourceObject #: yadisk.objects._resources.SyncTrashResourceListObject #: yadisk.objects._resources.SyncTrashResourceObject #: yadisk.objects._resources.TrashResourceListObject #: yadisk.objects._resources.TrashResourceObject #: yadisk.sessions.aiohttp_session.AIOHTTPSession #: yadisk.sessions.async_httpx_session.AsyncHTTPXSession #: yadisk.sessions.httpx_session.HTTPXSession #: yadisk.sessions.requests_session.RequestsSession #: yadisk.types.AvailableUntilVerbose #: yadisk.types.ExternalOrganizationIdVerbose yadisk.types.PasswordVerbose #: yadisk.types.PublicSettings yadisk.types.PublicSettingsAccess msgid "Variables" msgstr "Атрибуты" #: of yadisk._async_client.AsyncClient:47 yadisk._client.Client:40 msgid "`str`, application ID" msgstr "`str`, идентификатор приложения" #: of yadisk._async_client.AsyncClient:48 yadisk._client.Client:41 msgid "`str`, application secret password" msgstr "`str`, пароль приложения" #: of yadisk._async_client.AsyncClient:49 yadisk._client.Client:42 msgid "`str`, application token" msgstr "`str`, токен" #: of yadisk._async_client.AsyncClient:50 yadisk._client.Client:43 msgid "" "`dict`, default arguments for methods. Can be used to set the default " "timeout, headers, etc." msgstr "" "`dict`, аргументы по умолчанию для методов. Можно использовать, чтобы " "задать стандартный таймаут, заголовки и т.д." #: of yadisk._async_client.AsyncClient:52 msgid "current session (:any:`AsyncSession` instance)" msgstr "текущая сессия (объект :any:`AsyncSession`)" #: of yadisk._async_client.AsyncClient:53 msgid "" "async function that opens a file for reading or writing " "(:code:`aiofiles.open()` by default)" msgstr "" "асинхронная функция, которая открывает файл для чтения или записи " "(:code:`aiofiles.open()` по умолчанию)" #: of yadisk._async_client.AsyncClient:56 yadisk._client.Client:49 msgid "The following exceptions may be raised by most API requests:" msgstr "Большинство запросов к API могут вызвать следующие исключения:" #: of yadisk._async_client.AsyncClient yadisk._async_client.AsyncClient.copy #: yadisk._async_client.AsyncClient.download #: yadisk._async_client.AsyncClient.download_public #: yadisk._async_client.AsyncClient.exists #: yadisk._async_client.AsyncClient.get_all_public_resources #: yadisk._async_client.AsyncClient.get_auth_url #: yadisk._async_client.AsyncClient.get_code_url #: yadisk._async_client.AsyncClient.get_device_code #: yadisk._async_client.AsyncClient.get_disk_info #: yadisk._async_client.AsyncClient.get_download_link #: yadisk._async_client.AsyncClient.get_files #: yadisk._async_client.AsyncClient.get_last_uploaded #: yadisk._async_client.AsyncClient.get_meta #: yadisk._async_client.AsyncClient.get_operation_status #: yadisk._async_client.AsyncClient.get_public_available_settings #: yadisk._async_client.AsyncClient.get_public_download_link #: yadisk._async_client.AsyncClient.get_public_meta #: yadisk._async_client.AsyncClient.get_public_resources #: yadisk._async_client.AsyncClient.get_public_settings #: yadisk._async_client.AsyncClient.get_public_type #: yadisk._async_client.AsyncClient.get_token #: yadisk._async_client.AsyncClient.get_token_from_device_code #: yadisk._async_client.AsyncClient.get_trash_meta #: yadisk._async_client.AsyncClient.get_trash_type #: yadisk._async_client.AsyncClient.get_type #: yadisk._async_client.AsyncClient.get_upload_link #: yadisk._async_client.AsyncClient.get_upload_link_object #: yadisk._async_client.AsyncClient.is_dir #: yadisk._async_client.AsyncClient.is_file #: yadisk._async_client.AsyncClient.is_public_dir #: yadisk._async_client.AsyncClient.is_public_file #: yadisk._async_client.AsyncClient.is_trash_dir #: yadisk._async_client.AsyncClient.is_trash_file #: yadisk._async_client.AsyncClient.listdir #: yadisk._async_client.AsyncClient.makedirs #: yadisk._async_client.AsyncClient.mkdir yadisk._async_client.AsyncClient.move #: yadisk._async_client.AsyncClient.patch #: yadisk._async_client.AsyncClient.public_exists #: yadisk._async_client.AsyncClient.publish #: yadisk._async_client.AsyncClient.refresh_token #: yadisk._async_client.AsyncClient.remove #: yadisk._async_client.AsyncClient.remove_trash #: yadisk._async_client.AsyncClient.rename #: yadisk._async_client.AsyncClient.restore_trash #: yadisk._async_client.AsyncClient.revoke_token #: yadisk._async_client.AsyncClient.save_to_disk #: yadisk._async_client.AsyncClient.trash_exists #: yadisk._async_client.AsyncClient.trash_listdir #: yadisk._async_client.AsyncClient.unpublish #: yadisk._async_client.AsyncClient.update_public_settings #: yadisk._async_client.AsyncClient.upload #: yadisk._async_client.AsyncClient.upload_by_link #: yadisk._async_client.AsyncClient.upload_url #: yadisk._async_client.AsyncClient.wait_for_operation #: yadisk._async_session.AsyncResponse.download #: yadisk._async_session.AsyncResponse.json yadisk._client.Client #: yadisk._client.Client.copy yadisk._client.Client.download #: yadisk._client.Client.download_public yadisk._client.Client.exists #: yadisk._client.Client.get_all_public_resources #: yadisk._client.Client.get_auth_url yadisk._client.Client.get_code_url #: yadisk._client.Client.get_device_code yadisk._client.Client.get_disk_info #: yadisk._client.Client.get_download_link yadisk._client.Client.get_files #: yadisk._client.Client.get_last_uploaded yadisk._client.Client.get_meta #: yadisk._client.Client.get_operation_status #: yadisk._client.Client.get_public_available_settings #: yadisk._client.Client.get_public_download_link #: yadisk._client.Client.get_public_meta #: yadisk._client.Client.get_public_resources #: yadisk._client.Client.get_public_settings #: yadisk._client.Client.get_public_type yadisk._client.Client.get_token #: yadisk._client.Client.get_token_from_device_code #: yadisk._client.Client.get_trash_meta yadisk._client.Client.get_trash_type #: yadisk._client.Client.get_type yadisk._client.Client.get_upload_link #: yadisk._client.Client.get_upload_link_object yadisk._client.Client.is_dir #: yadisk._client.Client.is_file yadisk._client.Client.is_public_dir #: yadisk._client.Client.is_public_file yadisk._client.Client.is_trash_dir #: yadisk._client.Client.is_trash_file yadisk._client.Client.listdir #: yadisk._client.Client.makedirs yadisk._client.Client.mkdir #: yadisk._client.Client.move yadisk._client.Client.patch #: yadisk._client.Client.public_exists yadisk._client.Client.publish #: yadisk._client.Client.refresh_token yadisk._client.Client.remove #: yadisk._client.Client.remove_trash yadisk._client.Client.rename #: yadisk._client.Client.restore_trash yadisk._client.Client.revoke_token #: yadisk._client.Client.save_to_disk yadisk._client.Client.trash_exists #: yadisk._client.Client.trash_listdir yadisk._client.Client.unpublish #: yadisk._client.Client.update_public_settings yadisk._client.Client.upload #: yadisk._client.Client.upload_by_link yadisk._client.Client.upload_url #: yadisk._client.Client.wait_for_operation #: yadisk._import_session.import_async_session #: yadisk._import_session.import_session yadisk._session.Response.download #: yadisk._session.Response.json #: yadisk.objects._operations.AsyncOperationLinkObject.get_status #: yadisk.objects._operations.AsyncOperationLinkObject.wait #: yadisk.objects._operations.SyncOperationLinkObject.get_status #: yadisk.objects._operations.SyncOperationLinkObject.wait #: yadisk.objects._resources.AsyncTrashResourceObject.exists #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta #: yadisk.objects._resources.AsyncTrashResourceObject.get_type #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir #: yadisk.objects._resources.AsyncTrashResourceObject.is_file #: yadisk.objects._resources.AsyncTrashResourceObject.listdir #: yadisk.objects._resources.AsyncTrashResourceObject.remove #: yadisk.objects._resources.AsyncTrashResourceObject.restore #: yadisk.objects._resources.SyncTrashResourceObject.exists #: yadisk.objects._resources.SyncTrashResourceObject.get_meta #: yadisk.objects._resources.SyncTrashResourceObject.get_type #: yadisk.objects._resources.SyncTrashResourceObject.is_dir #: yadisk.objects._resources.SyncTrashResourceObject.is_file #: yadisk.objects._resources.SyncTrashResourceObject.listdir #: yadisk.objects._resources.SyncTrashResourceObject.remove #: yadisk.objects._resources.SyncTrashResourceObject.restore #: yadisk.objects._yadisk_object.YaDiskObject.__matmul__ #: yadisk.objects._yadisk_object.YaDiskObject.field msgid "Raises" msgstr "Вызывает" #: of yadisk._async_client.AsyncClient:58 yadisk._client.Client:51 msgid "HTTP client raised an exception while making a request" msgstr "HTTP-клиент вызвал исключение во время отправления запроса" #: of yadisk._async_client.AsyncClient:59 yadisk._client.Client:52 msgid "server returned HTTP code 400" msgstr "сервер вернул код 400." #: of yadisk._async_client.AsyncClient:60 yadisk._client.Client:53 msgid "request contains fields with invalid data" msgstr "запрос содежит поля с некорректными данными." #: of yadisk._async_client.AsyncClient:61 yadisk._client.Client:54 msgid "server returned HTTP code 401" msgstr "сервер вернул код 401." #: of yadisk._async_client.AsyncClient:62 yadisk._client.Client:55 msgid "server returned HTTP code 403" msgstr "сервер вернул код 403." #: of yadisk._async_client.AsyncClient:63 yadisk._client.Client:56 msgid "server returned HTTP code 406" msgstr "сервер вернул код 406." #: of yadisk._async_client.AsyncClient:64 yadisk._client.Client:57 msgid "server returned HTTP code 409" msgstr "сервер вернул код 409." #: of yadisk._async_client.AsyncClient:65 yadisk._client.Client:58 msgid "server returned code 413" msgstr "сервер вернул код 413." #: of yadisk._async_client.AsyncClient:66 yadisk._client.Client:59 msgid "server returned HTTP code 415" msgstr "сервер вернул код 415." #: of yadisk._async_client.AsyncClient:67 yadisk._client.Client:60 msgid "server returned HTTP code 423" msgstr "сервер вернул код 423." #: of yadisk._async_client.AsyncClient:68 yadisk._client.Client:61 msgid "server returned HTTP code 429" msgstr "сервер вернул код 429." #: of yadisk._async_client.AsyncClient:69 yadisk._client.Client:62 msgid "server returned HTTP code 500" msgstr "сервер вернул код 500." #: of yadisk._async_client.AsyncClient:70 yadisk._client.Client:63 msgid "server returned HTTP code 502" msgstr "сервер вернул код 502." #: of yadisk._async_client.AsyncClient:71 yadisk._client.Client:64 msgid "server returned HTTP code 503" msgstr "сервер вернул код 503." #: of yadisk._async_client.AsyncClient:72 yadisk._client.Client:65 msgid "server returned HTTP code 504" msgstr "сервер вернул код 504." #: of yadisk._async_client.AsyncClient:73 yadisk._client.Client:66 msgid "server returned HTTP code 509" msgstr "сервер вернул код 509." #: of yadisk._async_client.AsyncClient:74 yadisk._client.Client:67 msgid "other unknown error" msgstr "другая неизвестная ошибка" #: of yadisk._async_client.AsyncClient.close:1 yadisk._client.Client.close:1 msgid "" "Closes the session. Do not call this method while there are other active " "threads using this object." msgstr "" "Закрывает сессию. Не вызывайте этот метод, пока другие потоки используют " "этот объект." #: of yadisk._async_client.AsyncClient.close:4 msgid "" "This method can also be called implicitly by using the `async with` " "statement." msgstr "Этот метод неявно вызывается конструкцией `async with`." #: ../../api_reference/async_api.rst:11 ../../api_reference/sync_api.rst:11 msgid "Authentication" msgstr "Аутентификация" #: of yadisk._async_client.AsyncClient.check_token:1 #: yadisk._client.Client.check_token:1 msgid "Check whether the token is valid." msgstr "Проверяет, действителен ли токен." #: of yadisk._async_client.AsyncClient.check_token:3 #: yadisk._client.Client.check_token:3 msgid "token to check, equivalent to `self.token` if `None`" msgstr "токен, подлежащий проверке, то же самое, что `self.token` при `None`" #: of yadisk._async_client.AsyncClient.check_token:4 #: yadisk._async_client.AsyncClient.copy:15 #: yadisk._async_client.AsyncClient.download:5 #: yadisk._async_client.AsyncClient.download_by_link:5 #: yadisk._async_client.AsyncClient.download_public:6 #: yadisk._async_client.AsyncClient.exists:4 #: yadisk._async_client.AsyncClient.get_device_code:12 #: yadisk._async_client.AsyncClient.get_disk_info:5 #: yadisk._async_client.AsyncClient.get_download_link:4 #: yadisk._async_client.AsyncClient.get_files:11 #: yadisk._async_client.AsyncClient.get_last_uploaded:8 #: yadisk._async_client.AsyncClient.get_meta:10 #: yadisk._async_client.AsyncClient.get_operation_status:4 #: yadisk._async_client.AsyncClient.get_public_download_link:5 #: yadisk._async_client.AsyncClient.get_public_meta:13 #: yadisk._async_client.AsyncClient.get_public_resources:9 #: yadisk._async_client.AsyncClient.get_public_type:5 #: yadisk._async_client.AsyncClient.get_token:6 #: yadisk._async_client.AsyncClient.get_trash_meta:10 #: yadisk._async_client.AsyncClient.get_trash_type:4 #: yadisk._async_client.AsyncClient.get_type:4 #: yadisk._async_client.AsyncClient.get_upload_link:8 #: yadisk._async_client.AsyncClient.is_dir:4 #: yadisk._async_client.AsyncClient.is_file:4 #: yadisk._async_client.AsyncClient.is_public_dir:5 #: yadisk._async_client.AsyncClient.is_public_file:5 #: yadisk._async_client.AsyncClient.is_trash_dir:4 #: yadisk._async_client.AsyncClient.is_trash_file:4 #: yadisk._async_client.AsyncClient.listdir:10 #: yadisk._async_client.AsyncClient.makedirs:6 #: yadisk._async_client.AsyncClient.mkdir:5 #: yadisk._async_client.AsyncClient.move:12 #: yadisk._async_client.AsyncClient.patch:6 #: yadisk._async_client.AsyncClient.public_exists:5 #: yadisk._async_client.AsyncClient.publish:8 #: yadisk._async_client.AsyncClient.refresh_token:4 #: yadisk._async_client.AsyncClient.remove:13 #: yadisk._async_client.AsyncClient.remove_trash:10 #: yadisk._async_client.AsyncClient.rename:13 #: yadisk._async_client.AsyncClient.restore_trash:13 #: yadisk._async_client.AsyncClient.revoke_token:4 #: yadisk._async_client.AsyncClient.save_to_disk:15 #: yadisk._async_client.AsyncClient.trash_exists:4 #: yadisk._async_client.AsyncClient.trash_listdir:10 #: yadisk._async_client.AsyncClient.unpublish:7 #: yadisk._async_client.AsyncClient.upload:10 #: yadisk._async_client.AsyncClient.upload_by_link:7 #: yadisk._async_client.AsyncClient.upload_url:11 msgid "`float`, `tuple` or `None`, request timeout" msgstr "`float`, `tuple` или `None`, таймаут запроса" #: of yadisk._async_client.AsyncClient.check_token:5 #: yadisk._async_client.AsyncClient.copy:16 #: yadisk._async_client.AsyncClient.download:6 #: yadisk._async_client.AsyncClient.download_by_link:6 #: yadisk._async_client.AsyncClient.download_public:7 #: yadisk._async_client.AsyncClient.exists:5 #: yadisk._async_client.AsyncClient.get_all_public_resources:11 #: yadisk._async_client.AsyncClient.get_device_code:13 #: yadisk._async_client.AsyncClient.get_disk_info:6 #: yadisk._async_client.AsyncClient.get_download_link:5 #: yadisk._async_client.AsyncClient.get_files:12 #: yadisk._async_client.AsyncClient.get_last_uploaded:9 #: yadisk._async_client.AsyncClient.get_meta:11 #: yadisk._async_client.AsyncClient.get_operation_status:5 #: yadisk._async_client.AsyncClient.get_public_available_settings:5 #: yadisk._async_client.AsyncClient.get_public_download_link:6 #: yadisk._async_client.AsyncClient.get_public_meta:14 #: yadisk._async_client.AsyncClient.get_public_resources:10 #: yadisk._async_client.AsyncClient.get_public_settings:7 #: yadisk._async_client.AsyncClient.get_public_type:6 #: yadisk._async_client.AsyncClient.get_token:7 #: yadisk._async_client.AsyncClient.get_token_from_device_code:8 #: yadisk._async_client.AsyncClient.get_trash_meta:11 #: yadisk._async_client.AsyncClient.get_trash_type:5 #: yadisk._async_client.AsyncClient.get_type:5 #: yadisk._async_client.AsyncClient.get_upload_link:9 #: yadisk._async_client.AsyncClient.get_upload_link_object:13 #: yadisk._async_client.AsyncClient.is_dir:5 #: yadisk._async_client.AsyncClient.is_file:5 #: yadisk._async_client.AsyncClient.is_public_dir:6 #: yadisk._async_client.AsyncClient.is_public_file:6 #: yadisk._async_client.AsyncClient.is_trash_dir:5 #: yadisk._async_client.AsyncClient.is_trash_file:5 #: yadisk._async_client.AsyncClient.listdir:11 #: yadisk._async_client.AsyncClient.makedirs:7 #: yadisk._async_client.AsyncClient.mkdir:6 #: yadisk._async_client.AsyncClient.move:13 #: yadisk._async_client.AsyncClient.patch:7 #: yadisk._async_client.AsyncClient.public_exists:6 #: yadisk._async_client.AsyncClient.publish:9 #: yadisk._async_client.AsyncClient.refresh_token:5 #: yadisk._async_client.AsyncClient.remove:14 #: yadisk._async_client.AsyncClient.remove_trash:11 #: yadisk._async_client.AsyncClient.rename:14 #: yadisk._async_client.AsyncClient.restore_trash:14 #: yadisk._async_client.AsyncClient.revoke_token:5 #: yadisk._async_client.AsyncClient.save_to_disk:16 #: yadisk._async_client.AsyncClient.trash_exists:5 #: yadisk._async_client.AsyncClient.trash_listdir:11 #: yadisk._async_client.AsyncClient.unpublish:8 #: yadisk._async_client.AsyncClient.update_public_settings:6 #: yadisk._async_client.AsyncClient.upload:11 #: yadisk._async_client.AsyncClient.upload_by_link:8 #: yadisk._async_client.AsyncClient.upload_url:12 #: yadisk._async_client.AsyncClient.wait_for_operation:9 #: yadisk._client.Client.check_token:5 yadisk._client.Client.copy:16 #: yadisk._client.Client.download:6 yadisk._client.Client.download_by_link:6 #: yadisk._client.Client.download_public:7 yadisk._client.Client.exists:5 #: yadisk._client.Client.get_all_public_resources:11 #: yadisk._client.Client.get_device_code:12 #: yadisk._client.Client.get_disk_info:6 #: yadisk._client.Client.get_download_link:5 yadisk._client.Client.get_files:12 #: yadisk._client.Client.get_last_uploaded:9 yadisk._client.Client.get_meta:11 #: yadisk._client.Client.get_operation_status:5 #: yadisk._client.Client.get_public_available_settings:5 #: yadisk._client.Client.get_public_download_link:6 #: yadisk._client.Client.get_public_meta:14 #: yadisk._client.Client.get_public_resources:10 #: yadisk._client.Client.get_public_settings:7 #: yadisk._client.Client.get_public_type:6 yadisk._client.Client.get_token:8 #: yadisk._client.Client.get_token_from_device_code:7 #: yadisk._client.Client.get_trash_meta:11 #: yadisk._client.Client.get_trash_type:5 yadisk._client.Client.get_type:5 #: yadisk._client.Client.get_upload_link:9 #: yadisk._client.Client.get_upload_link_object:13 #: yadisk._client.Client.is_dir:5 yadisk._client.Client.is_file:5 #: yadisk._client.Client.is_public_dir:6 yadisk._client.Client.is_public_file:6 #: yadisk._client.Client.is_trash_dir:5 yadisk._client.Client.is_trash_file:5 #: yadisk._client.Client.listdir:11 yadisk._client.Client.makedirs:7 #: yadisk._client.Client.mkdir:6 yadisk._client.Client.move:13 #: yadisk._client.Client.patch:7 yadisk._client.Client.public_exists:6 #: yadisk._client.Client.publish:9 yadisk._client.Client.refresh_token:5 #: yadisk._client.Client.remove:14 yadisk._client.Client.remove_trash:11 #: yadisk._client.Client.rename:14 yadisk._client.Client.restore_trash:14 #: yadisk._client.Client.revoke_token:5 yadisk._client.Client.save_to_disk:16 #: yadisk._client.Client.trash_exists:5 yadisk._client.Client.trash_listdir:11 #: yadisk._client.Client.unpublish:6 #: yadisk._client.Client.update_public_settings:6 #: yadisk._client.Client.upload:12 yadisk._client.Client.upload_by_link:9 #: yadisk._client.Client.upload_url:12 #: yadisk._client.Client.wait_for_operation:9 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:4 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:8 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:4 #: yadisk.objects._operations.SyncOperationLinkObject.wait:8 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:5 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:11 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:5 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:5 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:5 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:11 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:11 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:19 #: yadisk.objects._resources.SyncTrashResourceObject.exists:5 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:11 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:5 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:5 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:5 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:11 #: yadisk.objects._resources.SyncTrashResourceObject.remove:11 #: yadisk.objects._resources.SyncTrashResourceObject.restore:19 msgid "`dict` or `None`, additional request headers" msgstr "`dict` или `None`, дополнительные заголовки запроса" #: of yadisk._async_client.AsyncClient.check_token:6 #: yadisk._async_client.AsyncClient.copy:17 #: yadisk._async_client.AsyncClient.download:7 #: yadisk._async_client.AsyncClient.download_by_link:7 #: yadisk._async_client.AsyncClient.download_public:8 #: yadisk._async_client.AsyncClient.exists:6 #: yadisk._async_client.AsyncClient.get_all_public_resources:12 #: yadisk._async_client.AsyncClient.get_device_code:14 #: yadisk._async_client.AsyncClient.get_disk_info:7 #: yadisk._async_client.AsyncClient.get_download_link:6 #: yadisk._async_client.AsyncClient.get_files:13 #: yadisk._async_client.AsyncClient.get_last_uploaded:10 #: yadisk._async_client.AsyncClient.get_meta:12 #: yadisk._async_client.AsyncClient.get_operation_status:6 #: yadisk._async_client.AsyncClient.get_public_available_settings:6 #: yadisk._async_client.AsyncClient.get_public_download_link:7 #: yadisk._async_client.AsyncClient.get_public_meta:15 #: yadisk._async_client.AsyncClient.get_public_resources:11 #: yadisk._async_client.AsyncClient.get_public_settings:8 #: yadisk._async_client.AsyncClient.get_public_type:7 #: yadisk._async_client.AsyncClient.get_token:8 #: yadisk._async_client.AsyncClient.get_token_from_device_code:9 #: yadisk._async_client.AsyncClient.get_trash_meta:12 #: yadisk._async_client.AsyncClient.get_trash_type:6 #: yadisk._async_client.AsyncClient.get_type:6 #: yadisk._async_client.AsyncClient.get_upload_link:10 #: yadisk._async_client.AsyncClient.get_upload_link_object:14 #: yadisk._async_client.AsyncClient.is_dir:6 #: yadisk._async_client.AsyncClient.is_file:6 #: yadisk._async_client.AsyncClient.is_public_dir:7 #: yadisk._async_client.AsyncClient.is_public_file:7 #: yadisk._async_client.AsyncClient.is_trash_dir:6 #: yadisk._async_client.AsyncClient.is_trash_file:6 #: yadisk._async_client.AsyncClient.listdir:12 #: yadisk._async_client.AsyncClient.makedirs:8 #: yadisk._async_client.AsyncClient.mkdir:7 #: yadisk._async_client.AsyncClient.move:14 #: yadisk._async_client.AsyncClient.patch:8 #: yadisk._async_client.AsyncClient.public_exists:7 #: yadisk._async_client.AsyncClient.publish:10 #: yadisk._async_client.AsyncClient.refresh_token:6 #: yadisk._async_client.AsyncClient.remove:15 #: yadisk._async_client.AsyncClient.remove_trash:12 #: yadisk._async_client.AsyncClient.rename:15 #: yadisk._async_client.AsyncClient.restore_trash:15 #: yadisk._async_client.AsyncClient.revoke_token:6 #: yadisk._async_client.AsyncClient.save_to_disk:17 #: yadisk._async_client.AsyncClient.trash_exists:6 #: yadisk._async_client.AsyncClient.trash_listdir:12 #: yadisk._async_client.AsyncClient.unpublish:9 #: yadisk._async_client.AsyncClient.update_public_settings:7 #: yadisk._async_client.AsyncClient.upload:12 #: yadisk._async_client.AsyncClient.upload_by_link:9 #: yadisk._async_client.AsyncClient.upload_url:13 #: yadisk._async_client.AsyncClient.wait_for_operation:10 #: yadisk._client.Client.check_token:6 yadisk._client.Client.copy:17 #: yadisk._client.Client.download:7 yadisk._client.Client.download_by_link:7 #: yadisk._client.Client.download_public:8 yadisk._client.Client.exists:6 #: yadisk._client.Client.get_all_public_resources:12 #: yadisk._client.Client.get_device_code:13 #: yadisk._client.Client.get_disk_info:7 #: yadisk._client.Client.get_download_link:6 yadisk._client.Client.get_files:13 #: yadisk._client.Client.get_last_uploaded:10 yadisk._client.Client.get_meta:12 #: yadisk._client.Client.get_operation_status:6 #: yadisk._client.Client.get_public_available_settings:6 #: yadisk._client.Client.get_public_download_link:7 #: yadisk._client.Client.get_public_meta:15 #: yadisk._client.Client.get_public_resources:11 #: yadisk._client.Client.get_public_settings:8 #: yadisk._client.Client.get_public_type:7 yadisk._client.Client.get_token:9 #: yadisk._client.Client.get_token_from_device_code:8 #: yadisk._client.Client.get_trash_meta:12 #: yadisk._client.Client.get_trash_type:6 yadisk._client.Client.get_type:6 #: yadisk._client.Client.get_upload_link:10 #: yadisk._client.Client.get_upload_link_object:14 #: yadisk._client.Client.is_dir:6 yadisk._client.Client.is_file:6 #: yadisk._client.Client.is_public_dir:7 yadisk._client.Client.is_public_file:7 #: yadisk._client.Client.is_trash_dir:6 yadisk._client.Client.is_trash_file:6 #: yadisk._client.Client.listdir:12 yadisk._client.Client.makedirs:8 #: yadisk._client.Client.mkdir:7 yadisk._client.Client.move:14 #: yadisk._client.Client.patch:8 yadisk._client.Client.public_exists:7 #: yadisk._client.Client.publish:10 yadisk._client.Client.refresh_token:6 #: yadisk._client.Client.remove:15 yadisk._client.Client.remove_trash:12 #: yadisk._client.Client.rename:15 yadisk._client.Client.restore_trash:15 #: yadisk._client.Client.revoke_token:6 yadisk._client.Client.save_to_disk:17 #: yadisk._client.Client.trash_exists:6 yadisk._client.Client.trash_listdir:12 #: yadisk._client.Client.unpublish:7 #: yadisk._client.Client.update_public_settings:7 #: yadisk._client.Client.upload:13 yadisk._client.Client.upload_by_link:10 #: yadisk._client.Client.upload_url:13 #: yadisk._client.Client.wait_for_operation:10 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:5 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:9 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:5 #: yadisk.objects._operations.SyncOperationLinkObject.wait:9 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:6 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:12 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:6 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:6 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:6 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:12 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:12 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:20 #: yadisk.objects._resources.SyncTrashResourceObject.exists:6 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:12 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:6 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:6 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:6 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:12 #: yadisk.objects._resources.SyncTrashResourceObject.remove:12 #: yadisk.objects._resources.SyncTrashResourceObject.restore:20 #: yadisk.utils.async_auto_retry:6 yadisk.utils.auto_retry:6 msgid "`int`, maximum number of retries" msgstr "`int`, максимальное число повторных попыток запроса" #: of yadisk._async_client.AsyncClient.check_token:7 #: yadisk._async_client.AsyncClient.copy:18 #: yadisk._async_client.AsyncClient.download:8 #: yadisk._async_client.AsyncClient.download_by_link:8 #: yadisk._async_client.AsyncClient.download_public:9 #: yadisk._async_client.AsyncClient.exists:7 #: yadisk._async_client.AsyncClient.get_all_public_resources:13 #: yadisk._async_client.AsyncClient.get_device_code:15 #: yadisk._async_client.AsyncClient.get_disk_info:8 #: yadisk._async_client.AsyncClient.get_download_link:7 #: yadisk._async_client.AsyncClient.get_files:14 #: yadisk._async_client.AsyncClient.get_last_uploaded:11 #: yadisk._async_client.AsyncClient.get_meta:13 #: yadisk._async_client.AsyncClient.get_operation_status:7 #: yadisk._async_client.AsyncClient.get_public_available_settings:7 #: yadisk._async_client.AsyncClient.get_public_download_link:8 #: yadisk._async_client.AsyncClient.get_public_meta:16 #: yadisk._async_client.AsyncClient.get_public_resources:12 #: yadisk._async_client.AsyncClient.get_public_settings:9 #: yadisk._async_client.AsyncClient.get_public_type:8 #: yadisk._async_client.AsyncClient.get_token:9 #: yadisk._async_client.AsyncClient.get_token_from_device_code:10 #: yadisk._async_client.AsyncClient.get_trash_meta:13 #: yadisk._async_client.AsyncClient.get_trash_type:7 #: yadisk._async_client.AsyncClient.get_type:7 #: yadisk._async_client.AsyncClient.get_upload_link:11 #: yadisk._async_client.AsyncClient.get_upload_link_object:15 #: yadisk._async_client.AsyncClient.is_dir:7 #: yadisk._async_client.AsyncClient.is_file:7 #: yadisk._async_client.AsyncClient.is_public_dir:8 #: yadisk._async_client.AsyncClient.is_public_file:8 #: yadisk._async_client.AsyncClient.is_trash_dir:7 #: yadisk._async_client.AsyncClient.is_trash_file:7 #: yadisk._async_client.AsyncClient.listdir:13 #: yadisk._async_client.AsyncClient.makedirs:9 #: yadisk._async_client.AsyncClient.mkdir:8 #: yadisk._async_client.AsyncClient.move:15 #: yadisk._async_client.AsyncClient.patch:9 #: yadisk._async_client.AsyncClient.public_exists:8 #: yadisk._async_client.AsyncClient.publish:11 #: yadisk._async_client.AsyncClient.refresh_token:7 #: yadisk._async_client.AsyncClient.remove:16 #: yadisk._async_client.AsyncClient.remove_trash:13 #: yadisk._async_client.AsyncClient.rename:16 #: yadisk._async_client.AsyncClient.restore_trash:16 #: yadisk._async_client.AsyncClient.revoke_token:7 #: yadisk._async_client.AsyncClient.save_to_disk:18 #: yadisk._async_client.AsyncClient.trash_exists:7 #: yadisk._async_client.AsyncClient.trash_listdir:13 #: yadisk._async_client.AsyncClient.unpublish:10 #: yadisk._async_client.AsyncClient.update_public_settings:8 #: yadisk._async_client.AsyncClient.upload:13 #: yadisk._async_client.AsyncClient.upload_by_link:10 #: yadisk._async_client.AsyncClient.upload_url:14 #: yadisk._async_client.AsyncClient.wait_for_operation:11 #: yadisk._client.Client.check_token:7 yadisk._client.Client.copy:18 #: yadisk._client.Client.download:8 yadisk._client.Client.download_by_link:8 #: yadisk._client.Client.download_public:9 yadisk._client.Client.exists:7 #: yadisk._client.Client.get_all_public_resources:13 #: yadisk._client.Client.get_device_code:14 #: yadisk._client.Client.get_disk_info:8 #: yadisk._client.Client.get_download_link:7 yadisk._client.Client.get_files:14 #: yadisk._client.Client.get_last_uploaded:11 yadisk._client.Client.get_meta:13 #: yadisk._client.Client.get_operation_status:7 #: yadisk._client.Client.get_public_available_settings:7 #: yadisk._client.Client.get_public_download_link:8 #: yadisk._client.Client.get_public_meta:16 #: yadisk._client.Client.get_public_resources:12 #: yadisk._client.Client.get_public_settings:9 #: yadisk._client.Client.get_public_type:8 yadisk._client.Client.get_token:10 #: yadisk._client.Client.get_token_from_device_code:9 #: yadisk._client.Client.get_trash_meta:13 #: yadisk._client.Client.get_trash_type:7 yadisk._client.Client.get_type:7 #: yadisk._client.Client.get_upload_link:11 #: yadisk._client.Client.get_upload_link_object:15 #: yadisk._client.Client.is_dir:7 yadisk._client.Client.is_file:7 #: yadisk._client.Client.is_public_dir:8 yadisk._client.Client.is_public_file:8 #: yadisk._client.Client.is_trash_dir:7 yadisk._client.Client.is_trash_file:7 #: yadisk._client.Client.listdir:13 yadisk._client.Client.makedirs:9 #: yadisk._client.Client.mkdir:8 yadisk._client.Client.move:15 #: yadisk._client.Client.patch:9 yadisk._client.Client.public_exists:8 #: yadisk._client.Client.publish:11 yadisk._client.Client.refresh_token:7 #: yadisk._client.Client.remove:16 yadisk._client.Client.remove_trash:13 #: yadisk._client.Client.rename:16 yadisk._client.Client.restore_trash:16 #: yadisk._client.Client.revoke_token:7 yadisk._client.Client.save_to_disk:18 #: yadisk._client.Client.trash_exists:7 yadisk._client.Client.trash_listdir:13 #: yadisk._client.Client.unpublish:8 #: yadisk._client.Client.update_public_settings:8 #: yadisk._client.Client.upload:14 yadisk._client.Client.upload_by_link:11 #: yadisk._client.Client.upload_url:14 #: yadisk._client.Client.wait_for_operation:11 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:6 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:10 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:6 #: yadisk.objects._operations.SyncOperationLinkObject.wait:10 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:7 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:13 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:7 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:7 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:7 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:13 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:13 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:21 #: yadisk.objects._resources.SyncTrashResourceObject.exists:7 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:13 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:7 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:7 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:7 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:13 #: yadisk.objects._resources.SyncTrashResourceObject.remove:13 #: yadisk.objects._resources.SyncTrashResourceObject.restore:21 msgid "delay between retries in seconds" msgstr "задержка между повторными попытками в секундах" #: of yadisk._async_client.AsyncClient.check_token:8 #: yadisk._async_client.AsyncClient.copy:19 #: yadisk._async_client.AsyncClient.download:9 #: yadisk._async_client.AsyncClient.download_by_link:9 #: yadisk._async_client.AsyncClient.download_public:10 #: yadisk._async_client.AsyncClient.exists:8 #: yadisk._async_client.AsyncClient.get_all_public_resources:14 #: yadisk._async_client.AsyncClient.get_device_code:16 #: yadisk._async_client.AsyncClient.get_disk_info:9 #: yadisk._async_client.AsyncClient.get_download_link:8 #: yadisk._async_client.AsyncClient.get_files:15 #: yadisk._async_client.AsyncClient.get_last_uploaded:12 #: yadisk._async_client.AsyncClient.get_meta:14 #: yadisk._async_client.AsyncClient.get_operation_status:8 #: yadisk._async_client.AsyncClient.get_public_available_settings:8 #: yadisk._async_client.AsyncClient.get_public_download_link:9 #: yadisk._async_client.AsyncClient.get_public_meta:17 #: yadisk._async_client.AsyncClient.get_public_resources:13 #: yadisk._async_client.AsyncClient.get_public_settings:10 #: yadisk._async_client.AsyncClient.get_public_type:9 #: yadisk._async_client.AsyncClient.get_token:10 #: yadisk._async_client.AsyncClient.get_token_from_device_code:11 #: yadisk._async_client.AsyncClient.get_trash_meta:14 #: yadisk._async_client.AsyncClient.get_trash_type:8 #: yadisk._async_client.AsyncClient.get_type:8 #: yadisk._async_client.AsyncClient.get_upload_link:12 #: yadisk._async_client.AsyncClient.get_upload_link_object:16 #: yadisk._async_client.AsyncClient.is_dir:8 #: yadisk._async_client.AsyncClient.is_file:8 #: yadisk._async_client.AsyncClient.is_public_dir:9 #: yadisk._async_client.AsyncClient.is_public_file:9 #: yadisk._async_client.AsyncClient.is_trash_dir:8 #: yadisk._async_client.AsyncClient.is_trash_file:8 #: yadisk._async_client.AsyncClient.listdir:14 #: yadisk._async_client.AsyncClient.makedirs:10 #: yadisk._async_client.AsyncClient.mkdir:9 #: yadisk._async_client.AsyncClient.move:16 #: yadisk._async_client.AsyncClient.patch:10 #: yadisk._async_client.AsyncClient.public_exists:9 #: yadisk._async_client.AsyncClient.publish:12 #: yadisk._async_client.AsyncClient.refresh_token:8 #: yadisk._async_client.AsyncClient.remove:17 #: yadisk._async_client.AsyncClient.remove_trash:14 #: yadisk._async_client.AsyncClient.rename:17 #: yadisk._async_client.AsyncClient.restore_trash:17 #: yadisk._async_client.AsyncClient.revoke_token:8 #: yadisk._async_client.AsyncClient.save_to_disk:19 #: yadisk._async_client.AsyncClient.trash_exists:8 #: yadisk._async_client.AsyncClient.trash_listdir:14 #: yadisk._async_client.AsyncClient.unpublish:11 #: yadisk._async_client.AsyncClient.update_public_settings:9 #: yadisk._async_client.AsyncClient.upload:14 #: yadisk._async_client.AsyncClient.upload_by_link:11 #: yadisk._async_client.AsyncClient.upload_url:15 #: yadisk._async_client.AsyncClient.wait_for_operation:12 #: yadisk._client.Client.check_token:8 yadisk._client.Client.copy:19 #: yadisk._client.Client.download:9 yadisk._client.Client.download_by_link:9 #: yadisk._client.Client.download_public:10 yadisk._client.Client.exists:8 #: yadisk._client.Client.get_all_public_resources:14 #: yadisk._client.Client.get_device_code:15 #: yadisk._client.Client.get_disk_info:9 #: yadisk._client.Client.get_download_link:8 yadisk._client.Client.get_files:15 #: yadisk._client.Client.get_last_uploaded:12 yadisk._client.Client.get_meta:14 #: yadisk._client.Client.get_operation_status:8 #: yadisk._client.Client.get_public_available_settings:8 #: yadisk._client.Client.get_public_download_link:9 #: yadisk._client.Client.get_public_meta:17 #: yadisk._client.Client.get_public_resources:13 #: yadisk._client.Client.get_public_settings:10 #: yadisk._client.Client.get_public_type:9 yadisk._client.Client.get_token:11 #: yadisk._client.Client.get_token_from_device_code:10 #: yadisk._client.Client.get_trash_meta:14 #: yadisk._client.Client.get_trash_type:8 yadisk._client.Client.get_type:8 #: yadisk._client.Client.get_upload_link:12 #: yadisk._client.Client.get_upload_link_object:16 #: yadisk._client.Client.is_dir:8 yadisk._client.Client.is_file:8 #: yadisk._client.Client.is_public_dir:9 yadisk._client.Client.is_public_file:9 #: yadisk._client.Client.is_trash_dir:8 yadisk._client.Client.is_trash_file:8 #: yadisk._client.Client.listdir:14 yadisk._client.Client.makedirs:10 #: yadisk._client.Client.mkdir:9 yadisk._client.Client.move:16 #: yadisk._client.Client.patch:10 yadisk._client.Client.public_exists:9 #: yadisk._client.Client.publish:12 yadisk._client.Client.refresh_token:8 #: yadisk._client.Client.remove:17 yadisk._client.Client.remove_trash:14 #: yadisk._client.Client.rename:17 yadisk._client.Client.restore_trash:17 #: yadisk._client.Client.revoke_token:8 yadisk._client.Client.save_to_disk:19 #: yadisk._client.Client.trash_exists:8 yadisk._client.Client.trash_listdir:14 #: yadisk._client.Client.unpublish:9 #: yadisk._client.Client.update_public_settings:9 #: yadisk._client.Client.upload:15 yadisk._client.Client.upload_by_link:12 #: yadisk._client.Client.upload_url:15 #: yadisk._client.Client.wait_for_operation:12 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:7 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:11 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:7 #: yadisk.objects._operations.SyncOperationLinkObject.wait:11 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:8 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:14 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:8 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:8 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:8 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:14 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:14 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:22 #: yadisk.objects._resources.SyncTrashResourceObject.exists:8 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:14 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:8 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:8 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:8 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:14 #: yadisk.objects._resources.SyncTrashResourceObject.remove:14 #: yadisk.objects._resources.SyncTrashResourceObject.restore:22 #: yadisk.utils.async_auto_retry:10 yadisk.utils.auto_retry:10 msgid "`tuple`, additional exception classes to retry on" msgstr "" "`tuple`, дополнительные классы исключений, которые вызовут повторную " "попытку" #: of yadisk._async_client.AsyncClient.check_token:9 #: yadisk._async_client.AsyncClient.copy:20 #: yadisk._async_client.AsyncClient.download:10 #: yadisk._async_client.AsyncClient.download_by_link:10 #: yadisk._async_client.AsyncClient.download_public:11 #: yadisk._async_client.AsyncClient.exists:9 #: yadisk._async_client.AsyncClient.get_device_code:17 #: yadisk._async_client.AsyncClient.get_disk_info:10 #: yadisk._async_client.AsyncClient.get_download_link:9 #: yadisk._async_client.AsyncClient.get_files:16 #: yadisk._async_client.AsyncClient.get_last_uploaded:13 #: yadisk._async_client.AsyncClient.get_meta:15 #: yadisk._async_client.AsyncClient.get_operation_status:9 #: yadisk._async_client.AsyncClient.get_public_available_settings:9 #: yadisk._async_client.AsyncClient.get_public_download_link:10 #: yadisk._async_client.AsyncClient.get_public_meta:18 #: yadisk._async_client.AsyncClient.get_public_resources:14 #: yadisk._async_client.AsyncClient.get_public_settings:11 #: yadisk._async_client.AsyncClient.get_public_type:10 #: yadisk._async_client.AsyncClient.get_token:11 #: yadisk._async_client.AsyncClient.get_token_from_device_code:12 #: yadisk._async_client.AsyncClient.get_trash_meta:15 #: yadisk._async_client.AsyncClient.get_trash_type:9 #: yadisk._async_client.AsyncClient.get_type:9 #: yadisk._async_client.AsyncClient.get_upload_link:13 #: yadisk._async_client.AsyncClient.get_upload_link_object:17 #: yadisk._async_client.AsyncClient.is_dir:9 #: yadisk._async_client.AsyncClient.is_file:9 #: yadisk._async_client.AsyncClient.is_public_dir:10 #: yadisk._async_client.AsyncClient.is_public_file:10 #: yadisk._async_client.AsyncClient.is_trash_dir:9 #: yadisk._async_client.AsyncClient.is_trash_file:9 #: yadisk._async_client.AsyncClient.listdir:15 #: yadisk._async_client.AsyncClient.makedirs:11 #: yadisk._async_client.AsyncClient.mkdir:10 #: yadisk._async_client.AsyncClient.move:17 #: yadisk._async_client.AsyncClient.patch:11 #: yadisk._async_client.AsyncClient.public_exists:10 #: yadisk._async_client.AsyncClient.publish:13 #: yadisk._async_client.AsyncClient.refresh_token:9 #: yadisk._async_client.AsyncClient.remove:18 #: yadisk._async_client.AsyncClient.remove_trash:15 #: yadisk._async_client.AsyncClient.rename:18 #: yadisk._async_client.AsyncClient.restore_trash:18 #: yadisk._async_client.AsyncClient.revoke_token:9 #: yadisk._async_client.AsyncClient.save_to_disk:20 #: yadisk._async_client.AsyncClient.trash_exists:9 #: yadisk._async_client.AsyncClient.trash_listdir:15 #: yadisk._async_client.AsyncClient.unpublish:12 #: yadisk._async_client.AsyncClient.update_public_settings:10 #: yadisk._async_client.AsyncClient.upload:15 #: yadisk._async_client.AsyncClient.upload_by_link:12 #: yadisk._async_client.AsyncClient.upload_url:16 #: yadisk._async_client.AsyncClient.wait_for_operation:13 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:8 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:12 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:9 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:15 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:9 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:9 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:9 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:15 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:15 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:23 msgid "`dict`, additional parameters for :any:`AIOHTTPSession`" msgstr "`dict`, дополнительные параметры для :any:`AIOHTTPSession`" #: of yadisk._async_client.AsyncClient.check_token:10 #: yadisk._async_client.AsyncClient.copy:21 #: yadisk._async_client.AsyncClient.download:11 #: yadisk._async_client.AsyncClient.download_by_link:11 #: yadisk._async_client.AsyncClient.download_public:12 #: yadisk._async_client.AsyncClient.exists:10 #: yadisk._async_client.AsyncClient.get_device_code:18 #: yadisk._async_client.AsyncClient.get_disk_info:11 #: yadisk._async_client.AsyncClient.get_download_link:10 #: yadisk._async_client.AsyncClient.get_files:17 #: yadisk._async_client.AsyncClient.get_last_uploaded:14 #: yadisk._async_client.AsyncClient.get_meta:16 #: yadisk._async_client.AsyncClient.get_operation_status:10 #: yadisk._async_client.AsyncClient.get_public_available_settings:10 #: yadisk._async_client.AsyncClient.get_public_download_link:11 #: yadisk._async_client.AsyncClient.get_public_meta:19 #: yadisk._async_client.AsyncClient.get_public_resources:15 #: yadisk._async_client.AsyncClient.get_public_settings:12 #: yadisk._async_client.AsyncClient.get_public_type:11 #: yadisk._async_client.AsyncClient.get_token:12 #: yadisk._async_client.AsyncClient.get_token_from_device_code:13 #: yadisk._async_client.AsyncClient.get_trash_meta:16 #: yadisk._async_client.AsyncClient.get_trash_type:10 #: yadisk._async_client.AsyncClient.get_type:10 #: yadisk._async_client.AsyncClient.get_upload_link:14 #: yadisk._async_client.AsyncClient.get_upload_link_object:18 #: yadisk._async_client.AsyncClient.is_dir:10 #: yadisk._async_client.AsyncClient.is_file:10 #: yadisk._async_client.AsyncClient.is_public_dir:11 #: yadisk._async_client.AsyncClient.is_public_file:11 #: yadisk._async_client.AsyncClient.is_trash_dir:10 #: yadisk._async_client.AsyncClient.is_trash_file:10 #: yadisk._async_client.AsyncClient.listdir:16 #: yadisk._async_client.AsyncClient.makedirs:12 #: yadisk._async_client.AsyncClient.mkdir:11 #: yadisk._async_client.AsyncClient.move:18 #: yadisk._async_client.AsyncClient.patch:12 #: yadisk._async_client.AsyncClient.public_exists:11 #: yadisk._async_client.AsyncClient.publish:14 #: yadisk._async_client.AsyncClient.refresh_token:10 #: yadisk._async_client.AsyncClient.remove:19 #: yadisk._async_client.AsyncClient.remove_trash:16 #: yadisk._async_client.AsyncClient.rename:19 #: yadisk._async_client.AsyncClient.restore_trash:19 #: yadisk._async_client.AsyncClient.revoke_token:10 #: yadisk._async_client.AsyncClient.save_to_disk:21 #: yadisk._async_client.AsyncClient.trash_exists:10 #: yadisk._async_client.AsyncClient.trash_listdir:16 #: yadisk._async_client.AsyncClient.unpublish:13 #: yadisk._async_client.AsyncClient.update_public_settings:11 #: yadisk._async_client.AsyncClient.upload:16 #: yadisk._async_client.AsyncClient.upload_by_link:13 #: yadisk._async_client.AsyncClient.upload_url:17 #: yadisk._async_client.AsyncClient.wait_for_operation:14 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:9 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:13 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:10 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:16 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:10 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:10 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:10 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:16 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:16 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:24 msgid "`dict`, additional parameters for :any:`AsyncHTTPXSession`" msgstr "`dict`, дополнительные параметры для :any:`AsyncHTTPXSession`" #: of yadisk._async_client.AsyncClient.check_token:11 #: yadisk._async_client.AsyncClient.copy:22 #: yadisk._async_client.AsyncClient.download:12 #: yadisk._async_client.AsyncClient.download_by_link:12 #: yadisk._async_client.AsyncClient.download_public:13 #: yadisk._async_client.AsyncClient.exists:11 #: yadisk._async_client.AsyncClient.get_all_public_resources:18 #: yadisk._async_client.AsyncClient.get_device_code:19 #: yadisk._async_client.AsyncClient.get_disk_info:12 #: yadisk._async_client.AsyncClient.get_download_link:11 #: yadisk._async_client.AsyncClient.get_files:18 #: yadisk._async_client.AsyncClient.get_last_uploaded:15 #: yadisk._async_client.AsyncClient.get_meta:17 #: yadisk._async_client.AsyncClient.get_operation_status:11 #: yadisk._async_client.AsyncClient.get_public_available_settings:11 #: yadisk._async_client.AsyncClient.get_public_download_link:12 #: yadisk._async_client.AsyncClient.get_public_meta:20 #: yadisk._async_client.AsyncClient.get_public_resources:16 #: yadisk._async_client.AsyncClient.get_public_settings:13 #: yadisk._async_client.AsyncClient.get_public_type:12 #: yadisk._async_client.AsyncClient.get_token:13 #: yadisk._async_client.AsyncClient.get_token_from_device_code:14 #: yadisk._async_client.AsyncClient.get_trash_meta:17 #: yadisk._async_client.AsyncClient.get_trash_type:11 #: yadisk._async_client.AsyncClient.get_type:11 #: yadisk._async_client.AsyncClient.get_upload_link:15 #: yadisk._async_client.AsyncClient.get_upload_link_object:19 #: yadisk._async_client.AsyncClient.is_dir:11 #: yadisk._async_client.AsyncClient.is_file:11 #: yadisk._async_client.AsyncClient.is_public_dir:12 #: yadisk._async_client.AsyncClient.is_public_file:12 #: yadisk._async_client.AsyncClient.is_trash_dir:11 #: yadisk._async_client.AsyncClient.is_trash_file:11 #: yadisk._async_client.AsyncClient.listdir:17 #: yadisk._async_client.AsyncClient.makedirs:13 #: yadisk._async_client.AsyncClient.mkdir:12 #: yadisk._async_client.AsyncClient.move:19 #: yadisk._async_client.AsyncClient.patch:13 #: yadisk._async_client.AsyncClient.public_exists:12 #: yadisk._async_client.AsyncClient.publish:15 #: yadisk._async_client.AsyncClient.refresh_token:11 #: yadisk._async_client.AsyncClient.remove:20 #: yadisk._async_client.AsyncClient.remove_trash:17 #: yadisk._async_client.AsyncClient.rename:20 #: yadisk._async_client.AsyncClient.restore_trash:20 #: yadisk._async_client.AsyncClient.revoke_token:11 #: yadisk._async_client.AsyncClient.save_to_disk:22 #: yadisk._async_client.AsyncClient.trash_exists:11 #: yadisk._async_client.AsyncClient.trash_listdir:17 #: yadisk._async_client.AsyncClient.unpublish:14 #: yadisk._async_client.AsyncClient.update_public_settings:12 #: yadisk._async_client.AsyncClient.upload:17 #: yadisk._async_client.AsyncClient.upload_by_link:14 #: yadisk._async_client.AsyncClient.upload_url:18 #: yadisk._async_client.AsyncClient.wait_for_operation:15 #: yadisk._client.Client.check_token:12 yadisk._client.Client.copy:23 #: yadisk._client.Client.download:13 yadisk._client.Client.download_by_link:13 #: yadisk._client.Client.download_public:14 yadisk._client.Client.exists:12 #: yadisk._client.Client.get_all_public_resources:18 #: yadisk._client.Client.get_device_code:19 #: yadisk._client.Client.get_disk_info:13 #: yadisk._client.Client.get_download_link:12 #: yadisk._client.Client.get_files:19 #: yadisk._client.Client.get_last_uploaded:16 yadisk._client.Client.get_meta:18 #: yadisk._client.Client.get_operation_status:12 #: yadisk._client.Client.get_public_available_settings:12 #: yadisk._client.Client.get_public_download_link:13 #: yadisk._client.Client.get_public_meta:21 #: yadisk._client.Client.get_public_resources:17 #: yadisk._client.Client.get_public_settings:14 #: yadisk._client.Client.get_public_type:13 yadisk._client.Client.get_token:15 #: yadisk._client.Client.get_token_from_device_code:14 #: yadisk._client.Client.get_trash_meta:18 #: yadisk._client.Client.get_trash_type:12 yadisk._client.Client.get_type:12 #: yadisk._client.Client.get_upload_link:16 #: yadisk._client.Client.get_upload_link_object:20 #: yadisk._client.Client.is_dir:12 yadisk._client.Client.is_file:12 #: yadisk._client.Client.is_public_dir:13 #: yadisk._client.Client.is_public_file:13 #: yadisk._client.Client.is_trash_dir:12 yadisk._client.Client.is_trash_file:12 #: yadisk._client.Client.listdir:18 yadisk._client.Client.makedirs:14 #: yadisk._client.Client.mkdir:13 yadisk._client.Client.move:20 #: yadisk._client.Client.patch:14 yadisk._client.Client.public_exists:13 #: yadisk._client.Client.publish:16 yadisk._client.Client.refresh_token:12 #: yadisk._client.Client.remove:21 yadisk._client.Client.remove_trash:18 #: yadisk._client.Client.rename:21 yadisk._client.Client.restore_trash:21 #: yadisk._client.Client.revoke_token:12 yadisk._client.Client.save_to_disk:23 #: yadisk._client.Client.trash_exists:12 yadisk._client.Client.trash_listdir:18 #: yadisk._client.Client.unpublish:13 #: yadisk._client.Client.update_public_settings:13 #: yadisk._client.Client.upload:19 yadisk._client.Client.upload_by_link:16 #: yadisk._client.Client.upload_url:19 #: yadisk._client.Client.wait_for_operation:16 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:10 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:14 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:11 #: yadisk.objects._operations.SyncOperationLinkObject.wait:15 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:11 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:17 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:11 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:11 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:11 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:17 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:17 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:25 #: yadisk.objects._resources.SyncTrashResourceObject.exists:12 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:18 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:12 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:12 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:12 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:18 #: yadisk.objects._resources.SyncTrashResourceObject.remove:18 #: yadisk.objects._resources.SyncTrashResourceObject.restore:26 msgid "any other parameters, accepted by :any:`Session.send_request()`" msgstr "другие параметры для :any:`Session.send_request()`" #: of yadisk._async_client.AsyncClient.check_token #: yadisk._async_client.AsyncClient.copy #: yadisk._async_client.AsyncClient.download #: yadisk._async_client.AsyncClient.download_public #: yadisk._async_client.AsyncClient.exists #: yadisk._async_client.AsyncClient.get_all_public_resources #: yadisk._async_client.AsyncClient.get_auth_url #: yadisk._async_client.AsyncClient.get_code_url #: yadisk._async_client.AsyncClient.get_device_code #: yadisk._async_client.AsyncClient.get_disk_info #: yadisk._async_client.AsyncClient.get_download_link #: yadisk._async_client.AsyncClient.get_files #: yadisk._async_client.AsyncClient.get_last_uploaded #: yadisk._async_client.AsyncClient.get_meta #: yadisk._async_client.AsyncClient.get_operation_status #: yadisk._async_client.AsyncClient.get_public_available_settings #: yadisk._async_client.AsyncClient.get_public_download_link #: yadisk._async_client.AsyncClient.get_public_meta #: yadisk._async_client.AsyncClient.get_public_resources #: yadisk._async_client.AsyncClient.get_public_settings #: yadisk._async_client.AsyncClient.get_public_type #: yadisk._async_client.AsyncClient.get_token #: yadisk._async_client.AsyncClient.get_token_from_device_code #: yadisk._async_client.AsyncClient.get_trash_meta #: yadisk._async_client.AsyncClient.get_trash_type #: yadisk._async_client.AsyncClient.get_type #: yadisk._async_client.AsyncClient.get_upload_link #: yadisk._async_client.AsyncClient.get_upload_link_object #: yadisk._async_client.AsyncClient.is_dir #: yadisk._async_client.AsyncClient.is_file #: yadisk._async_client.AsyncClient.is_public_dir #: yadisk._async_client.AsyncClient.is_public_file #: yadisk._async_client.AsyncClient.is_trash_dir #: yadisk._async_client.AsyncClient.is_trash_file #: yadisk._async_client.AsyncClient.listdir #: yadisk._async_client.AsyncClient.makedirs #: yadisk._async_client.AsyncClient.mkdir yadisk._async_client.AsyncClient.move #: yadisk._async_client.AsyncClient.patch #: yadisk._async_client.AsyncClient.public_exists #: yadisk._async_client.AsyncClient.publish #: yadisk._async_client.AsyncClient.refresh_token #: yadisk._async_client.AsyncClient.remove #: yadisk._async_client.AsyncClient.remove_trash #: yadisk._async_client.AsyncClient.rename #: yadisk._async_client.AsyncClient.restore_trash #: yadisk._async_client.AsyncClient.revoke_token #: yadisk._async_client.AsyncClient.save_to_disk #: yadisk._async_client.AsyncClient.trash_exists #: yadisk._async_client.AsyncClient.trash_listdir #: yadisk._async_client.AsyncClient.unpublish #: yadisk._async_client.AsyncClient.update_public_settings #: yadisk._async_client.AsyncClient.upload #: yadisk._async_client.AsyncClient.upload_url #: yadisk._async_session.AsyncResponse.get_exception #: yadisk._async_session.AsyncResponse.json #: yadisk._async_session.AsyncSession.send_request #: yadisk._client.Client.check_token yadisk._client.Client.copy #: yadisk._client.Client.download yadisk._client.Client.download_public #: yadisk._client.Client.exists yadisk._client.Client.get_all_public_resources #: yadisk._client.Client.get_auth_url yadisk._client.Client.get_code_url #: yadisk._client.Client.get_device_code yadisk._client.Client.get_disk_info #: yadisk._client.Client.get_download_link yadisk._client.Client.get_files #: yadisk._client.Client.get_last_uploaded yadisk._client.Client.get_meta #: yadisk._client.Client.get_operation_status #: yadisk._client.Client.get_public_available_settings #: yadisk._client.Client.get_public_download_link #: yadisk._client.Client.get_public_meta #: yadisk._client.Client.get_public_resources #: yadisk._client.Client.get_public_settings #: yadisk._client.Client.get_public_type yadisk._client.Client.get_token #: yadisk._client.Client.get_token_from_device_code #: yadisk._client.Client.get_trash_meta yadisk._client.Client.get_trash_type #: yadisk._client.Client.get_type yadisk._client.Client.get_upload_link #: yadisk._client.Client.get_upload_link_object yadisk._client.Client.is_dir #: yadisk._client.Client.is_file yadisk._client.Client.is_public_dir #: yadisk._client.Client.is_public_file yadisk._client.Client.is_trash_dir #: yadisk._client.Client.is_trash_file yadisk._client.Client.listdir #: yadisk._client.Client.makedirs yadisk._client.Client.mkdir #: yadisk._client.Client.move yadisk._client.Client.patch #: yadisk._client.Client.public_exists yadisk._client.Client.publish #: yadisk._client.Client.refresh_token yadisk._client.Client.remove #: yadisk._client.Client.remove_trash yadisk._client.Client.rename #: yadisk._client.Client.restore_trash yadisk._client.Client.revoke_token #: yadisk._client.Client.save_to_disk yadisk._client.Client.trash_exists #: yadisk._client.Client.trash_listdir yadisk._client.Client.unpublish #: yadisk._client.Client.update_public_settings yadisk._client.Client.upload #: yadisk._client.Client.upload_url yadisk._import_session.import_async_session #: yadisk._import_session.import_session yadisk._session.Response.get_exception #: yadisk._session.Response.json yadisk._session.Session.send_request #: yadisk.objects._operations.AsyncOperationLinkObject.get_status #: yadisk.objects._operations.SyncOperationLinkObject.get_status #: yadisk.objects._resources.AsyncTrashResourceObject.exists #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta #: yadisk.objects._resources.AsyncTrashResourceObject.get_type #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir #: yadisk.objects._resources.AsyncTrashResourceObject.is_file #: yadisk.objects._resources.AsyncTrashResourceObject.listdir #: yadisk.objects._resources.AsyncTrashResourceObject.remove #: yadisk.objects._resources.AsyncTrashResourceObject.restore #: yadisk.objects._resources.SyncTrashResourceObject.exists #: yadisk.objects._resources.SyncTrashResourceObject.get_meta #: yadisk.objects._resources.SyncTrashResourceObject.get_type #: yadisk.objects._resources.SyncTrashResourceObject.is_dir #: yadisk.objects._resources.SyncTrashResourceObject.is_file #: yadisk.objects._resources.SyncTrashResourceObject.listdir #: yadisk.objects._resources.SyncTrashResourceObject.remove #: yadisk.objects._resources.SyncTrashResourceObject.restore #: yadisk.objects._yadisk_object.YaDiskObject.__matmul__ #: yadisk.objects._yadisk_object.YaDiskObject.field #: yadisk.types.AsyncFileLike.read yadisk.types.AsyncFileLike.seek #: yadisk.types.AsyncFileLike.tell yadisk.types.AsyncFileLike.write #: yadisk.types.BinaryAsyncFileLike.read yadisk.types.BinaryAsyncFileLike.seek #: yadisk.types.BinaryAsyncFileLike.tell yadisk.types.BinaryAsyncFileLike.write #: yadisk.utils.async_auto_retry yadisk.utils.auto_retry #: yadisk.utils.get_exception msgid "Returns" msgstr "Возвращает" #: of yadisk._async_client.AsyncClient.check_token:13 #: yadisk._async_client.AsyncClient.exists:15 #: yadisk._async_client.AsyncClient.public_exists:16 #: yadisk._async_client.AsyncClient.trash_exists:15 #: yadisk._client.Client.check_token:14 yadisk._client.Client.exists:16 #: yadisk._client.Client.public_exists:17 yadisk._client.Client.trash_exists:16 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:15 #: yadisk.objects._resources.SyncTrashResourceObject.exists:16 msgid "`bool`" msgstr "`bool`" #: of yadisk._async_client.AsyncClient.get_auth_url:1 #: yadisk._client.Client.get_auth_url:1 msgid "" "Get authentication URL for the user to go to. This method doesn't send " "any HTTP requests and merely constructs the URL." msgstr "" "Получает URL для аутентификации для пользователя. Данный метод не " "отправляет никаких HTTP запросов." #: of yadisk._async_client.AsyncClient.get_auth_url:4 #: yadisk._client.Client.get_auth_url:4 msgid "" "response type (\"code\" to get the confirmation code or \"token\" to get " "the token automatically)" msgstr "" "тип ответа (\"code\", чтобы получить код подтверждения или \"token\", " "чтобы получить токен автоматически)" #: of yadisk._async_client.AsyncClient.get_auth_url:5 #: yadisk._async_client.AsyncClient.get_code_url:5 #: yadisk._client.Client.get_auth_url:5 yadisk._client.Client.get_code_url:5 msgid "unique device ID, must be between 6 and 50 characters" msgstr "уникальный идентификатор устройства, от 6 до 50 символов" #: of yadisk._async_client.AsyncClient.get_auth_url:6 #: yadisk._async_client.AsyncClient.get_code_url:6 #: yadisk._async_client.AsyncClient.get_device_code:9 #: yadisk._async_client.AsyncClient.get_token_from_device_code:5 #: yadisk._client.Client.get_auth_url:6 yadisk._client.Client.get_code_url:6 #: yadisk._client.Client.get_device_code:8 yadisk._client.Client.get_token:5 #: yadisk._client.Client.get_token_from_device_code:5 msgid "device name, should not be longer than 100 characters" msgstr "имя устройства, не более 100 символов" #: of yadisk._async_client.AsyncClient.get_auth_url:7 #: yadisk._async_client.AsyncClient.get_code_url:7 #: yadisk._client.Client.get_auth_url:7 yadisk._client.Client.get_code_url:7 msgid "" "the URL to redirect the user to after they allow access to the app, by " "default, the first redirect URI specified in the app settings is used" msgstr "" "URL на который пользователь будет перенаправлен после предоставления " "доступа приложению, по умолчанию используется первый URI, указанный в " "настройках приложения" #: of yadisk._async_client.AsyncClient.get_auth_url:10 #: yadisk._async_client.AsyncClient.get_code_url:10 #: yadisk._client.Client.get_auth_url:10 yadisk._client.Client.get_code_url:10 msgid "doesn't do anything, kept for compatibility" msgstr "ничего не делает, оставлен для совместимости" #: of yadisk._async_client.AsyncClient.get_auth_url:11 #: yadisk._async_client.AsyncClient.get_code_url:11 #: yadisk._client.Client.get_auth_url:11 yadisk._client.Client.get_code_url:11 msgid "username or email for the account the token is being requested for" msgstr "username или email аккаунта, для которого будет получен токен" #: of yadisk._async_client.AsyncClient.get_auth_url:12 #: yadisk._async_client.AsyncClient.get_code_url:12 #: yadisk._async_client.AsyncClient.get_device_code:10 #: yadisk._client.Client.get_auth_url:12 yadisk._client.Client.get_code_url:12 #: yadisk._client.Client.get_device_code:9 msgid "`str`, list of permissions for the application" msgstr "`str`, список разрешений для приложения" #: of yadisk._async_client.AsyncClient.get_auth_url:13 #: yadisk._async_client.AsyncClient.get_code_url:13 #: yadisk._async_client.AsyncClient.get_device_code:11 #: yadisk._client.Client.get_auth_url:13 yadisk._client.Client.get_code_url:13 #: yadisk._client.Client.get_device_code:10 msgid "`str`, list of optional permissions for the application" msgstr "`str`, список опциональных разрешений для приложения" #: of yadisk._async_client.AsyncClient.get_auth_url:14 #: yadisk._async_client.AsyncClient.get_code_url:14 #: yadisk._client.Client.get_auth_url:14 yadisk._client.Client.get_code_url:14 msgid "" "if True, user will be required to confirm access to the account even if " "the user has already granted access for the application" msgstr "" "Если `True`, пользователь должен будет разрешить доступ к аккаунту, даже " "если он уже это сделал до этого" #: of yadisk._async_client.AsyncClient.get_auth_url:16 #: yadisk._async_client.AsyncClient.get_code_url:16 #: yadisk._client.Client.get_auth_url:16 yadisk._client.Client.get_code_url:16 msgid "" "The state string, which Yandex.OAuth returns without any changes (<= 1024" " characters)" msgstr "" "Строка состояния, которую Яндекс.OAuth возвращает без изменений (<= 1024 " "символов)" #: of yadisk._async_client.AsyncClient.get_auth_url:17 #: yadisk._async_client.AsyncClient.get_code_url:17 #: yadisk._client.Client.get_auth_url:17 yadisk._client.Client.get_code_url:17 msgid "" "string derived from the generated :code:`code_verifier` value using one " "of the two possible transformations (plain or S256)" msgstr "" "строка, полученная из сгенерированного значения :code:`code_verifier` с " "помощью одного из двух возможных преобразований (plain или S256)" #: of yadisk._async_client.AsyncClient.get_auth_url:19 #: yadisk._async_client.AsyncClient.get_code_url:19 #: yadisk._client.Client.get_auth_url:19 yadisk._client.Client.get_code_url:19 msgid "" "specifies what function was used to transform the :code:`code_verifier` " "value to :code:`code_challenge`, allowed values are :code:`\"plain\"` and" " :code:`\"S256\"` (recommended). If :code:`\"S256\"` is used, " ":code:`code_challenge` must be produced by hashing the " ":code:`code_verifier` value and encoding it to base64" msgstr "" "Указывает функцию, которая будет использована для преобразования значения" " :code:`code_verifier`, возможные значения: :code:`\"plain\"` и " ":code:`\"S256\"` (рекомендуется). Если используется :code:`\"S256\"`, " "значение :code:`code_challenge` должно быть получено путём хэширования " "значения :code:`code_verifier` и кодирования в base64" #: of yadisk._async_client.AsyncClient.get_auth_url:25 #: yadisk._async_client.AsyncClient.get_code_url:25 #: yadisk._client.Client.get_auth_url:25 yadisk._client.Client.get_code_url:25 msgid "invalid arguments were passed" msgstr "были переданы неправильные аргументы" #: of yadisk._async_client.AsyncClient.get_auth_url:27 #: yadisk._async_client.AsyncClient.get_code_url:27 #: yadisk._client.Client.get_auth_url:27 yadisk._client.Client.get_code_url:27 msgid "authentication URL" msgstr "URL для аутентификации" #: of yadisk._async_client.AsyncClient.get_code_url:1 #: yadisk._client.Client.get_code_url:1 msgid "" "Get the URL for the user to get the confirmation code. The confirmation " "code can later be used to get the token. This method doesn't send any " "HTTP requests and merely constructs the URL." msgstr "" "Получает URL для получения пользователем кода подтверждения. Он может " "быть использован для получения токена. Данный метод не отправляет никаких" " HTTP запросов." #: of yadisk._async_client.AsyncClient.get_device_code:1 msgid "" "This request is used for authorization using the Yandex OAuth page. In " "this case the user must enter the verification code (:code:`user_code`) " "in the browser on the Yandex OAuth page. After the user has entered the " "code on the OAuth page, the application can exchange the " ":code:`device_code` for the token using the " ":any:`AsyncClient.get_token_from_device_code()`." msgstr "" "Данный запрос используется для авторизации с помощью страницы Яндекс " "OAuth. В данном случае пользователь должен ввести код подтверждения " "(:code:`user_code`) в браузере на странице Яндекс OAuth. После того как " "пользователь ввёл код, приложение может обменять :code:`device_code` на " "токен с помощью метода :any:`AsyncClient.get_token_from_device_code()`." #: of yadisk._async_client.AsyncClient.get_device_code:8 #: yadisk._async_client.AsyncClient.get_token:4 #: yadisk._async_client.AsyncClient.get_token_from_device_code:4 #: yadisk._client.Client.get_device_code:7 yadisk._client.Client.get_token:4 #: yadisk._client.Client.get_token_from_device_code:4 msgid "unique device ID (between 6 and 50 characters)" msgstr "уникальный идентификатор устройства (между 6 и 50 символами)" #: of yadisk._async_client.AsyncClient.get_device_code:21 #: yadisk._async_client.AsyncClient.get_token:17 #: yadisk._async_client.AsyncClient.get_token_from_device_code:19 #: yadisk._async_client.AsyncClient.refresh_token:15 #: yadisk._async_client.AsyncClient.revoke_token:14 #: yadisk._client.Client.get_token:19 #: yadisk._client.Client.get_token_from_device_code:19 #: yadisk._client.Client.refresh_token:16 yadisk._client.Client.revoke_token:15 msgid "invalid client ID or client secret" msgstr "неправильный идентификатор или пароль приложения" #: of yadisk._async_client.AsyncClient.get_device_code:22 #: yadisk._async_client.AsyncClient.get_token:18 #: yadisk._async_client.AsyncClient.get_token_from_device_code:20 #: yadisk._async_client.AsyncClient.refresh_token:16 #: yadisk._async_client.AsyncClient.revoke_token:17 #: yadisk._client.Client.get_device_code:22 yadisk._client.Client.get_token:20 #: yadisk._client.Client.get_token_from_device_code:20 #: yadisk._client.Client.refresh_token:17 yadisk._client.Client.revoke_token:18 msgid "invalid request parameters" msgstr "неправильные параметры запроса" #: of yadisk._async_client.AsyncClient.get_device_code:24 #: yadisk._client.Client.get_device_code:24 msgid "" ":any:`DeviceCodeObject` containing :code:`user_code` and " ":code:`device_code`" msgstr "" ":any:`DeviceCodeObject`, содержащий :code:`user_code` и " ":code:`device_code`" #: of yadisk._async_client.AsyncClient.get_token:1 #: yadisk._client.Client.get_token:1 msgid "Get a new token." msgstr "Получает новый токен." #: of yadisk._async_client.AsyncClient.get_token:3 #: yadisk._client.Client.get_token:3 msgid "confirmation code" msgstr "код подтверждения" #: of yadisk._async_client.AsyncClient.get_token:5 #: yadisk._async_client.AsyncClient.get_token_from_device_code:6 #: yadisk._client.Client.get_token:6 msgid "`str`, verifier code, used with the PKCE authorization flow" msgstr "`str`, код верификатора, используемый при авторизации с PKCE" #: of yadisk._async_client.AsyncClient.get_token:15 #: yadisk._client.Client.get_token:17 msgid "confirmation code has invalid format" msgstr "неправильный формат кода подтверждения" #: of yadisk._async_client.AsyncClient.get_token:16 #: yadisk._client.Client.get_token:18 msgid "invalid or expired confirmation code" msgstr "неправильный или истекший код" #: of yadisk._async_client.AsyncClient.get_token:20 #: yadisk._async_client.AsyncClient.get_token_from_device_code:22 #: yadisk._async_client.AsyncClient.refresh_token:18 #: yadisk._client.Client.get_token:22 #: yadisk._client.Client.get_token_from_device_code:22 #: yadisk._client.Client.refresh_token:19 msgid ":any:`TokenObject`" msgstr ":any:`TokenObject`" #: of yadisk._async_client.AsyncClient.get_token_from_device_code:1 msgid "" "Get a new token from a device code, previously obtained with " ":any:`AsyncClient.get_device_code()`." msgstr "" "Получает новый токен с помощью кода устройства (device_code), полученного" " с помощью :any:`AsyncClient.get_device_code()`" #: of yadisk._async_client.AsyncClient.get_token_from_device_code:3 msgid "device code, obtained from :any:`AsyncClient.get_device_code()`" msgstr "код устройства, полученный с помощью :any:`AsyncClient.get_device_code()`" #: of yadisk._async_client.AsyncClient.get_all_public_resources:10 #: yadisk._async_client.AsyncClient.get_public_available_settings:4 #: yadisk._async_client.AsyncClient.get_public_settings:6 #: yadisk._async_client.AsyncClient.get_token_from_device_code:7 #: yadisk._async_client.AsyncClient.get_upload_link_object:12 #: yadisk._async_client.AsyncClient.update_public_settings:5 #: yadisk._async_client.AsyncClient.wait_for_operation:8 #: yadisk._client.Client.check_token:4 yadisk._client.Client.copy:15 #: yadisk._client.Client.download:5 yadisk._client.Client.download_by_link:5 #: yadisk._client.Client.download_public:6 yadisk._client.Client.exists:4 #: yadisk._client.Client.get_all_public_resources:10 #: yadisk._client.Client.get_device_code:11 #: yadisk._client.Client.get_disk_info:5 #: yadisk._client.Client.get_download_link:4 yadisk._client.Client.get_files:11 #: yadisk._client.Client.get_last_uploaded:8 yadisk._client.Client.get_meta:10 #: yadisk._client.Client.get_operation_status:4 #: yadisk._client.Client.get_public_available_settings:4 #: yadisk._client.Client.get_public_download_link:5 #: yadisk._client.Client.get_public_meta:13 #: yadisk._client.Client.get_public_resources:9 #: yadisk._client.Client.get_public_settings:6 #: yadisk._client.Client.get_public_type:5 yadisk._client.Client.get_token:7 #: yadisk._client.Client.get_token_from_device_code:6 #: yadisk._client.Client.get_trash_meta:10 #: yadisk._client.Client.get_trash_type:4 yadisk._client.Client.get_type:4 #: yadisk._client.Client.get_upload_link:8 #: yadisk._client.Client.get_upload_link_object:12 #: yadisk._client.Client.is_dir:4 yadisk._client.Client.is_file:4 #: yadisk._client.Client.is_public_dir:5 yadisk._client.Client.is_public_file:5 #: yadisk._client.Client.is_trash_dir:4 yadisk._client.Client.is_trash_file:4 #: yadisk._client.Client.listdir:10 yadisk._client.Client.makedirs:6 #: yadisk._client.Client.mkdir:5 yadisk._client.Client.move:12 #: yadisk._client.Client.patch:6 yadisk._client.Client.public_exists:5 #: yadisk._client.Client.publish:8 yadisk._client.Client.refresh_token:4 #: yadisk._client.Client.remove:13 yadisk._client.Client.remove_trash:10 #: yadisk._client.Client.rename:13 yadisk._client.Client.restore_trash:13 #: yadisk._client.Client.revoke_token:4 yadisk._client.Client.save_to_disk:15 #: yadisk._client.Client.trash_exists:4 yadisk._client.Client.trash_listdir:10 #: yadisk._client.Client.unpublish:5 #: yadisk._client.Client.update_public_settings:5 #: yadisk._client.Client.upload:11 yadisk._client.Client.upload_by_link:8 #: yadisk._client.Client.upload_url:11 #: yadisk._client.Client.wait_for_operation:8 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:3 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:7 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:3 #: yadisk.objects._operations.SyncOperationLinkObject.wait:7 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:4 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:10 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:4 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:4 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:4 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:10 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:10 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:18 #: yadisk.objects._resources.SyncTrashResourceObject.exists:4 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:10 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:4 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:4 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:4 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:10 #: yadisk.objects._resources.SyncTrashResourceObject.remove:10 #: yadisk.objects._resources.SyncTrashResourceObject.restore:18 msgid "`float` or `tuple`, request timeout" msgstr "`float` или `tuple`, таймаут запроса" #: of yadisk._async_client.AsyncClient.get_token_from_device_code:16 #: yadisk._client.Client.get_token_from_device_code:16 msgid "user has not authorized the application yet" msgstr "пользователь ещё не авторизовал приложение" #: of yadisk._async_client.AsyncClient.get_token_from_device_code:17 #: yadisk._client.Client.get_token_from_device_code:17 msgid ":code:`device_code` has invalid format" msgstr "неправильный формат :code:`device_code`" #: of yadisk._async_client.AsyncClient.get_token_from_device_code:18 #: yadisk._client.Client.get_token_from_device_code:18 msgid "invalid or expired :code:`device_code`" msgstr "неправильный или истекший :code:`device_code`" #: of yadisk._async_client.AsyncClient.refresh_token:1 #: yadisk._client.Client.refresh_token:1 msgid "Refresh an existing token." msgstr "Обновляет существующий токен." #: of yadisk._async_client.AsyncClient.refresh_token:3 #: yadisk._client.Client.refresh_token:3 msgid "the refresh token that was received with the token" msgstr "refresh-токен, полученный вместе с токеном" #: of yadisk._async_client.AsyncClient.refresh_token:13 #: yadisk._client.Client.refresh_token:14 msgid "invalid or expired refresh token or it doesn't belong to this application" msgstr "" "неправильный или истекший refresh-токен или он не принадлежит этому " "приложению" #: of yadisk._async_client.AsyncClient.revoke_token:1 #: yadisk._client.Client.revoke_token:1 msgid "Revoke the token." msgstr "Отзывает токен." #: of yadisk._async_client.AsyncClient.revoke_token:3 msgid "token to revoke, equivalent to `self.token` if `None`" msgstr "токен, подлежащий отзыву, то же самое, что `self.token`, если `None`" #: of yadisk._async_client.AsyncClient.revoke_token:13 #: yadisk._client.Client.revoke_token:14 msgid "specified token doesn't belong to this application" msgstr "указанный токен не принадлежит данному приложению" #: of yadisk._async_client.AsyncClient.revoke_token:15 #: yadisk._client.Client.revoke_token:16 msgid "token could not be revoked because it doesn't have a :code:`device_id`" msgstr "не удалось отозвать токен, потому что у него нет :code:`device_id`" #: of yadisk._async_client.AsyncClient.revoke_token:19 #: yadisk._client.Client.revoke_token:20 msgid ":any:`TokenRevokeStatusObject`" msgstr ":any:`TokenRevokeStatusObject`" #: ../../api_reference/async_api.rst:23 ../../api_reference/sync_api.rst:23 msgid "Disk Info" msgstr "Информация о диске" #: of yadisk._async_client.AsyncClient.get_disk_info:1 #: yadisk._client.Client.get_disk_info:1 msgid "Get disk information." msgstr "Получает информацию о диске." #: of yadisk._async_client.AsyncClient.get_disk_info:3 #: yadisk._client.Client.get_disk_info:3 msgid "list of additional keys to be included in the response" msgstr "список дополнительных ключей, которые будут включены в ответ" #: of yadisk._async_client.AsyncClient.copy:10 #: yadisk._async_client.AsyncClient.get_all_public_resources:9 #: yadisk._async_client.AsyncClient.get_disk_info:4 #: yadisk._async_client.AsyncClient.get_files:10 #: yadisk._async_client.AsyncClient.get_last_uploaded:7 #: yadisk._async_client.AsyncClient.get_meta:9 #: yadisk._async_client.AsyncClient.get_public_meta:12 #: yadisk._async_client.AsyncClient.get_public_resources:8 #: yadisk._async_client.AsyncClient.get_trash_meta:9 #: yadisk._async_client.AsyncClient.get_upload_link_object:8 #: yadisk._async_client.AsyncClient.listdir:9 #: yadisk._async_client.AsyncClient.makedirs:5 #: yadisk._async_client.AsyncClient.mkdir:4 #: yadisk._async_client.AsyncClient.move:7 #: yadisk._async_client.AsyncClient.patch:5 #: yadisk._async_client.AsyncClient.publish:7 #: yadisk._async_client.AsyncClient.remove:8 #: yadisk._async_client.AsyncClient.remove_trash:5 #: yadisk._async_client.AsyncClient.rename:8 #: yadisk._async_client.AsyncClient.restore_trash:8 #: yadisk._async_client.AsyncClient.save_to_disk:10 #: yadisk._async_client.AsyncClient.trash_listdir:9 #: yadisk._async_client.AsyncClient.unpublish:6 #: yadisk._async_client.AsyncClient.upload_url:6 yadisk._client.Client.copy:10 #: yadisk._client.Client.get_all_public_resources:9 #: yadisk._client.Client.get_disk_info:4 yadisk._client.Client.get_files:10 #: yadisk._client.Client.get_last_uploaded:7 yadisk._client.Client.get_meta:9 #: yadisk._client.Client.get_public_meta:12 #: yadisk._client.Client.get_public_resources:8 #: yadisk._client.Client.get_trash_meta:9 #: yadisk._client.Client.get_upload_link_object:8 #: yadisk._client.Client.listdir:9 yadisk._client.Client.makedirs:5 #: yadisk._client.Client.mkdir:4 yadisk._client.Client.move:7 #: yadisk._client.Client.patch:5 yadisk._client.Client.publish:7 #: yadisk._client.Client.remove:12 yadisk._client.Client.remove_trash:5 #: yadisk._client.Client.rename:8 yadisk._client.Client.restore_trash:8 #: yadisk._client.Client.save_to_disk:10 yadisk._client.Client.trash_listdir:9 #: yadisk._client.Client.unpublish:4 yadisk._client.Client.upload_url:6 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:9 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:9 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:5 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:13 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:9 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:9 #: yadisk.objects._resources.SyncTrashResourceObject.remove:5 #: yadisk.objects._resources.SyncTrashResourceObject.restore:13 msgid "list of keys to be included in the response" msgstr "список ключей, которые будут включены в ответ" #: of yadisk._async_client.AsyncClient.copy:26 #: yadisk._async_client.AsyncClient.download:15 #: yadisk._async_client.AsyncClient.download_public:16 #: yadisk._async_client.AsyncClient.exists:13 #: yadisk._async_client.AsyncClient.get_all_public_resources:20 #: yadisk._async_client.AsyncClient.get_disk_info:14 #: yadisk._async_client.AsyncClient.get_download_link:14 #: yadisk._async_client.AsyncClient.get_files:20 #: yadisk._async_client.AsyncClient.get_last_uploaded:17 #: yadisk._async_client.AsyncClient.get_meta:20 #: yadisk._async_client.AsyncClient.get_public_available_settings:14 #: yadisk._async_client.AsyncClient.get_public_download_link:15 #: yadisk._async_client.AsyncClient.get_public_meta:23 #: yadisk._async_client.AsyncClient.get_public_resources:18 #: yadisk._async_client.AsyncClient.get_public_settings:16 #: yadisk._async_client.AsyncClient.get_public_type:15 #: yadisk._async_client.AsyncClient.get_trash_meta:20 #: yadisk._async_client.AsyncClient.get_trash_type:14 #: yadisk._async_client.AsyncClient.get_type:14 #: yadisk._async_client.AsyncClient.get_upload_link:19 #: yadisk._async_client.AsyncClient.get_upload_link_object:23 #: yadisk._async_client.AsyncClient.is_dir:13 #: yadisk._async_client.AsyncClient.is_file:13 #: yadisk._async_client.AsyncClient.is_public_dir:14 #: yadisk._async_client.AsyncClient.is_public_file:14 #: yadisk._async_client.AsyncClient.is_trash_dir:13 #: yadisk._async_client.AsyncClient.is_trash_file:13 #: yadisk._async_client.AsyncClient.listdir:20 #: yadisk._async_client.AsyncClient.makedirs:17 #: yadisk._async_client.AsyncClient.mkdir:17 #: yadisk._async_client.AsyncClient.move:23 #: yadisk._async_client.AsyncClient.patch:16 #: yadisk._async_client.AsyncClient.public_exists:14 #: yadisk._async_client.AsyncClient.publish:18 #: yadisk._async_client.AsyncClient.remove:23 #: yadisk._async_client.AsyncClient.remove_trash:20 #: yadisk._async_client.AsyncClient.rename:24 #: yadisk._async_client.AsyncClient.restore_trash:24 #: yadisk._async_client.AsyncClient.save_to_disk:25 #: yadisk._async_client.AsyncClient.trash_exists:13 #: yadisk._async_client.AsyncClient.trash_listdir:20 #: yadisk._async_client.AsyncClient.unpublish:17 #: yadisk._async_client.AsyncClient.update_public_settings:15 #: yadisk._async_client.AsyncClient.upload:22 #: yadisk._async_client.AsyncClient.upload_url:23 yadisk._client.Client.copy:27 #: yadisk._client.Client.download:16 yadisk._client.Client.download_public:17 #: yadisk._client.Client.exists:14 #: yadisk._client.Client.get_all_public_resources:20 #: yadisk._client.Client.get_disk_info:15 #: yadisk._client.Client.get_download_link:15 #: yadisk._client.Client.get_files:21 #: yadisk._client.Client.get_last_uploaded:18 yadisk._client.Client.get_meta:21 #: yadisk._client.Client.get_public_available_settings:15 #: yadisk._client.Client.get_public_download_link:16 #: yadisk._client.Client.get_public_meta:24 #: yadisk._client.Client.get_public_resources:19 #: yadisk._client.Client.get_public_settings:17 #: yadisk._client.Client.get_public_type:16 #: yadisk._client.Client.get_trash_meta:21 #: yadisk._client.Client.get_trash_type:15 yadisk._client.Client.get_type:15 #: yadisk._client.Client.get_upload_link:20 #: yadisk._client.Client.get_upload_link_object:24 #: yadisk._client.Client.is_dir:14 yadisk._client.Client.is_file:14 #: yadisk._client.Client.is_public_dir:15 #: yadisk._client.Client.is_public_file:15 #: yadisk._client.Client.is_trash_dir:14 yadisk._client.Client.is_trash_file:14 #: yadisk._client.Client.listdir:21 yadisk._client.Client.makedirs:18 #: yadisk._client.Client.mkdir:18 yadisk._client.Client.move:24 #: yadisk._client.Client.patch:17 yadisk._client.Client.public_exists:15 #: yadisk._client.Client.publish:19 yadisk._client.Client.remove:24 #: yadisk._client.Client.remove_trash:21 yadisk._client.Client.rename:25 #: yadisk._client.Client.restore_trash:25 yadisk._client.Client.save_to_disk:26 #: yadisk._client.Client.trash_exists:14 yadisk._client.Client.trash_listdir:21 #: yadisk._client.Client.unpublish:16 #: yadisk._client.Client.update_public_settings:16 #: yadisk._client.Client.upload:24 yadisk._client.Client.upload_url:24 #: yadisk.objects._resources.AsyncTrashResourceObject.exists:13 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:20 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:14 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:13 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:13 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:20 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:20 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:29 #: yadisk.objects._resources.SyncTrashResourceObject.exists:14 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:21 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:15 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:14 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:14 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:21 #: yadisk.objects._resources.SyncTrashResourceObject.remove:21 #: yadisk.objects._resources.SyncTrashResourceObject.restore:30 msgid "application doesn't have enough rights for this request" msgstr "у приложения не хватает прав, чтобы выполнить данный запрос" #: of yadisk._async_client.AsyncClient.copy:36 #: yadisk._async_client.AsyncClient.get_all_public_resources:22 #: yadisk._async_client.AsyncClient.get_disk_info:16 #: yadisk._async_client.AsyncClient.get_download_link:17 #: yadisk._async_client.AsyncClient.get_files:22 #: yadisk._async_client.AsyncClient.get_last_uploaded:19 #: yadisk._async_client.AsyncClient.get_operation_status:15 #: yadisk._async_client.AsyncClient.get_public_available_settings:17 #: yadisk._async_client.AsyncClient.get_public_download_link:18 #: yadisk._async_client.AsyncClient.get_public_meta:25 #: yadisk._async_client.AsyncClient.get_public_resources:20 #: yadisk._async_client.AsyncClient.get_public_settings:19 #: yadisk._async_client.AsyncClient.get_trash_meta:22 #: yadisk._async_client.AsyncClient.get_upload_link:24 #: yadisk._async_client.AsyncClient.mkdir:20 #: yadisk._async_client.AsyncClient.move:31 #: yadisk._async_client.AsyncClient.patch:19 #: yadisk._async_client.AsyncClient.publish:21 #: yadisk._async_client.AsyncClient.remove:32 #: yadisk._async_client.AsyncClient.remove_trash:28 #: yadisk._async_client.AsyncClient.restore_trash:32 #: yadisk._async_client.AsyncClient.save_to_disk:35 #: yadisk._async_client.AsyncClient.unpublish:20 #: yadisk._async_client.AsyncClient.update_public_settings:18 #: yadisk._async_client.AsyncClient.upload_url:32 yadisk._client.Client.copy:37 #: yadisk._client.Client.get_all_public_resources:22 #: yadisk._client.Client.get_disk_info:17 #: yadisk._client.Client.get_download_link:18 #: yadisk._client.Client.get_files:23 #: yadisk._client.Client.get_last_uploaded:20 yadisk._client.Client.get_meta:23 #: yadisk._client.Client.get_operation_status:16 #: yadisk._client.Client.get_public_available_settings:18 #: yadisk._client.Client.get_public_download_link:19 #: yadisk._client.Client.get_public_meta:26 #: yadisk._client.Client.get_public_resources:21 #: yadisk._client.Client.get_public_settings:20 #: yadisk._client.Client.get_trash_meta:23 #: yadisk._client.Client.get_upload_link:25 yadisk._client.Client.mkdir:21 #: yadisk._client.Client.move:32 yadisk._client.Client.patch:20 #: yadisk._client.Client.publish:22 yadisk._client.Client.remove:33 #: yadisk._client.Client.remove_trash:29 yadisk._client.Client.restore_trash:33 #: yadisk._client.Client.save_to_disk:36 yadisk._client.Client.unpublish:19 #: yadisk._client.Client.update_public_settings:19 #: yadisk._client.Client.upload_url:33 msgid "More info about this request:" msgstr "Дополнительная информация о данном запросе:" #: of yadisk._async_client.AsyncClient.get_disk_info:18 #: yadisk._client.Client.get_disk_info:19 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_disk_info:19 #: yadisk._client.Client.get_disk_info:20 msgid "`Polygon `__" msgstr "`Полигон `__" #: of yadisk._async_client.AsyncClient.get_disk_info:21 #: yadisk._client.Client.get_disk_info:22 msgid ":any:`DiskInfoObject`" msgstr ":any:`DiskInfoObject`" #: ../../api_reference/async_api.rst:28 ../../api_reference/sync_api.rst:28 msgid "Metadata About Files" msgstr "Метаданные о файлах" #: of yadisk._async_client.AsyncClient.get_meta:1 #: yadisk._client.Client.get_meta:1 msgid "Get meta information about a file/directory." msgstr "Получает мета-информацию о ресурсе." #: of yadisk._async_client.AsyncClient.exists:3 #: yadisk._async_client.AsyncClient.get_download_link:3 #: yadisk._async_client.AsyncClient.get_meta:3 #: yadisk._async_client.AsyncClient.get_public_available_settings:3 #: yadisk._async_client.AsyncClient.get_public_settings:3 #: yadisk._async_client.AsyncClient.get_type:3 #: yadisk._async_client.AsyncClient.is_dir:3 #: yadisk._async_client.AsyncClient.is_file:3 #: yadisk._async_client.AsyncClient.patch:3 #: yadisk._async_client.AsyncClient.update_public_settings:3 #: yadisk._client.Client.exists:3 yadisk._client.Client.get_download_link:3 #: yadisk._client.Client.get_meta:3 #: yadisk._client.Client.get_public_available_settings:3 #: yadisk._client.Client.get_public_settings:3 yadisk._client.Client.get_type:3 #: yadisk._client.Client.is_dir:3 yadisk._client.Client.is_file:3 #: yadisk._client.Client.patch:3 yadisk._client.Client.update_public_settings:3 msgid "path to the resource" msgstr "путь к ресурсу" #: of yadisk._async_client.AsyncClient.get_meta:4 #: yadisk._async_client.AsyncClient.get_trash_meta:4 #: yadisk._async_client.AsyncClient.listdir:5 #: yadisk._async_client.AsyncClient.trash_listdir:5 #: yadisk._client.Client.get_meta:4 yadisk._client.Client.get_trash_meta:4 #: yadisk._client.Client.listdir:5 yadisk._client.Client.trash_listdir:5 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:4 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:5 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:4 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:5 msgid "number of children resources to be included in the response" msgstr "количество ресурсов в папке, которые будут включены в ответ" #: of yadisk._async_client.AsyncClient.get_meta:5 #: yadisk._async_client.AsyncClient.get_trash_meta:5 #: yadisk._async_client.AsyncClient.listdir:6 #: yadisk._async_client.AsyncClient.trash_listdir:6 #: yadisk._client.Client.get_meta:5 yadisk._client.Client.get_trash_meta:5 #: yadisk._client.Client.listdir:6 yadisk._client.Client.trash_listdir:6 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:5 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:6 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:5 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:6 msgid "number of children resources to be skipped in the response" msgstr "количество ресурсов в папке, которые будут пропущены" #: of yadisk._async_client.AsyncClient.get_all_public_resources:6 #: yadisk._async_client.AsyncClient.get_files:8 #: yadisk._async_client.AsyncClient.get_last_uploaded:5 #: yadisk._async_client.AsyncClient.get_meta:6 #: yadisk._async_client.AsyncClient.get_public_resources:5 #: yadisk._async_client.AsyncClient.get_trash_meta:6 #: yadisk._async_client.AsyncClient.listdir:7 #: yadisk._async_client.AsyncClient.trash_listdir:7 #: yadisk._client.Client.get_all_public_resources:6 #: yadisk._client.Client.get_files:8 yadisk._client.Client.get_last_uploaded:5 #: yadisk._client.Client.get_meta:6 #: yadisk._client.Client.get_public_resources:5 #: yadisk._client.Client.get_trash_meta:6 yadisk._client.Client.listdir:7 #: yadisk._client.Client.trash_listdir:7 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:6 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:7 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:6 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:7 msgid "size of the file preview" msgstr "размер превью файла" #: of yadisk._async_client.AsyncClient.get_all_public_resources:7 #: yadisk._async_client.AsyncClient.get_files:9 #: yadisk._async_client.AsyncClient.get_last_uploaded:6 #: yadisk._async_client.AsyncClient.get_meta:7 #: yadisk._async_client.AsyncClient.get_public_resources:6 #: yadisk._async_client.AsyncClient.get_trash_meta:7 #: yadisk._async_client.AsyncClient.listdir:8 #: yadisk._async_client.AsyncClient.trash_listdir:8 #: yadisk._client.Client.get_all_public_resources:7 #: yadisk._client.Client.get_files:9 yadisk._client.Client.get_last_uploaded:6 #: yadisk._client.Client.get_meta:7 #: yadisk._client.Client.get_public_resources:6 #: yadisk._client.Client.get_trash_meta:7 yadisk._client.Client.listdir:8 #: yadisk._client.Client.trash_listdir:8 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:7 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:8 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:7 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:8 msgid "`bool`, cut the preview to the size specified in the `preview_size`" msgstr "`bool`, обрезает превью согласно размеру, заданному в `preview_size`" #: of yadisk._async_client.AsyncClient.get_files:7 #: yadisk._async_client.AsyncClient.get_meta:8 #: yadisk._async_client.AsyncClient.get_public_meta:9 #: yadisk._async_client.AsyncClient.get_trash_meta:8 #: yadisk._client.Client.get_files:7 yadisk._client.Client.get_meta:8 #: yadisk._client.Client.get_public_meta:9 #: yadisk._client.Client.get_trash_meta:8 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:8 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:8 msgid "`str`, field to be used as a key to sort children resources" msgstr "`str`, поле используемое для сортировки вложенных ресурсов" #: of yadisk._async_client.AsyncClient.copy:24 #: yadisk._async_client.AsyncClient.download:14 #: yadisk._async_client.AsyncClient.download_public:15 #: yadisk._async_client.AsyncClient.get_download_link:13 #: yadisk._async_client.AsyncClient.get_meta:19 #: yadisk._async_client.AsyncClient.get_public_available_settings:13 #: yadisk._async_client.AsyncClient.get_public_download_link:14 #: yadisk._async_client.AsyncClient.get_public_meta:22 #: yadisk._async_client.AsyncClient.get_public_settings:15 #: yadisk._async_client.AsyncClient.get_public_type:14 #: yadisk._async_client.AsyncClient.get_trash_meta:19 #: yadisk._async_client.AsyncClient.get_trash_type:13 #: yadisk._async_client.AsyncClient.get_type:13 #: yadisk._async_client.AsyncClient.listdir:19 #: yadisk._async_client.AsyncClient.move:21 #: yadisk._async_client.AsyncClient.patch:15 #: yadisk._async_client.AsyncClient.publish:17 #: yadisk._async_client.AsyncClient.remove:22 #: yadisk._async_client.AsyncClient.remove_trash:19 #: yadisk._async_client.AsyncClient.rename:22 #: yadisk._async_client.AsyncClient.restore_trash:22 #: yadisk._async_client.AsyncClient.save_to_disk:24 #: yadisk._async_client.AsyncClient.trash_listdir:19 #: yadisk._async_client.AsyncClient.unpublish:16 #: yadisk._async_client.AsyncClient.update_public_settings:14 #: yadisk._client.Client.copy:25 yadisk._client.Client.download:15 #: yadisk._client.Client.download_public:16 #: yadisk._client.Client.get_download_link:14 yadisk._client.Client.get_meta:20 #: yadisk._client.Client.get_public_available_settings:14 #: yadisk._client.Client.get_public_download_link:15 #: yadisk._client.Client.get_public_meta:23 #: yadisk._client.Client.get_public_settings:16 #: yadisk._client.Client.get_public_type:15 #: yadisk._client.Client.get_trash_meta:20 #: yadisk._client.Client.get_trash_type:14 yadisk._client.Client.get_type:14 #: yadisk._client.Client.listdir:20 yadisk._client.Client.move:22 #: yadisk._client.Client.patch:16 yadisk._client.Client.publish:18 #: yadisk._client.Client.remove:23 yadisk._client.Client.remove_trash:20 #: yadisk._client.Client.rename:23 yadisk._client.Client.restore_trash:23 #: yadisk._client.Client.save_to_disk:25 yadisk._client.Client.trash_listdir:20 #: yadisk._client.Client.unpublish:15 #: yadisk._client.Client.update_public_settings:15 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:19 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:13 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:19 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:19 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:27 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:20 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:14 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:20 #: yadisk.objects._resources.SyncTrashResourceObject.remove:20 #: yadisk.objects._resources.SyncTrashResourceObject.restore:28 msgid "resource was not found on Disk" msgstr "ресурс не был найден на Диске" #: of yadisk._async_client.AsyncClient.get_meta:22 #: yadisk._async_client.AsyncClient.get_trash_meta:24 #: yadisk._client.Client.get_meta:25 yadisk._client.Client.get_trash_meta:25 msgid "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_meta:23 #: yadisk._client.Client.get_meta:26 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_meta:25 #: yadisk._async_client.AsyncClient.patch:24 msgid ":any:`AsyncResourceObject`" msgstr ":any:`AsyncResourceObject`" #: of yadisk._async_client.AsyncClient.listdir:1 #: yadisk._client.Client.listdir:1 msgid "Get contents of `path`." msgstr "Получает содержимое `path`." #: of yadisk._async_client.AsyncClient.listdir:3 #: yadisk._client.Client.listdir:3 msgid "path to the directory" msgstr "путь к папке" #: of yadisk._async_client.AsyncClient.get_all_public_resources:3 #: yadisk._async_client.AsyncClient.get_files:4 #: yadisk._async_client.AsyncClient.listdir:4 #: yadisk._async_client.AsyncClient.trash_listdir:4 #: yadisk._client.Client.get_all_public_resources:3 #: yadisk._client.Client.get_files:4 yadisk._client.Client.listdir:4 #: yadisk._client.Client.trash_listdir:4 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:4 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:4 msgid "`int` or `None`, maximum number of returned items (`None` means unlimited)" msgstr "" "`int` или `None`, максимальное число возвращаемых элементов в списке " "(`None` означает неограниченное число)" #: of yadisk._async_client.AsyncClient.listdir:21 #: yadisk._async_client.AsyncClient.trash_listdir:21 #: yadisk._client.Client.listdir:22 yadisk._client.Client.trash_listdir:22 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:21 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:22 msgid "resource is not a directory" msgstr "указанный ресурс не является папкой" #: of yadisk._async_client.AsyncClient.get_files:27 #: yadisk._async_client.AsyncClient.get_last_uploaded:24 #: yadisk._async_client.AsyncClient.listdir:23 msgid "async generator of :any:`AsyncResourceObject`" msgstr "асинхронный генератор :any:`AsyncResourceObject`" #: of yadisk._async_client.AsyncClient.exists:1 yadisk._client.Client.exists:1 msgid "Check whether `path` exists." msgstr "Проверяет, существует ли `path`." #: of yadisk._async_client.AsyncClient.get_type:1 #: yadisk._client.Client.get_type:1 msgid "Get resource type." msgstr "Получает тип ресурса" #: of yadisk._async_client.AsyncClient.get_public_type:17 #: yadisk._async_client.AsyncClient.get_trash_type:16 #: yadisk._async_client.AsyncClient.get_type:16 #: yadisk._client.Client.get_public_type:18 #: yadisk._client.Client.get_trash_type:17 yadisk._client.Client.get_type:17 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:16 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:17 msgid "\"file\" or \"dir\"" msgstr "\"file\" или \"dir\"" #: of yadisk._async_client.AsyncClient.is_file:1 #: yadisk._client.Client.is_file:1 msgid "Check whether `path` is a file." msgstr "Проверяет, является ли `path` файлом." #: of yadisk._async_client.AsyncClient.is_file:15 #: yadisk._client.Client.is_file:16 yadisk._client.Client.is_trash_file:16 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:15 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:16 msgid "`True` if `path` is a file, `False` otherwise (even if it doesn't exist)" msgstr "" "`True`, если `path` является файлом, `False`, в остальных случаях (даже " "если ресурс не существует)" #: of yadisk._async_client.AsyncClient.is_dir:1 yadisk._client.Client.is_dir:1 msgid "Check whether `path` is a directory." msgstr "Проверяет, является ли `path` папкой." #: of yadisk._async_client.AsyncClient.is_dir:15 #: yadisk._async_client.AsyncClient.is_trash_dir:15 #: yadisk._async_client.AsyncClient.is_trash_file:15 #: yadisk._client.Client.is_dir:16 yadisk._client.Client.is_trash_dir:16 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:15 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:16 msgid "" "`True` if `path` is a directory, `False` otherwise (even if it doesn't " "exist)" msgstr "" "`True`, если `path` является папкой, `False`, в остальных случаях (даже " "если ресурс не существует)" #: of yadisk._async_client.AsyncClient.get_files:1 #: yadisk._client.Client.get_files:1 msgid "Get a flat list of all files (that doesn't include directories)." msgstr "Получить плоский список всех файлов (без папок)." #: of yadisk._async_client.AsyncClient.get_all_public_resources:4 #: yadisk._async_client.AsyncClient.get_files:3 #: yadisk._async_client.AsyncClient.get_public_resources:3 #: yadisk._client.Client.get_all_public_resources:4 #: yadisk._client.Client.get_files:3 #: yadisk._client.Client.get_public_resources:3 msgid "offset from the beginning of the list" msgstr "отступ от начала списка" #: of yadisk._async_client.AsyncClient.get_files:5 #: yadisk._client.Client.get_files:5 msgid "number of list elements to be included in each response" msgstr "максимальное количество элементов списка в каждом запросе" #: of yadisk._async_client.AsyncClient.get_files:6 #: yadisk._async_client.AsyncClient.get_last_uploaded:4 #: yadisk._client.Client.get_files:6 yadisk._client.Client.get_last_uploaded:4 msgid "type of files to include in the list" msgstr "тип файлов, которые будут включены в список" #: of yadisk._async_client.AsyncClient.get_files:24 #: yadisk._client.Client.get_files:25 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_files:25 #: yadisk._client.Client.get_files:26 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_last_uploaded:1 #: yadisk._client.Client.get_last_uploaded:1 msgid "Get the list of latest uploaded files sorted by upload date." msgstr "" "Получает список последних загруженных файлов, отсортированный по дате " "загрузки." #: of yadisk._async_client.AsyncClient.get_all_public_resources:5 #: yadisk._async_client.AsyncClient.get_last_uploaded:3 #: yadisk._async_client.AsyncClient.get_public_resources:4 #: yadisk._client.Client.get_all_public_resources:5 #: yadisk._client.Client.get_last_uploaded:3 #: yadisk._client.Client.get_public_resources:4 msgid "maximum number of elements in the list" msgstr "максимальное число элементов в списке" #: of yadisk._async_client.AsyncClient.get_last_uploaded:21 #: yadisk._client.Client.get_last_uploaded:22 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_last_uploaded:22 #: yadisk._client.Client.get_last_uploaded:23 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: ../../api_reference/async_api.rst:40 ../../api_reference/sync_api.rst:40 msgid "Uploading Files" msgstr "Загрузка файлов на Диск" #: of yadisk._async_client.AsyncClient.upload:1 yadisk._client.Client.upload:1 msgid "Upload a file to disk." msgstr "Загружает файл на диск." #: of yadisk._async_client.AsyncClient.upload:3 #: yadisk._async_client.AsyncClient.upload_by_link:3 msgid "path, file-like object or an async generator function to be uploaded" msgstr "" "путь к файлу, файл-подобный объект или функция, возвращающая асинхронный " "генератор для загрузки" #: of yadisk._async_client.AsyncClient.copy:6 #: yadisk._async_client.AsyncClient.get_upload_link:3 #: yadisk._async_client.AsyncClient.get_upload_link_object:6 #: yadisk._async_client.AsyncClient.move:4 #: yadisk._async_client.AsyncClient.restore_trash:5 #: yadisk._async_client.AsyncClient.upload:4 #: yadisk._async_client.AsyncClient.upload_url:4 yadisk._client.Client.copy:6 #: yadisk._client.Client.get_upload_link:3 #: yadisk._client.Client.get_upload_link_object:6 yadisk._client.Client.move:4 #: yadisk._client.Client.restore_trash:5 yadisk._client.Client.upload:5 #: yadisk._client.Client.upload_url:4 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:10 #: yadisk.objects._resources.SyncTrashResourceObject.restore:10 msgid "destination path" msgstr "путь назначения" #: of yadisk._async_client.AsyncClient.upload:5 #: yadisk._async_client.AsyncClient.upload_by_link:5 #: yadisk._client.Client.upload:6 yadisk._client.Client.upload_by_link:6 msgid "" "if `True`, the resource will be overwritten if it already exists, an " "error will be raised otherwise" msgstr "" "если `True`, путь назначения может быть перезаписан, иначе будет вызвана " "ошибка" #: of yadisk._async_client.AsyncClient.get_upload_link:5 #: yadisk._async_client.AsyncClient.get_upload_link_object:9 #: yadisk._async_client.AsyncClient.upload:7 #: yadisk._client.Client.get_upload_link:5 #: yadisk._client.Client.get_upload_link_object:9 #: yadisk._client.Client.upload:8 msgid "" "`bool`, if `True` (default), the `User-Agent` header will be set to a " "special value, which should allow bypassing of Yandex.Disk's upload speed" " limit" msgstr "" "`bool`, если `True` (по умолчанию), будет задано специальное значение " "заголовка `User-Agent`, которое должно позволить обходить ограничение " "скорости загрузки файлов на Диск" #: of yadisk._async_client.AsyncClient.get_upload_link:17 #: yadisk._async_client.AsyncClient.get_upload_link_object:21 #: yadisk._async_client.AsyncClient.mkdir:14 #: yadisk._async_client.AsyncClient.upload:19 #: yadisk._async_client.AsyncClient.upload_url:20 #: yadisk._client.Client.get_upload_link:18 #: yadisk._client.Client.get_upload_link_object:22 #: yadisk._client.Client.mkdir:15 yadisk._client.Client.upload:21 #: yadisk._client.Client.upload_url:21 msgid "parent directory doesn't exist" msgstr "родительская папка не существует" #: of yadisk._async_client.AsyncClient.copy:25 #: yadisk._async_client.AsyncClient.get_upload_link:18 #: yadisk._async_client.AsyncClient.get_upload_link_object:22 #: yadisk._async_client.AsyncClient.makedirs:15 #: yadisk._async_client.AsyncClient.mkdir:15 #: yadisk._async_client.AsyncClient.move:22 #: yadisk._async_client.AsyncClient.rename:23 #: yadisk._async_client.AsyncClient.restore_trash:23 #: yadisk._async_client.AsyncClient.upload:20 #: yadisk._async_client.AsyncClient.upload_url:21 yadisk._client.Client.copy:26 #: yadisk._client.Client.get_upload_link:19 #: yadisk._client.Client.get_upload_link_object:23 #: yadisk._client.Client.makedirs:16 yadisk._client.Client.mkdir:16 #: yadisk._client.Client.move:23 yadisk._client.Client.rename:24 #: yadisk._client.Client.restore_trash:24 yadisk._client.Client.upload:22 #: yadisk._client.Client.upload_url:22 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:28 #: yadisk.objects._resources.SyncTrashResourceObject.restore:29 msgid "destination path already exists" msgstr "путь назначения уже существует" #: of yadisk._async_client.AsyncClient.get_upload_link:21 #: yadisk._async_client.AsyncClient.get_upload_link_object:25 #: yadisk._async_client.AsyncClient.save_to_disk:27 #: yadisk._async_client.AsyncClient.upload:21 #: yadisk._async_client.AsyncClient.upload_by_link:16 #: yadisk._async_client.AsyncClient.upload_url:22 #: yadisk._client.Client.get_upload_link:22 #: yadisk._client.Client.get_upload_link_object:26 #: yadisk._client.Client.save_to_disk:28 yadisk._client.Client.upload:23 #: yadisk._client.Client.upload_by_link:18 yadisk._client.Client.upload_url:23 msgid "cannot upload file due to lack of storage space" msgstr "невозможно загрузить файл из-за нехватки места на Диске" #: of yadisk._async_client.AsyncClient.copy:28 #: yadisk._async_client.AsyncClient.download:16 #: yadisk._async_client.AsyncClient.download_public:17 #: yadisk._async_client.AsyncClient.get_download_link:15 #: yadisk._async_client.AsyncClient.get_public_available_settings:15 #: yadisk._async_client.AsyncClient.get_public_download_link:16 #: yadisk._async_client.AsyncClient.get_public_settings:17 #: yadisk._async_client.AsyncClient.get_upload_link:20 #: yadisk._async_client.AsyncClient.get_upload_link_object:24 #: yadisk._async_client.AsyncClient.makedirs:18 #: yadisk._async_client.AsyncClient.mkdir:18 #: yadisk._async_client.AsyncClient.move:24 #: yadisk._async_client.AsyncClient.patch:17 #: yadisk._async_client.AsyncClient.publish:19 #: yadisk._async_client.AsyncClient.remove:25 #: yadisk._async_client.AsyncClient.remove_trash:21 #: yadisk._async_client.AsyncClient.rename:25 #: yadisk._async_client.AsyncClient.restore_trash:25 #: yadisk._async_client.AsyncClient.save_to_disk:26 #: yadisk._async_client.AsyncClient.unpublish:18 #: yadisk._async_client.AsyncClient.update_public_settings:16 #: yadisk._async_client.AsyncClient.upload:23 #: yadisk._async_client.AsyncClient.upload_url:24 yadisk._client.Client.copy:29 #: yadisk._client.Client.download:17 yadisk._client.Client.download_public:18 #: yadisk._client.Client.get_download_link:16 #: yadisk._client.Client.get_public_available_settings:16 #: yadisk._client.Client.get_public_download_link:17 #: yadisk._client.Client.get_public_settings:18 #: yadisk._client.Client.get_upload_link:21 #: yadisk._client.Client.get_upload_link_object:25 #: yadisk._client.Client.makedirs:19 yadisk._client.Client.mkdir:19 #: yadisk._client.Client.move:25 yadisk._client.Client.patch:18 #: yadisk._client.Client.publish:20 yadisk._client.Client.remove:26 #: yadisk._client.Client.remove_trash:22 yadisk._client.Client.rename:26 #: yadisk._client.Client.restore_trash:26 yadisk._client.Client.save_to_disk:27 #: yadisk._client.Client.unpublish:17 #: yadisk._client.Client.update_public_settings:17 #: yadisk._client.Client.upload:25 yadisk._client.Client.upload_url:25 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:21 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:30 #: yadisk.objects._resources.SyncTrashResourceObject.remove:22 #: yadisk.objects._resources.SyncTrashResourceObject.restore:31 msgid "resource is locked by another request" msgstr "запрашиваемый ресурс заблокирован другой операцией" #: of yadisk._async_client.AsyncClient.copy:29 #: yadisk._async_client.AsyncClient.get_upload_link:22 #: yadisk._async_client.AsyncClient.get_upload_link_object:26 #: yadisk._async_client.AsyncClient.save_to_disk:28 #: yadisk._async_client.AsyncClient.upload:24 #: yadisk._async_client.AsyncClient.upload_url:25 yadisk._client.Client.copy:30 #: yadisk._client.Client.get_upload_link:23 #: yadisk._client.Client.get_upload_link_object:27 #: yadisk._client.Client.save_to_disk:29 yadisk._client.Client.upload:26 #: yadisk._client.Client.upload_url:26 msgid "upload limit has been exceeded" msgstr "достигнут лимит на загрузку файлов" #: of yadisk._async_client.AsyncClient.upload:26 msgid ":any:`AsyncResourceLinkObject`, link to the destination resource" msgstr ":any:`AsyncResourceLinkObject`, ссылка на загруженный ресурс" #: of yadisk._async_client.AsyncClient.get_upload_link:1 #: yadisk._client.Client.get_upload_link:1 msgid "Get a link to upload the file using the PUT request." msgstr "Получает ссылку для загрузки файла на диск при помощи PUT запроса." #: of yadisk._async_client.AsyncClient.get_upload_link:4 #: yadisk._async_client.AsyncClient.get_upload_link_object:7 #: yadisk._async_client.AsyncClient.move:5 #: yadisk._async_client.AsyncClient.rename:6 #: yadisk._client.Client.get_upload_link:4 #: yadisk._client.Client.get_upload_link_object:7 yadisk._client.Client.move:5 #: yadisk._client.Client.rename:6 msgid "`bool`, determines whether to overwrite the destination" msgstr "`bool`, определяет, перезаписывать путь назначения или нет" #: of yadisk._async_client.AsyncClient.get_upload_link:26 #: yadisk._client.Client.get_upload_link:27 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_upload_link:27 #: yadisk._client.Client.get_upload_link:28 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_download_link:22 #: yadisk._async_client.AsyncClient.get_public_download_link:23 #: yadisk._async_client.AsyncClient.get_upload_link:29 #: yadisk._client.Client.get_download_link:23 #: yadisk._client.Client.get_public_download_link:24 #: yadisk._client.Client.get_upload_link:30 #: yadisk.objects._yadisk_object.YaDiskObject.remove_alias:3 #: yadisk.objects._yadisk_object.YaDiskObject.remove_field:3 #: yadisk.objects._yadisk_object.YaDiskObject.set_field_type:3 msgid "`str`" msgstr "`str`" #: of yadisk._async_client.AsyncClient.get_upload_link_object:1 msgid "" "Get a link to upload the file using the PUT request. This is similar to " ":any:`AsyncClient.get_upload_link()`, except it returns an instance of " ":any:`ResourceUploadLinkObject` which also contains an asynchronous " "operation ID." msgstr "" "Получает ссылку для загрузки файла на диск при помощи PUT запроса. Этот " "метод аналогичен :any:`AsyncClient.get_upload_link()`, но возвращает " "объект :any:`ResourceUploadLinkObject`, который также содержит " "идентификатор асинхронной операции." #: of yadisk._async_client.AsyncClient.get_upload_link_object:28 #: yadisk._client.Client.get_upload_link_object:29 msgid ":any:`ResourceUploadLinkObject`" msgstr ":any:`ResourceUploadLinkObject`" #: of yadisk._async_client.AsyncClient.upload_by_link:1 #: yadisk._client.Client.upload_by_link:1 msgid "Upload a file to disk using an upload link." msgstr "Загружает файл на диск по уже полученной ссылке." #: of yadisk._async_client.AsyncClient.upload_by_link:4 #: yadisk._client.Client.upload_by_link:5 msgid "upload link" msgstr "ссылка для загрузки файла" #: of yadisk._async_client.AsyncClient.upload_url:1 #: yadisk._client.Client.upload_url:1 msgid "Upload a file from URL." msgstr "Загружает файл на диск по URL." #: of yadisk._async_client.AsyncClient.upload_url:3 #: yadisk._client.Client.upload_url:3 msgid "source URL" msgstr "исходный URL" #: of yadisk._async_client.AsyncClient.upload_url:5 #: yadisk._client.Client.upload_url:5 msgid "`bool`, forbid redirects" msgstr "`bool`, запретить делать перенаправления" #: of yadisk._async_client.AsyncClient.copy:11 #: yadisk._async_client.AsyncClient.move:8 #: yadisk._async_client.AsyncClient.remove:9 #: yadisk._async_client.AsyncClient.remove_trash:6 #: yadisk._async_client.AsyncClient.rename:9 #: yadisk._async_client.AsyncClient.restore_trash:9 #: yadisk._async_client.AsyncClient.save_to_disk:11 #: yadisk._async_client.AsyncClient.upload_url:7 yadisk._client.Client.copy:11 #: yadisk._client.Client.move:8 yadisk._client.Client.remove:8 #: yadisk._client.Client.remove_trash:6 yadisk._client.Client.rename:9 #: yadisk._client.Client.restore_trash:9 yadisk._client.Client.save_to_disk:11 #: yadisk._client.Client.upload_url:7 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:6 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:14 #: yadisk.objects._resources.SyncTrashResourceObject.remove:6 #: yadisk.objects._resources.SyncTrashResourceObject.restore:14 msgid "" "`bool`, if :code:`True`, the method will wait until the asynchronous " "operation is completed" msgstr "" "`bool`, если :code:`True`, метод будет ожидать завершения асинхронной " "операции" #: of yadisk._async_client.AsyncClient.copy:12 #: yadisk._async_client.AsyncClient.move:9 #: yadisk._async_client.AsyncClient.remove:10 #: yadisk._async_client.AsyncClient.remove_trash:7 #: yadisk._async_client.AsyncClient.rename:10 #: yadisk._async_client.AsyncClient.restore_trash:10 #: yadisk._async_client.AsyncClient.save_to_disk:12 #: yadisk._async_client.AsyncClient.upload_url:8 #: yadisk._async_client.AsyncClient.wait_for_operation:5 #: yadisk._client.Client.copy:12 yadisk._client.Client.move:9 #: yadisk._client.Client.remove:9 yadisk._client.Client.remove_trash:7 #: yadisk._client.Client.rename:10 yadisk._client.Client.restore_trash:10 #: yadisk._client.Client.save_to_disk:12 yadisk._client.Client.upload_url:8 #: yadisk._client.Client.wait_for_operation:5 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:4 #: yadisk.objects._operations.SyncOperationLinkObject.wait:4 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:7 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:15 #: yadisk.objects._resources.SyncTrashResourceObject.remove:7 #: yadisk.objects._resources.SyncTrashResourceObject.restore:15 msgid "`float`, interval in seconds between subsequent operation status queries" msgstr "`float`, интервал в секундах между проверками статуса операции" #: of yadisk._async_client.AsyncClient.copy:13 #: yadisk._async_client.AsyncClient.move:10 #: yadisk._async_client.AsyncClient.remove:11 #: yadisk._async_client.AsyncClient.remove_trash:8 #: yadisk._async_client.AsyncClient.rename:11 #: yadisk._async_client.AsyncClient.restore_trash:11 #: yadisk._async_client.AsyncClient.save_to_disk:13 #: yadisk._async_client.AsyncClient.upload_url:9 #: yadisk._async_client.AsyncClient.wait_for_operation:6 #: yadisk._client.Client.copy:13 yadisk._client.Client.move:10 #: yadisk._client.Client.remove:10 yadisk._client.Client.remove_trash:8 #: yadisk._client.Client.rename:11 yadisk._client.Client.restore_trash:11 #: yadisk._client.Client.save_to_disk:13 yadisk._client.Client.upload_url:9 #: yadisk._client.Client.wait_for_operation:6 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:5 #: yadisk.objects._operations.SyncOperationLinkObject.wait:5 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:8 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:16 #: yadisk.objects._resources.SyncTrashResourceObject.remove:8 #: yadisk.objects._resources.SyncTrashResourceObject.restore:16 msgid "" "`float` or `None`, total polling timeout (`None` means no timeout), if " "this timeout is exceeded, an exception is raised" msgstr "" "`float` or `None`, таймаут ожидания операции (`None` означает отсутствие " "таймаута), если этот таймаут превышен, будет вызвано исключение" #: of yadisk._async_client.AsyncClient.copy:30 #: yadisk._async_client.AsyncClient.get_operation_status:13 #: yadisk._async_client.AsyncClient.move:25 #: yadisk._async_client.AsyncClient.remove:26 #: yadisk._async_client.AsyncClient.remove_trash:22 #: yadisk._async_client.AsyncClient.rename:27 #: yadisk._async_client.AsyncClient.restore_trash:26 #: yadisk._async_client.AsyncClient.save_to_disk:29 #: yadisk._async_client.AsyncClient.upload_url:26 #: yadisk._async_client.AsyncClient.wait_for_operation:17 #: yadisk._client.Client.copy:31 yadisk._client.Client.get_operation_status:14 #: yadisk._client.Client.move:26 yadisk._client.Client.remove:27 #: yadisk._client.Client.remove_trash:23 yadisk._client.Client.rename:28 #: yadisk._client.Client.restore_trash:27 yadisk._client.Client.save_to_disk:30 #: yadisk._client.Client.upload_url:27 #: yadisk._client.Client.wait_for_operation:18 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:12 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:16 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:13 #: yadisk.objects._operations.SyncOperationLinkObject.wait:17 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:22 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:31 #: yadisk.objects._resources.SyncTrashResourceObject.remove:23 #: yadisk.objects._resources.SyncTrashResourceObject.restore:32 msgid "requested operation was not found" msgstr "указанная операция не найдена" #: of yadisk._async_client.AsyncClient.copy:31 #: yadisk._async_client.AsyncClient.move:26 #: yadisk._async_client.AsyncClient.remove:27 #: yadisk._async_client.AsyncClient.remove_trash:23 #: yadisk._async_client.AsyncClient.rename:28 #: yadisk._async_client.AsyncClient.restore_trash:27 #: yadisk._async_client.AsyncClient.save_to_disk:30 #: yadisk._async_client.AsyncClient.upload_url:27 #: yadisk._async_client.AsyncClient.wait_for_operation:18 #: yadisk._client.Client.copy:32 yadisk._client.Client.move:27 #: yadisk._client.Client.remove:28 yadisk._client.Client.remove_trash:24 #: yadisk._client.Client.rename:29 yadisk._client.Client.restore_trash:28 #: yadisk._client.Client.save_to_disk:31 yadisk._client.Client.upload_url:28 #: yadisk._client.Client.wait_for_operation:19 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:17 #: yadisk.objects._operations.SyncOperationLinkObject.wait:18 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:23 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:32 #: yadisk.objects._resources.SyncTrashResourceObject.remove:24 #: yadisk.objects._resources.SyncTrashResourceObject.restore:33 msgid "requested operation failed" msgstr "не удалось совершить операцию" #: of yadisk._async_client.AsyncClient.copy:32 #: yadisk._async_client.AsyncClient.move:27 #: yadisk._async_client.AsyncClient.remove:28 #: yadisk._async_client.AsyncClient.remove_trash:24 #: yadisk._async_client.AsyncClient.rename:29 #: yadisk._async_client.AsyncClient.restore_trash:28 #: yadisk._async_client.AsyncClient.save_to_disk:31 #: yadisk._async_client.AsyncClient.upload_url:28 #: yadisk._async_client.AsyncClient.wait_for_operation:19 #: yadisk._client.Client.copy:33 yadisk._client.Client.move:28 #: yadisk._client.Client.remove:29 yadisk._client.Client.remove_trash:25 #: yadisk._client.Client.rename:30 yadisk._client.Client.restore_trash:29 #: yadisk._client.Client.save_to_disk:32 yadisk._client.Client.upload_url:29 #: yadisk._client.Client.wait_for_operation:20 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:18 #: yadisk.objects._operations.SyncOperationLinkObject.wait:19 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:24 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:33 #: yadisk.objects._resources.SyncTrashResourceObject.remove:25 #: yadisk.objects._resources.SyncTrashResourceObject.restore:34 msgid "" "requested operation did not complete in specified time (when " "`poll_timeout` is not `None`)" msgstr "" "указанная операция не завершилась в указанное время (когда `poll_timeout`" " не `None`)" #: of yadisk._async_client.AsyncClient.upload_url:34 #: yadisk._client.Client.upload_url:35 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.upload_url:35 #: yadisk._client.Client.upload_url:36 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.upload_url:37 msgid ":any:`AsyncOperationLinkObject`, link to the asynchronous operation" msgstr ":any:`AsyncOperationLinkObject`, ссылка на асинхронную операцию" #: ../../api_reference/async_api.rst:49 ../../api_reference/sync_api.rst:49 msgid "Downloading Files" msgstr "Скачивание файлов" #: of yadisk._async_client.AsyncClient.download:1 #: yadisk._client.Client.download:1 msgid "Download the file." msgstr "Скачивает файл." #: of yadisk._async_client.AsyncClient.copy:5 #: yadisk._async_client.AsyncClient.download:3 yadisk._client.Client.copy:5 #: yadisk._client.Client.download:3 msgid "source path" msgstr "исходный путь" #: of yadisk._async_client.AsyncClient.download:4 #: yadisk._async_client.AsyncClient.download_by_link:4 #: yadisk._async_client.AsyncClient.download_public:4 #: yadisk._client.Client.download:4 yadisk._client.Client.download_by_link:4 #: yadisk._client.Client.download_public:4 msgid "destination path or file-like object" msgstr "путь назначения или файл-подобный объект" #: of yadisk._async_client.AsyncClient.download:18 msgid ":any:`AsyncResourceLinkObject`, link to the source resource" msgstr ":any:`AsyncResourceLinkObject`, ссылка на исходный ресурс" #: of yadisk._async_client.AsyncClient.get_download_link:1 #: yadisk._client.Client.get_download_link:1 msgid "Get a download link for a file (or a directory)." msgstr "Получает ссылку на скачивание файла (или папки)." #: of yadisk._async_client.AsyncClient.get_download_link:19 #: yadisk._client.Client.get_download_link:20 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_download_link:20 #: yadisk._client.Client.get_download_link:21 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.download_by_link:1 #: yadisk._client.Client.download_by_link:1 msgid "Download the file from the link." msgstr "Скачивает файл по уже полученной ссылке." #: of yadisk._async_client.AsyncClient.download_by_link:3 #: yadisk._client.Client.download_by_link:3 msgid "download link" msgstr "ссылка для скачивания" #: ../../api_reference/async_api.rst:57 ../../api_reference/sync_api.rst:57 msgid "File Operations" msgstr "Операции над файлами" #: ../../api_reference/async_api.rst:60 ../../api_reference/sync_api.rst:60 msgid "Creating Directories" msgstr "Создаёт папок" #: of yadisk._async_client.AsyncClient.mkdir:1 yadisk._client.Client.mkdir:1 msgid "Create a new directory." msgstr "Создаёт новую папку." #: of yadisk._async_client.AsyncClient.makedirs:4 #: yadisk._async_client.AsyncClient.mkdir:3 yadisk._client.Client.makedirs:4 #: yadisk._client.Client.mkdir:3 msgid "path to the directory to be created" msgstr "путь к папке, подлежащей созданию" #: of yadisk._async_client.AsyncClient.makedirs:16 #: yadisk._async_client.AsyncClient.mkdir:16 yadisk._client.Client.makedirs:17 #: yadisk._client.Client.mkdir:17 msgid "cannot create directory due to lack of storage space" msgstr "невозможно создать папку из-за нехватки места на Диске" #: of yadisk._async_client.AsyncClient.mkdir:22 yadisk._client.Client.mkdir:23 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.mkdir:23 yadisk._client.Client.mkdir:24 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.makedirs:20 #: yadisk._async_client.AsyncClient.mkdir:25 #: yadisk._async_client.AsyncClient.unpublish:25 msgid ":any:`AsyncResourceLinkObject`" msgstr ":any:`AsyncResourceLinkObject`" #: of yadisk._async_client.AsyncClient.makedirs:1 #: yadisk._client.Client.makedirs:1 msgid "" "Create a new directory at `path`. If its parent directory doesn't exist " "it will also be created recursively." msgstr "" "Создаёт новую папку. Если родительская папка не сущсетвует, то онабудет " "также создана рекурсивно." #: ../../api_reference/async_api.rst:67 ../../api_reference/sync_api.rst:67 msgid "Removing Files" msgstr "Удаление файлов" #: of yadisk._async_client.AsyncClient.remove:1 yadisk._client.Client.remove:1 msgid "Remove the resource." msgstr "Удаляет ресурс." #: of yadisk._async_client.AsyncClient.remove:3 yadisk._client.Client.remove:3 msgid "path to the resource to be removed" msgstr "путь к удаляемому ресурсу" #: of yadisk._async_client.AsyncClient.remove:4 yadisk._client.Client.remove:4 msgid "" "if `True`, the resource will be removed permanently, otherwise, it will " "be just moved to the trash" msgstr "" "если `True`, ресурс будет безвозвратно удалён, иначе ресурс будет " "перемещён в корзину" #: of yadisk._async_client.AsyncClient.remove:6 yadisk._client.Client.remove:6 msgid "`str`, MD5 hash of the file to remove" msgstr "`str`, MD5 хэш файла, подлежащего удалению" #: of yadisk._async_client.AsyncClient.copy:9 #: yadisk._async_client.AsyncClient.move:6 #: yadisk._async_client.AsyncClient.remove:7 #: yadisk._async_client.AsyncClient.remove_trash:4 #: yadisk._async_client.AsyncClient.rename:7 #: yadisk._async_client.AsyncClient.restore_trash:7 #: yadisk._async_client.AsyncClient.save_to_disk:9 yadisk._client.Client.copy:9 #: yadisk._client.Client.move:6 yadisk._client.Client.remove:7 #: yadisk._client.Client.remove_trash:4 yadisk._client.Client.rename:7 #: yadisk._client.Client.restore_trash:7 yadisk._client.Client.save_to_disk:9 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:4 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:12 #: yadisk.objects._resources.SyncTrashResourceObject.remove:4 #: yadisk.objects._resources.SyncTrashResourceObject.restore:12 msgid "forces the operation to be executed asynchronously" msgstr "заставляет выполнять операцию асинхронно" #: of yadisk._async_client.AsyncClient.remove:24 #: yadisk._client.Client.remove:25 msgid "MD5 check is only available for files" msgstr "проверка MD5 доступна только для файлов" #: of yadisk._async_client.AsyncClient.remove:34 #: yadisk._client.Client.remove:35 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.remove:35 #: yadisk._client.Client.remove:36 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.remove:37 #: yadisk._async_client.AsyncClient.remove_trash:33 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:28 msgid "" ":any:`AsyncOperationLinkObject` if the operation is performed " "asynchronously, `None` otherwise" msgstr "" ":any:`AsyncOperationLinkObject`, если операция выполняется асинхронно, " "иначе `None`" #: ../../api_reference/async_api.rst:71 ../../api_reference/sync_api.rst:71 msgid "Copying Files" msgstr "Копирование файлов" #: of yadisk._async_client.AsyncClient.copy:1 yadisk._client.Client.copy:1 msgid "" "Copy `src_path` to `dst_path`. If the operation is performed " "asynchronously, returns the link to the operation, otherwise, returns the" " link to the newly created resource." msgstr "" "Копирует `src_path` в `dst_path`. Если операция выполняется асинхронно, " "возвращает ссылку на операцию, иначе, возвращает ссылку на новый ресурс." #: of yadisk._async_client.AsyncClient.copy:7 yadisk._client.Client.copy:7 msgid "" "if `True` the destination path can be overwritten, otherwise, an error " "will be raised" msgstr "" "если `True`, путь назначения может быть перезаписан, иначе будет вызвана " "ошибка" #: of yadisk._async_client.AsyncClient.copy:27 yadisk._client.Client.copy:28 msgid "cannot complete request due to lack of storage space" msgstr "невозможно выполнить запрос из-за нехватки свободного места на Диске" #: of yadisk._async_client.AsyncClient.copy:38 yadisk._client.Client.copy:39 msgid "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.copy:39 yadisk._client.Client.copy:40 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.copy:41 #: yadisk._async_client.AsyncClient.move:36 #: yadisk._async_client.AsyncClient.rename:33 #: yadisk._async_client.AsyncClient.restore_trash:37 #: yadisk._async_client.AsyncClient.save_to_disk:40 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:37 msgid ":any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject`" msgstr ":any:`AsyncResourceLinkObject` или :any:`AsyncOperationLinkObject`" #: ../../api_reference/async_api.rst:75 ../../api_reference/sync_api.rst:75 msgid "Moving Files" msgstr "Перемещение файлов" #: of yadisk._async_client.AsyncClient.move:1 yadisk._client.Client.move:1 msgid "Move `src_path` to `dst_path`." msgstr "Перемещает `src_path` в `dst_path`." #: of yadisk._async_client.AsyncClient.move:3 #: yadisk._async_client.AsyncClient.rename:4 yadisk._client.Client.move:3 #: yadisk._client.Client.rename:4 msgid "source path to be moved" msgstr "исходный путь, подлежащий перемещению" #: of yadisk._async_client.AsyncClient.move:33 yadisk._client.Client.move:34 msgid "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.move:34 yadisk._client.Client.move:35 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.rename:1 yadisk._client.Client.rename:1 msgid "" "Rename `src_path` to have filename `new_name`. Does the same as `move()` " "but changes only the filename." msgstr "" "Переименовывает `src_path` в `new_name`. Делает то же самое, что и " "`move()`, за исключением того, что меняет только имя файла." #: of yadisk._async_client.AsyncClient.rename:5 yadisk._client.Client.rename:5 msgid "target filename to rename to" msgstr "новое имя файла, в которое следует переименовать ресурс" #: of yadisk._async_client.AsyncClient.rename:26 #: yadisk._client.Client.rename:27 msgid "`new_name` is not a valid filename or `src_path` is root" msgstr "" "`new_name` не является допустимым именем файла или `src_path` - корень " "диска" #: ../../api_reference/async_api.rst:81 ../../api_reference/sync_api.rst:81 msgid "Setting Custom Properties" msgstr "Задание пользовательских свойств ресурсов" #: of yadisk._async_client.AsyncClient.patch:1 yadisk._client.Client.patch:1 msgid "Update custom properties of a resource." msgstr "Обновляет пользовательские свойства ресурса." #: of yadisk._async_client.AsyncClient.patch:4 yadisk._client.Client.patch:4 msgid "`dict`, custom properties to update" msgstr "`dict`, новые пользовательские свойства ресурса" #: of yadisk._async_client.AsyncClient.patch:21 yadisk._client.Client.patch:22 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.patch:22 yadisk._client.Client.patch:23 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: ../../api_reference/async_api.rst:86 ../../api_reference/sync_api.rst:86 msgid "Public Files" msgstr "Публичные файлы" #: ../../api_reference/async_api.rst:89 ../../api_reference/sync_api.rst:89 msgid "Publishing/Unpublishing Files" msgstr "Предоставление и закрытие публичного доступа" #: of yadisk._async_client.AsyncClient.publish:1 #: yadisk._client.Client.publish:1 msgid "Make a resource public." msgstr "Делает ресурс публичным." #: of yadisk._async_client.AsyncClient.publish:3 #: yadisk._client.Client.publish:3 msgid "path to the resource to be published" msgstr "путь к публикуемому ресурсу" #: of yadisk._async_client.AsyncClient.get_public_settings:4 #: yadisk._async_client.AsyncClient.publish:4 #: yadisk._async_client.AsyncClient.unpublish:4 #: yadisk._client.Client.get_public_settings:4 yadisk._client.Client.publish:4 msgid "" "`bool`, specifies the request format, i.e. with personal access settings " "(when set to `True`) or without" msgstr "" "`bool`, определяет формат запроса, т.е. с персональными настройками " "доступа (если `True`) или без" #: of yadisk._async_client.AsyncClient.publish:6 #: yadisk._client.Client.publish:6 msgid ":any:`PublicSettings` or `None`, public access settings for the resource" msgstr ":any:`PublicSettings` или `None`, настройки доступа для ресурса" #: of yadisk._async_client.AsyncClient.publish:23 #: yadisk._client.Client.publish:24 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.publish:24 #: yadisk._client.Client.publish:25 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.publish:26 msgid ":any:`AsyncResourceLinkObject`, link to the resource" msgstr ":any:`AsyncResourceLinkObject`, ссылка на ресурс" #: of yadisk._async_client.AsyncClient.unpublish:1 #: yadisk._client.Client.unpublish:1 msgid "Make a public resource private." msgstr "Делает публичный ресурс приватным." #: of yadisk._async_client.AsyncClient.unpublish:3 #: yadisk._client.Client.unpublish:3 msgid "path to the resource to be unpublished" msgstr "путь к ресурсу, подлежащему депубликации" #: of yadisk._async_client.AsyncClient.unpublish:22 #: yadisk._client.Client.unpublish:21 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.unpublish:23 #: yadisk._client.Client.unpublish:22 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: ../../api_reference/async_api.rst:95 ../../api_reference/sync_api.rst:96 msgid "Metadata About Public Files" msgstr "Получение мета-информации о публичных ресурсах" #: of yadisk._async_client.AsyncClient.get_public_meta:1 #: yadisk._client.Client.get_public_meta:1 msgid "Get meta-information about a public resource." msgstr "Получает мета-информацию о публичном ресурсе." #: of yadisk._async_client.AsyncClient.download_public:3 #: yadisk._async_client.AsyncClient.get_public_download_link:3 #: yadisk._async_client.AsyncClient.get_public_meta:3 #: yadisk._async_client.AsyncClient.get_public_type:3 #: yadisk._async_client.AsyncClient.is_public_dir:3 #: yadisk._async_client.AsyncClient.is_public_file:3 #: yadisk._async_client.AsyncClient.public_exists:3 #: yadisk._async_client.AsyncClient.save_to_disk:5 msgid "public key or public URL of the resource" msgstr "публичный ключ или URL к ресурсу" #: of yadisk._async_client.AsyncClient.get_public_meta:4 #: yadisk._client.Client.get_public_meta:4 msgid "" "relative path to a resource in a public folder. By specifying the key of " "the published folder in `public_key`, you can request metainformation for" " any resource in the folder." msgstr "" "относительный путь к ресурсу внутри публичной папки. Указывая ключ " "опубликованной папки через `public_key`, вы можете запросить " "метаинформацию любого ресурса внутри неё." #: of yadisk._async_client.AsyncClient.get_public_meta:7 #: yadisk._client.Client.get_public_meta:7 msgid "offset from the beginning of the list of nested resources" msgstr "отступ от начала списка вложенных ресурсов" #: of yadisk._async_client.AsyncClient.get_public_meta:8 #: yadisk._client.Client.get_public_meta:8 msgid "maximum number of nested elements to be included in the list" msgstr "максимальное количество элементов списка вложенных ресурсов" #: of yadisk._async_client.AsyncClient.get_public_meta:10 #: yadisk._client.Client.get_public_meta:10 msgid "file preview size" msgstr "размер превью файла" #: of yadisk._async_client.AsyncClient.get_public_meta:11 #: yadisk._client.Client.get_public_meta:11 msgid "`bool`, allow preview crop" msgstr "`bool`, разрешить обрезку превью" #: of yadisk._async_client.AsyncClient.get_public_meta:27 #: yadisk._client.Client.get_public_meta:28 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_public_meta:28 #: yadisk._client.Client.get_public_meta:29 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_public_meta:30 msgid ":any:`AsyncPublicResourceObject`" msgstr ":any:`AsyncPublicResourceObject`" #: of yadisk._async_client.AsyncClient.get_public_type:1 #: yadisk._client.Client.get_public_type:1 msgid "Get public resource type." msgstr "Получает тип публичного ресурса." #: of yadisk._async_client.AsyncClient.download_public:5 #: yadisk._async_client.AsyncClient.get_public_download_link:4 #: yadisk._async_client.AsyncClient.get_public_type:4 #: yadisk._async_client.AsyncClient.is_public_dir:4 #: yadisk._async_client.AsyncClient.is_public_file:4 #: yadisk._async_client.AsyncClient.public_exists:4 #: yadisk._client.Client.download_public:5 #: yadisk._client.Client.get_public_download_link:4 #: yadisk._client.Client.get_public_type:4 #: yadisk._client.Client.is_public_dir:4 yadisk._client.Client.is_public_file:4 #: yadisk._client.Client.public_exists:4 msgid "relative path to the resource within the public folder" msgstr "относительный путь к ресурсу внутри публичной папки" #: of yadisk._async_client.AsyncClient.is_public_dir:1 msgid "Check whether `public_key` is a public directory." msgstr "Проверяет, является ли `public_key` публичной папкой." #: of yadisk._async_client.AsyncClient.is_public_dir:16 #: yadisk._client.Client.is_public_dir:17 msgid "" "`True` if `public_key` is a directory, `False` otherwise (even if it " "doesn't exist)" msgstr "" "`True`, если `public_key` является папкой, `False`, в остальных случаях " "(даже если ресурс не существует)" #: of yadisk._async_client.AsyncClient.is_public_file:1 msgid "Check whether `public_key` is a public file." msgstr "Проверяет, является ли `public_key` публичным файлом." #: of yadisk._async_client.AsyncClient.is_public_file:16 #: yadisk._client.Client.is_public_file:17 msgid "" "`True` if `public_key` is a file, `False` otherwise (even if it doesn't " "exist)" msgstr "" "`True`, если `public_key` является файлом, `False`, в остальных случаях " "(даже если ресурс не существует)" #: of yadisk._async_client.AsyncClient.public_exists:1 #: yadisk._client.Client.public_exists:1 msgid "Check whether the public resource exists." msgstr "Проверяет, существует ли публичный ресурс." #: ../../api_reference/async_api.rst:104 ../../api_reference/sync_api.rst:105 msgid "Downloading Public Files" msgstr "Скачивание публичных ресурсов" #: of yadisk._async_client.AsyncClient.get_public_download_link:1 #: yadisk._client.Client.get_public_download_link:1 msgid "Get a download link for a public resource." msgstr "Получает ссылку на скачивание публичного ресурса." #: of yadisk._async_client.AsyncClient.get_public_download_link:20 #: yadisk._client.Client.get_public_download_link:21 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_public_download_link:21 #: yadisk._client.Client.get_public_download_link:22 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.download_public:1 #: yadisk._client.Client.download_public:1 msgid "Download the public resource." msgstr "Скачивает публичный ресурс." #: of yadisk._async_client.AsyncClient.download_public:19 msgid ":any:`AsyncPublicResourceLinkObject`" msgstr ":any:`AsyncPublicResourceLinkObject`" #: ../../api_reference/async_api.rst:110 ../../api_reference/sync_api.rst:111 msgid "Saving Public Resources to Disk" msgstr "Сохранение публичных ресурсов на Диск" #: of yadisk._async_client.AsyncClient.save_to_disk:1 #: yadisk._client.Client.save_to_disk:1 msgid "" "Saves a public resource to the disk. Returns the link to the operation if" " it's performed asynchronously, or a link to the resource otherwise." msgstr "" "Сохраняет публичный ресурс на диск. Возвращает ссылку на операцию, если " "сохранение выполняется асинхронно, или возвращает ссылку на ресурс." #: of yadisk._async_client.AsyncClient.save_to_disk:6 #: yadisk._client.Client.save_to_disk:6 msgid "filename of the saved resource" msgstr "имя файла/папки, под которым будет сохранён ресурс" #: of yadisk._async_client.AsyncClient.save_to_disk:7 #: yadisk._client.Client.save_to_disk:7 msgid "path to the copied resource in the public folder" msgstr "путь к копируемому ресурсу в публичной папке" #: of yadisk._async_client.AsyncClient.save_to_disk:8 #: yadisk._client.Client.save_to_disk:8 msgid "path to the destination directory (downloads directory by default)" msgstr "путь к папке назначения (загрузки по умолчанию)" #: of yadisk._async_client.AsyncClient.save_to_disk:37 #: yadisk._client.Client.save_to_disk:38 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.save_to_disk:38 #: yadisk._client.Client.save_to_disk:39 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: ../../api_reference/async_api.rst:115 ../../api_reference/sync_api.rst:116 msgid "Listing Public Files" msgstr "Получение списка публичных ресурсов" #: of yadisk._async_client.AsyncClient.get_public_resources:1 #: yadisk._client.Client.get_public_resources:1 msgid "Get a list of public resources." msgstr "Получает список публичных ресурсов." #: of yadisk._async_client.AsyncClient.get_all_public_resources:8 #: yadisk._async_client.AsyncClient.get_public_resources:7 #: yadisk._client.Client.get_all_public_resources:8 #: yadisk._client.Client.get_public_resources:7 msgid "filter based on type of resources (\"file\" or \"dir\")" msgstr "фильтр по типу ресурса (\"file\" или \"dir\")" #: of yadisk._async_client.AsyncClient.get_all_public_resources:24 #: yadisk._async_client.AsyncClient.get_public_resources:22 #: yadisk._client.Client.get_all_public_resources:24 #: yadisk._client.Client.get_public_resources:23 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_all_public_resources:25 #: yadisk._async_client.AsyncClient.get_public_resources:23 #: yadisk._client.Client.get_all_public_resources:25 #: yadisk._client.Client.get_public_resources:24 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_public_resources:25 msgid ":any:`AsyncPublicResourcesListObject`" msgstr ":any:`AsyncPublicResourcesListObject`" #: of yadisk._async_client.AsyncClient.get_all_public_resources:1 #: yadisk._client.Client.get_all_public_resources:1 msgid "Get a list of all public resources." msgstr "Получает список всех публичных ресурсов." #: of yadisk._async_client.AsyncClient.get_all_public_resources:15 #: yadisk._client.Client.check_token:9 yadisk._client.Client.copy:20 #: yadisk._client.Client.download:10 yadisk._client.Client.download_by_link:10 #: yadisk._client.Client.download_public:11 yadisk._client.Client.exists:9 #: yadisk._client.Client.get_all_public_resources:15 #: yadisk._client.Client.get_device_code:16 #: yadisk._client.Client.get_disk_info:10 #: yadisk._client.Client.get_download_link:9 yadisk._client.Client.get_files:16 #: yadisk._client.Client.get_last_uploaded:13 yadisk._client.Client.get_meta:15 #: yadisk._client.Client.get_operation_status:9 #: yadisk._client.Client.get_public_available_settings:9 #: yadisk._client.Client.get_public_download_link:10 #: yadisk._client.Client.get_public_meta:18 #: yadisk._client.Client.get_public_resources:14 #: yadisk._client.Client.get_public_settings:11 #: yadisk._client.Client.get_public_type:10 yadisk._client.Client.get_token:12 #: yadisk._client.Client.get_token_from_device_code:11 #: yadisk._client.Client.get_trash_meta:15 #: yadisk._client.Client.get_trash_type:9 yadisk._client.Client.get_type:9 #: yadisk._client.Client.get_upload_link:13 #: yadisk._client.Client.get_upload_link_object:17 #: yadisk._client.Client.is_dir:9 yadisk._client.Client.is_file:9 #: yadisk._client.Client.is_public_dir:10 #: yadisk._client.Client.is_public_file:10 yadisk._client.Client.is_trash_dir:9 #: yadisk._client.Client.is_trash_file:9 yadisk._client.Client.listdir:15 #: yadisk._client.Client.makedirs:11 yadisk._client.Client.mkdir:10 #: yadisk._client.Client.move:17 yadisk._client.Client.patch:11 #: yadisk._client.Client.public_exists:10 yadisk._client.Client.publish:13 #: yadisk._client.Client.refresh_token:9 yadisk._client.Client.remove:18 #: yadisk._client.Client.remove_trash:15 yadisk._client.Client.rename:18 #: yadisk._client.Client.restore_trash:18 yadisk._client.Client.revoke_token:9 #: yadisk._client.Client.save_to_disk:20 yadisk._client.Client.trash_exists:9 #: yadisk._client.Client.trash_listdir:15 yadisk._client.Client.unpublish:10 #: yadisk._client.Client.update_public_settings:10 #: yadisk._client.Client.upload:16 yadisk._client.Client.upload_by_link:13 #: yadisk._client.Client.upload_url:16 #: yadisk._client.Client.wait_for_operation:13 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:8 #: yadisk.objects._operations.SyncOperationLinkObject.wait:12 #: yadisk.objects._resources.SyncTrashResourceObject.exists:9 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:15 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:9 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:9 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:9 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:15 #: yadisk.objects._resources.SyncTrashResourceObject.remove:15 #: yadisk.objects._resources.SyncTrashResourceObject.restore:23 msgid "`dict`, additional parameters for :any:`RequestsSession`" msgstr "`dict`, Дополнительные параметры для :any:`RequestsSession`" #: of yadisk._async_client.AsyncClient.get_all_public_resources:16 #: yadisk._client.Client.check_token:10 yadisk._client.Client.copy:21 #: yadisk._client.Client.download:11 yadisk._client.Client.download_by_link:11 #: yadisk._client.Client.download_public:12 yadisk._client.Client.exists:10 #: yadisk._client.Client.get_all_public_resources:16 #: yadisk._client.Client.get_device_code:17 #: yadisk._client.Client.get_disk_info:11 #: yadisk._client.Client.get_download_link:10 #: yadisk._client.Client.get_files:17 #: yadisk._client.Client.get_last_uploaded:14 yadisk._client.Client.get_meta:16 #: yadisk._client.Client.get_operation_status:10 #: yadisk._client.Client.get_public_available_settings:10 #: yadisk._client.Client.get_public_download_link:11 #: yadisk._client.Client.get_public_meta:19 #: yadisk._client.Client.get_public_resources:15 #: yadisk._client.Client.get_public_settings:12 #: yadisk._client.Client.get_public_type:11 yadisk._client.Client.get_token:13 #: yadisk._client.Client.get_token_from_device_code:12 #: yadisk._client.Client.get_trash_meta:16 #: yadisk._client.Client.get_trash_type:10 yadisk._client.Client.get_type:10 #: yadisk._client.Client.get_upload_link:14 #: yadisk._client.Client.get_upload_link_object:18 #: yadisk._client.Client.is_dir:10 yadisk._client.Client.is_file:10 #: yadisk._client.Client.is_public_dir:11 #: yadisk._client.Client.is_public_file:11 #: yadisk._client.Client.is_trash_dir:10 yadisk._client.Client.is_trash_file:10 #: yadisk._client.Client.listdir:16 yadisk._client.Client.makedirs:12 #: yadisk._client.Client.mkdir:11 yadisk._client.Client.move:18 #: yadisk._client.Client.patch:12 yadisk._client.Client.public_exists:11 #: yadisk._client.Client.publish:14 yadisk._client.Client.refresh_token:10 #: yadisk._client.Client.remove:19 yadisk._client.Client.remove_trash:16 #: yadisk._client.Client.rename:19 yadisk._client.Client.restore_trash:19 #: yadisk._client.Client.revoke_token:10 yadisk._client.Client.save_to_disk:21 #: yadisk._client.Client.trash_exists:10 yadisk._client.Client.trash_listdir:16 #: yadisk._client.Client.unpublish:11 #: yadisk._client.Client.update_public_settings:11 #: yadisk._client.Client.upload:17 yadisk._client.Client.upload_by_link:14 #: yadisk._client.Client.upload_url:17 #: yadisk._client.Client.wait_for_operation:14 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:9 #: yadisk.objects._operations.SyncOperationLinkObject.wait:13 #: yadisk.objects._resources.SyncTrashResourceObject.exists:10 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:16 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:10 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:10 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:10 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:16 #: yadisk.objects._resources.SyncTrashResourceObject.remove:16 #: yadisk.objects._resources.SyncTrashResourceObject.restore:24 msgid "`dict`, additional parameters for :any:`HTTPXSession`" msgstr "`dict`, дополнительные параметры для :any:`HTTPXSession`" #: of yadisk._async_client.AsyncClient.get_all_public_resources:17 #: yadisk._client.Client.check_token:11 yadisk._client.Client.copy:22 #: yadisk._client.Client.download:12 yadisk._client.Client.download_by_link:12 #: yadisk._client.Client.download_public:13 yadisk._client.Client.exists:11 #: yadisk._client.Client.get_all_public_resources:17 #: yadisk._client.Client.get_device_code:18 #: yadisk._client.Client.get_disk_info:12 #: yadisk._client.Client.get_download_link:11 #: yadisk._client.Client.get_files:18 #: yadisk._client.Client.get_last_uploaded:15 yadisk._client.Client.get_meta:17 #: yadisk._client.Client.get_operation_status:11 #: yadisk._client.Client.get_public_available_settings:11 #: yadisk._client.Client.get_public_download_link:12 #: yadisk._client.Client.get_public_meta:20 #: yadisk._client.Client.get_public_resources:16 #: yadisk._client.Client.get_public_settings:13 #: yadisk._client.Client.get_public_type:12 yadisk._client.Client.get_token:14 #: yadisk._client.Client.get_token_from_device_code:13 #: yadisk._client.Client.get_trash_meta:17 #: yadisk._client.Client.get_trash_type:11 yadisk._client.Client.get_type:11 #: yadisk._client.Client.get_upload_link:15 #: yadisk._client.Client.get_upload_link_object:19 #: yadisk._client.Client.is_dir:11 yadisk._client.Client.is_file:11 #: yadisk._client.Client.is_public_dir:12 #: yadisk._client.Client.is_public_file:12 #: yadisk._client.Client.is_trash_dir:11 yadisk._client.Client.is_trash_file:11 #: yadisk._client.Client.listdir:17 yadisk._client.Client.makedirs:13 #: yadisk._client.Client.mkdir:12 yadisk._client.Client.move:19 #: yadisk._client.Client.patch:13 yadisk._client.Client.public_exists:12 #: yadisk._client.Client.publish:15 yadisk._client.Client.refresh_token:11 #: yadisk._client.Client.remove:20 yadisk._client.Client.remove_trash:17 #: yadisk._client.Client.rename:20 yadisk._client.Client.restore_trash:20 #: yadisk._client.Client.revoke_token:11 yadisk._client.Client.save_to_disk:22 #: yadisk._client.Client.trash_exists:11 yadisk._client.Client.trash_listdir:17 #: yadisk._client.Client.unpublish:12 #: yadisk._client.Client.update_public_settings:12 #: yadisk._client.Client.upload:18 yadisk._client.Client.upload_by_link:15 #: yadisk._client.Client.upload_url:18 #: yadisk._client.Client.wait_for_operation:15 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:10 #: yadisk.objects._operations.SyncOperationLinkObject.wait:14 #: yadisk.objects._resources.SyncTrashResourceObject.exists:11 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:17 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:11 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:11 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:11 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:17 #: yadisk.objects._resources.SyncTrashResourceObject.remove:17 #: yadisk.objects._resources.SyncTrashResourceObject.restore:25 msgid "`dict`, additional options for :any:`PycURLSession`" msgstr "`dict`, дополнительные опции для :any:`PycURLSession`" #: of yadisk._async_client.AsyncClient.get_all_public_resources:27 msgid "async generator of :any:`AsyncPublicResourceObject`" msgstr "асинхронный генератор :any:`AsyncPublicResourceObject`" #: ../../api_reference/async_api.rst:121 ../../api_reference/sync_api.rst:122 msgid "Public Access Settings" msgstr "Настройка публичного доступа" #: of yadisk._async_client.AsyncClient.get_public_settings:1 #: yadisk._client.Client.get_public_settings:1 msgid "Get public settings of a resource." msgstr "Получает список настроек доступа к ресурсу" #: of yadisk._async_client.AsyncClient.get_public_settings:21 #: yadisk._client.Client.get_public_settings:22 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_public_settings:23 #: yadisk._client.Client.get_public_settings:24 msgid ":any:`PublicSettingsObject`" msgstr ":any:`PublicSettingsObject`" #: of yadisk._async_client.AsyncClient.get_public_available_settings:1 #: yadisk._client.Client.get_public_available_settings:1 msgid "" "Get public settings of a shared resource for the current OAuth token " "owner." msgstr "" "Получает список всех настроек доступа к своему ресурсу, к которому " "предоставлен публичный доступ." #: of yadisk._async_client.AsyncClient.get_public_available_settings:19 #: yadisk._client.Client.get_public_available_settings:20 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_public_available_settings:21 #: yadisk._client.Client.get_public_available_settings:22 msgid ":any:`PublicAvailableSettingsObject`" msgstr ":any:`PublicAvailableSettingsObject`" #: of yadisk._async_client.AsyncClient.update_public_settings:1 #: yadisk._client.Client.update_public_settings:1 msgid "Update public settings of a shared resource." msgstr "Обновляет настройки доступа публичного ресурса." #: of yadisk._async_client.AsyncClient.update_public_settings:4 #: yadisk._client.Client.update_public_settings:4 msgid ":any:`PublicSettings`, public access settings for the resource" msgstr ":any:`PublicSettings`, настройки доступа для ресурса" #: of yadisk._async_client.AsyncClient.update_public_settings:20 #: yadisk._client.Client.update_public_settings:21 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.update_public_settings:21 #: yadisk._client.Client.update_public_settings:22 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.update_public_settings:23 #: yadisk._client.Client.update_public_settings:24 msgid "`None`" msgstr "`None`" #: ../../api_reference/async_api.rst:128 ../../api_reference/sync_api.rst:129 msgid "Trash" msgstr "Корзина" #: of yadisk._async_client.AsyncClient.get_trash_meta:1 #: yadisk._client.Client.get_trash_meta:1 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:1 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:1 msgid "Get meta information about a trash resource." msgstr "Получает мета-информацию о ресурсе корзины." #: of yadisk._async_client.AsyncClient.get_trash_meta:3 #: yadisk._async_client.AsyncClient.get_trash_type:3 #: yadisk._async_client.AsyncClient.is_trash_dir:3 #: yadisk._async_client.AsyncClient.is_trash_file:3 #: yadisk._async_client.AsyncClient.trash_exists:3 #: yadisk._client.Client.get_trash_meta:3 #: yadisk._client.Client.get_trash_type:3 yadisk._client.Client.is_trash_dir:3 #: yadisk._client.Client.is_trash_file:3 yadisk._client.Client.trash_exists:3 msgid "path to the trash resource" msgstr "путь к ресурсу корзины" #: of yadisk._async_client.AsyncClient.get_trash_meta:25 #: yadisk._client.Client.get_trash_meta:26 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_trash_meta:27 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:22 msgid ":any:`AsyncTrashResourceObject`" msgstr ":any:`AsyncTrashResourceObject`" #: of yadisk._async_client.AsyncClient.trash_exists:1 #: yadisk._client.Client.trash_exists:1 msgid "Check whether the trash resource at `path` exists." msgstr "Проверяет, существует ли `path` в корзине." #: of yadisk._async_client.AsyncClient.restore_trash:1 #: yadisk._client.Client.restore_trash:1 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:1 #: yadisk.objects._resources.SyncTrashResourceObject.restore:1 msgid "" "Restore a trash resource. Returns a link to the newly created resource or" " a link to the asynchronous operation." msgstr "" "Восстанавливает ресурс корзины. Возвращает ссылку на новый ресурс или " "ссылку на асинхронную операцию." #: of yadisk._async_client.AsyncClient.restore_trash:4 msgid "path to the trash resource to restore" msgstr "путь к восстанавливаему ресурсу" #: of yadisk._async_client.AsyncClient.restore_trash:6 #: yadisk._client.Client.restore_trash:6 #: yadisk.objects._resources.AsyncTrashResourceObject.restore:11 #: yadisk.objects._resources.SyncTrashResourceObject.restore:11 msgid "`bool`, determines whether the destination can be overwritten" msgstr "`bool`, определяет может ли путь назначения быть перезаписан" #: of yadisk._async_client.AsyncClient.restore_trash:34 #: yadisk._client.Client.restore_trash:35 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.restore_trash:35 #: yadisk._client.Client.restore_trash:36 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.remove_trash:1 #: yadisk._client.Client.remove_trash:1 #: yadisk.objects._resources.AsyncTrashResourceObject.remove:1 #: yadisk.objects._resources.SyncTrashResourceObject.remove:1 msgid "Remove a trash resource." msgstr "Удаляет ресурс корзины." #: of yadisk._async_client.AsyncClient.remove_trash:3 #: yadisk._client.Client.remove_trash:3 msgid "path to the trash resource to be deleted" msgstr "путь к ресурсу корзины, подлежащий удалению" #: of yadisk._async_client.AsyncClient.remove_trash:30 #: yadisk._client.Client.remove_trash:31 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.remove_trash:31 #: yadisk._client.Client.remove_trash:32 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.trash_listdir:1 #: yadisk._client.Client.trash_listdir:1 #: yadisk.objects._resources.AsyncTrashResourceObject.listdir:1 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:1 msgid "Get contents of a trash resource." msgstr "Получает содержимое папки в корзине." #: of yadisk._async_client.AsyncClient.trash_listdir:3 #: yadisk._client.Client.trash_listdir:3 msgid "path to the directory in the trash bin" msgstr "путь к папке в корзине" #: of yadisk._async_client.AsyncClient.trash_listdir:23 msgid "async generator of :any:`AsyncTrashResourceObject`" msgstr "асинхронный генератор :any:`AsyncTrashResourceObject`" #: of yadisk._async_client.AsyncClient.get_trash_type:1 #: yadisk._client.Client.get_trash_type:1 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:1 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:1 msgid "Get trash resource type." msgstr "Получает тип ресурса корзины." #: of yadisk._async_client.AsyncClient.is_trash_dir:1 #: yadisk._client.Client.is_trash_dir:1 msgid "Check whether `path` is a trash directory." msgstr "Проверяет, является ли `path` папкой в корзине." #: of yadisk._async_client.AsyncClient.is_trash_file:1 #: yadisk._client.Client.is_trash_file:1 msgid "Check whether `path` is a trash file." msgstr "Проверяет, является ли `path` файлом в корзине." #: ../../api_reference/async_api.rst:140 ../../api_reference/sync_api.rst:141 msgid "Checking Operation Status" msgstr "Получение статуса операции" #: of yadisk._async_client.AsyncClient.get_operation_status:1 #: yadisk._client.Client.get_operation_status:1 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:1 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:1 msgid "Get operation status." msgstr "Получает статус операции." #: of yadisk._async_client.AsyncClient.get_operation_status:3 #: yadisk._async_client.AsyncClient.wait_for_operation:4 #: yadisk._client.Client.get_operation_status:3 #: yadisk._client.Client.wait_for_operation:4 msgid "ID of the operation or a link" msgstr "идентификатор операции или ссылка на нее" #: of yadisk._async_client.AsyncClient.get_operation_status:17 #: yadisk._client.Client.get_operation_status:18 msgid "" "`Official docs `__" msgstr "" "`Официальная документация `__" #: of yadisk._async_client.AsyncClient.get_operation_status:18 #: yadisk._client.Client.get_operation_status:19 msgid "" "`Polygon " "`__" msgstr "" "`Полигон " "`__" #: of yadisk._async_client.AsyncClient.get_operation_status:20 #: yadisk._client.Client.get_operation_status:21 #: yadisk.objects._operations.AsyncOperationLinkObject.get_status:14 #: yadisk.objects._operations.SyncOperationLinkObject.get_status:15 msgid "" "`str`, :code:`\"in-progress\"` indicates that the operation is currently " "running, :code:`\"success\"` indicates that the operation was successful," " :code:`\"failed\"` means that the operation failed" msgstr "" "`str`, :code:`\"in-progress\"` означает, что операция в процессе, " ":code:`\"success\"` означает, что операция успешно завершилась, " ":code:`\"failed\"` означает, что операция завершилась с ошибкой" #: of yadisk._async_client.AsyncClient.wait_for_operation:1 #: yadisk.objects._operations.AsyncOperationLinkObject.wait:1 msgid "" "Wait until an operation is completed. If the operation fails, an " "exception is raised. Waiting is performed by calling " ":any:`asyncio.sleep`." msgstr "" "Ждёт, пока операция не будет выполнена. Если выполнение операции не " "удалось, вызывается исключение. Ожидание осуществляется с помощью вызова " ":any:`asyncio.sleep`." #: ../../api_reference/exceptions.rst:2 msgid "Exceptions" msgstr "Исключения" #: of yadisk.exceptions.AsyncOperationFailedError:1 #: yadisk.exceptions.BadGatewayError:1 yadisk.exceptions.GatewayTimeoutError:1 #: yadisk.exceptions.InternalServerError:1 yadisk.exceptions.UnavailableError:1 #: yadisk.exceptions.UnknownYaDiskError:1 msgid "Bases: :py:class:`~yadisk.exceptions.RetriableYaDiskError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.RetriableYaDiskError`" #: of yadisk.exceptions.AsyncOperationFailedError:1 msgid "Raised when an asynchronous operation fails" msgstr "Вызывается, когда асинхронная операция завершается с ошибкой" #: of yadisk.exceptions.AsyncOperationPollingTimeoutError:1 #: yadisk.exceptions.BadRequestError:1 yadisk.exceptions.ConflictError:1 #: yadisk.exceptions.ForbiddenError:1 yadisk.exceptions.GoneError:1 #: yadisk.exceptions.InsufficientStorageError:1 #: yadisk.exceptions.InvalidResponseError:1 yadisk.exceptions.LockedError:1 #: yadisk.exceptions.NotAcceptableError:1 yadisk.exceptions.NotFoundError:1 #: yadisk.exceptions.PayloadTooLargeError:1 yadisk.exceptions.RequestError:1 #: yadisk.exceptions.RetriableYaDiskError:1 #: yadisk.exceptions.TooManyRequestsError:1 #: yadisk.exceptions.UnauthorizedError:1 #: yadisk.exceptions.UnsupportedMediaError:1 #: yadisk.exceptions.WrongResourceTypeError:1 msgid "Bases: :py:class:`~yadisk.exceptions.YaDiskError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.YaDiskError`" #: of yadisk.exceptions.AsyncOperationPollingTimeoutError:1 msgid "" "Raised when a polling timeout occured while waiting for an asynchronous " "operation" msgstr "Вызывается, когда произошёл таймаут во время ожидания асинхронной операции" #: of yadisk.exceptions.AuthorizationPendingError:1 #: yadisk.exceptions.BadVerificationCodeError:1 #: yadisk.exceptions.FieldValidationError:1 #: yadisk.exceptions.InvalidClientError:1 yadisk.exceptions.InvalidGrantError:1 #: yadisk.exceptions.UnsupportedTokenTypeError:1 msgid "Bases: :py:class:`~yadisk.exceptions.BadRequestError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.BadRequestError`" #: of yadisk.exceptions.AuthorizationPendingError:1 msgid "" "Thrown when authorization is currently pending, the application has to " "wait." msgstr "" "Вызывается, когда авторизация находится в процессе, приложение должно " "подождать." #: of yadisk.exceptions.BadGatewayError:1 msgid "Thrown when the server returns code 502" msgstr "Вызывается, когда сервер вернул код 502." #: of yadisk.exceptions.BadRequestError:1 msgid "Thrown when the server returns code 400." msgstr "Вызывается, когда сервер вернул код 400." #: of yadisk.exceptions.BadVerificationCodeError:1 msgid "Thrown when a verification code has invalid format" msgstr "Вызывается, когда у кода подтверждения неправильный формат" #: of yadisk.exceptions.ConflictError:1 msgid "Thrown when the server returns code 409." msgstr "Вызывается, когда сервер вернул код 409." #: of yadisk.exceptions.DirectoryExistsError:1 msgid "Bases: :py:class:`~yadisk.exceptions.PathExistsError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.PathExistsError`" #: of yadisk.exceptions.DirectoryExistsError:1 msgid "Thrown when the directory already exists." msgstr "Вызывается, когда папка уже существует." #: of yadisk.exceptions.FieldValidationError:1 msgid "Thrown when the request contains fields with invalid data." msgstr "Вызывается, когда запрос содежит поля с некорректными данными." #: of yadisk.exceptions.ForbiddenError:1 msgid "Thrown when the server returns code 403." msgstr "Вызывается, когда сервер вернул код 403." #: of yadisk.exceptions.GatewayTimeoutError:1 msgid "Thrown when the server returns code 504" msgstr "Вызывается, когда сервер вернул код 504." #: of yadisk.exceptions.GoneError:1 msgid "Raised when the server returns code 410." msgstr "Вызывается, когда сервер вернул код 410." #: of yadisk.exceptions.InsufficientStorageError:1 msgid "Thrown when the server returns code 507." msgstr "Вызывается, когда сервер вернул код 507." #: of yadisk.exceptions.InternalServerError:1 msgid "Thrown when the server returns code 500." msgstr "Вызывается, когда сервер вернул код 500." #: of yadisk.exceptions.InvalidClientError:1 msgid "Thrown when an invalid client ID or client secret was provided" msgstr "" "Вызывается, когда был указан неправильный идентификатор или пароль " "приложения" #: of yadisk.exceptions.InvalidGrantError:1 msgid "Thrown when a verification code is expired or invalid" msgstr "Вызывается при неверном или просроченном коде подтверждения" #: of yadisk.exceptions.InvalidResponseError:1 msgid "Thrown when Yandex.Disk did not return a JSON response or if it's invalid." msgstr "Вызывается, когда Яндекс.Диск не вернул JSON ответ или он неправильный." #: of yadisk.exceptions.LockedError:1 msgid "Thrown when the server returns code 423." msgstr "Вызывается, когда сервер вернул код 423." #: of yadisk.exceptions.MD5DifferError:1 #: yadisk.exceptions.ParentNotFoundError:1 yadisk.exceptions.PathExistsError:1 msgid "Bases: :py:class:`~yadisk.exceptions.ConflictError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.ConflictError`" #: of yadisk.exceptions.MD5DifferError:1 msgid "" "Thrown when the MD5 hash of the file to be deleted doesn't match with the" " actual one." msgstr "Вызывается, когда MD5 хэш удаляемого ресурса не совпадает с указанным." #: of yadisk.exceptions.NotAcceptableError:1 msgid "Thrown when the server returns code 406." msgstr "Вызывается, когда сервер вернул код 406." #: of yadisk.exceptions.NotFoundError:1 msgid "Thrown when the server returns code 404." msgstr "Вызывается, когда сервер вернул код 404." #: of yadisk.exceptions.OperationNotFoundError:1 #: yadisk.exceptions.PathNotFoundError:1 msgid "Bases: :py:class:`~yadisk.exceptions.NotFoundError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.NotFoundError`" #: of yadisk.exceptions.OperationNotFoundError:1 msgid "Thrown by `get_operation_status()` when the operation doesn't exist." msgstr "" "Вызывается, когда операция, переденная `get_operation_status()` не " "существует." #: of yadisk.exceptions.ParentNotFoundError:1 msgid "Thrown by `mkdir`, `upload`, etc. when the parent directory doesn't exist." msgstr "" "Вызывается `mkdir`, `upload` и т.д. когда родительская папка не " "существует." #: of yadisk.exceptions.PasswordRequiredError:1 msgid "Bases: :py:class:`~yadisk.exceptions.ForbiddenError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.ForbiddenError`" #: of yadisk.exceptions.PasswordRequiredError:1 msgid "Thrown when a password is required to access the resource" msgstr "Вызывается, когда для доступа к ресурсу требуется пароль" #: of yadisk.exceptions.PathExistsError:1 msgid "Thrown when the requested path already exists." msgstr "Вызывается, когда запрашиваемый путь уже существует." #: of yadisk.exceptions.PathNotFoundError:1 msgid "Thrown when the requested path does not exist." msgstr "Вызывается, когда запрашиваемый путь не существует." #: of yadisk.exceptions.PayloadTooLargeError:1 msgid "Thrown when the server returns code 413." msgstr "Вызывается, когда сервер вернул код 413." #: of yadisk.exceptions.RequestError:1 msgid "" "Generic exception class for cases when a request could not be sent or " "response could not be received." msgstr "" "Общий класс исключения для случаев, когда запросы не удалось отправить " "или не удалось получить ответ." #: of yadisk.exceptions.RequestTimeoutError:1 #: yadisk.exceptions.TooManyRedirectsError:1 #: yadisk.exceptions.YaDiskConnectionError:1 msgid "Bases: :py:class:`~yadisk.exceptions.RequestError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.RequestError`" #: of yadisk.exceptions.RequestTimeoutError:1 msgid "Thrown when a request timed out." msgstr "Вызывается, когда время ожидания запроса истекло." #: of yadisk.exceptions.ResourceDownloadLimitExceededError:1 msgid "Bases: :py:class:`~yadisk.exceptions.TooManyRequestsError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.TooManyRequestsError`" #: of yadisk.exceptions.ResourceDownloadLimitExceededError:1 msgid "Raised when the download limit for a resource is exceeded." msgstr "Вызывается, когда превышен лимит на скачивание для ресурса." #: of yadisk.exceptions.ResourceIsLockedError:1 #: yadisk.exceptions.UploadTrafficLimitExceededError:1 msgid "Bases: :py:class:`~yadisk.exceptions.LockedError`" msgstr "Базовые классы: :py:class:`~yadisk.exceptions.LockedError`" #: of yadisk.exceptions.ResourceIsLockedError:1 msgid "Thrown when the resource is locked by another operation." msgstr "Вызывается, когда запрашиваемый ресурс заблокирован другой операцией." #: of yadisk.exceptions.RetriableYaDiskError:1 msgid "" "Thrown when there was an error but it would make sense to retry the " "request." msgstr "" "Вызывается в случае, если произошла ошибка, но имеет смысл повторить " "запрос." #: of yadisk.exceptions.TooManyRedirectsError:1 msgid "Thrown when there were too many redirects." msgstr "Вызывается, при слишком большом количестве перенаправлений." #: of yadisk.exceptions.TooManyRequestsError:1 msgid "Thrown when the server returns code 429." msgstr "Вызывается, когда сервер вернул код 429." #: of yadisk.exceptions.UnauthorizedError:1 msgid "Thrown when the server returns code 401." msgstr "Вызывается, когда сервер вернул код 401." #: of yadisk.exceptions.UnavailableError:1 msgid "Thrown when the server returns code 503." msgstr "Вызывается, когда сервер вернул код 503." #: of yadisk.exceptions.UnknownYaDiskError:1 msgid "" "Thrown when the request failed but the response does not contain any " "error info." msgstr "Вызывается, когда запрос не удался, но не содержит информации об ошибке." #: of yadisk.exceptions.UnsupportedMediaError:1 msgid "Thrown when the server returns code 415." msgstr "Вызывается, когда сервер вернул код 415." #: of yadisk.exceptions.UnsupportedTokenTypeError:1 msgid "Thrown when the specified token cannot be used in a request" msgstr "Вызывается, когда указанный токен не может быть использован в запросе" #: of yadisk.exceptions.UploadTrafficLimitExceededError:1 msgid "Thrown when upload limit has been exceeded." msgstr "Вызывается, когда превышен лимит на загрузку файлов." #: of yadisk.exceptions.WrongResourceTypeError:1 msgid "" "Thrown when the resource was expected to be of different type (e.g., file" " instead of directory)." msgstr "" "Вызывается, когда ожидался ресурс другого типа (например, файл вместо " "папки)." #: of yadisk.exceptions.YaDiskConnectionError:1 msgid "Thrown when a connection error occured." msgstr "Вызывается при ошибке соединения." #: of yadisk.exceptions.YaDiskError:1 msgid "Bases: :py:class:`Exception`" msgstr "Базовые классы: :py:class:`Exception`" #: of yadisk.exceptions.YaDiskError:1 msgid "Base class for all exceptions in this library." msgstr "Базовый класс для всех исключений в этой библиотеке." #: of yadisk.exceptions.YaDiskError:3 yadisk.exceptions.YaDiskError:8 msgid "`str`, unique error code as returned by API" msgstr "`str`, уникальный код ошибки, полученный от API" #: of yadisk.exceptions.YaDiskError:4 yadisk.exceptions.YaDiskError:10 #: yadisk.utils.get_exception:3 msgid "an instance of :any:`Response` or :any:`AsyncResponse`" msgstr "объект :any:`Response` или :any:`AsyncResponse`" #: of yadisk.exceptions.YaDiskError:5 yadisk.exceptions.YaDiskError:11 msgid "" "`bool`, if set to :code:`True`, exception will not trigger a retry in " ":any:`utils.auto_retry()`" msgstr "" "`bool`, если :code:`True`, исключение не вызовет повторную попытку в " ":any:`utils.auto_retry()`" #: of yadisk.exceptions.YaDiskError:9 msgid "`str`, exception message" msgstr "`str`, сообщение исключения" #: ../../api_reference/index.rst:4 msgid "Contents:" msgstr "Содержание:" #: ../../api_reference/index.rst:2 msgid "API Reference" msgstr "Справочник API" #: ../../api_reference/response_objects.rst:2 msgid "Response Objects" msgstr "Объекты ответов сервера" #: of yadisk.objects._resources.AsyncFilesResourceListObject:1 #: yadisk.objects._resources.SyncFilesResourceListObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.FilesResourceListObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.FilesResourceListObject`" #: of yadisk.objects._resources.AsyncFilesResourceListObject:1 #: yadisk.objects._resources.FilesResourceListObject:1 #: yadisk.objects._resources.SyncFilesResourceListObject:1 msgid "Flat list of files." msgstr "Плоский список файлов." #: of yadisk.objects._auth.DeviceCodeObject:3 #: yadisk.objects._auth.TokenObject:3 #: yadisk.objects._auth.TokenRevokeStatusObject:3 #: yadisk.objects._disk.DiskInfoObject:3 #: yadisk.objects._disk.SystemFoldersObject:3 yadisk.objects._disk.UserObject:3 #: yadisk.objects._disk.UserPublicInfoObject:4 #: yadisk.objects._error_object.ErrorObject:3 #: yadisk.objects._link_object.LinkObject:3 #: yadisk.objects._operations.AsyncOperationLinkObject:3 #: yadisk.objects._operations.OperationLinkObject:3 #: yadisk.objects._operations.OperationStatusObject:3 #: yadisk.objects._operations.SyncOperationLinkObject:3 #: yadisk.objects._resources.AsyncFilesResourceListObject:3 #: yadisk.objects._resources.AsyncLastUploadedResourceListObject:3 #: yadisk.objects._resources.AsyncPublicResourceLinkObject:3 #: yadisk.objects._resources.AsyncPublicResourceListObject:3 #: yadisk.objects._resources.AsyncPublicResourceObject:3 #: yadisk.objects._resources.AsyncPublicResourcesListObject:3 #: yadisk.objects._resources.AsyncResourceLinkObject:3 #: yadisk.objects._resources.AsyncResourceListObject:3 #: yadisk.objects._resources.AsyncResourceObject:3 #: yadisk.objects._resources.AsyncTrashResourceListObject:3 #: yadisk.objects._resources.AsyncTrashResourceObject:3 #: yadisk.objects._resources.CommentIDsObject:3 #: yadisk.objects._resources.EXIFObject:3 #: yadisk.objects._resources.FilesResourceListObject:3 #: yadisk.objects._resources.LastUploadedResourceListObject:3 #: yadisk.objects._resources.PublicResourceLinkObject:3 #: yadisk.objects._resources.PublicResourceListObject:3 #: yadisk.objects._resources.PublicResourceObject:3 #: yadisk.objects._resources.PublicResourcesListObject:3 #: yadisk.objects._resources.ResourceDownloadLinkObject:3 #: yadisk.objects._resources.ResourceLinkObject:3 #: yadisk.objects._resources.ResourceListObject:3 #: yadisk.objects._resources.ResourceObject:3 #: yadisk.objects._resources.ResourceUploadLinkObject:3 #: yadisk.objects._resources.ShareInfoObject:3 #: yadisk.objects._resources.SyncFilesResourceListObject:3 #: yadisk.objects._resources.SyncLastUploadedResourceListObject:3 #: yadisk.objects._resources.SyncPublicResourceLinkObject:3 #: yadisk.objects._resources.SyncPublicResourceListObject:3 #: yadisk.objects._resources.SyncPublicResourceObject:3 #: yadisk.objects._resources.SyncPublicResourcesListObject:3 #: yadisk.objects._resources.SyncResourceLinkObject:3 #: yadisk.objects._resources.SyncResourceListObject:3 #: yadisk.objects._resources.SyncResourceObject:3 #: yadisk.objects._resources.SyncTrashResourceListObject:3 #: yadisk.objects._resources.SyncTrashResourceObject:3 #: yadisk.objects._resources.TrashResourceListObject:3 #: yadisk.objects._resources.TrashResourceObject:3 #: yadisk.objects._yadisk_object.YaDiskObject:5 msgid "`dict` or `None`" msgstr "`dict` или `None`" #: of yadisk.objects._operations.AsyncOperationLinkObject:4 #: yadisk.objects._resources.AsyncFilesResourceListObject:4 #: yadisk.objects._resources.AsyncLastUploadedResourceListObject:4 #: yadisk.objects._resources.AsyncPublicResourceLinkObject:4 #: yadisk.objects._resources.AsyncPublicResourceListObject:4 #: yadisk.objects._resources.AsyncPublicResourceObject:4 #: yadisk.objects._resources.AsyncPublicResourcesListObject:4 #: yadisk.objects._resources.AsyncResourceLinkObject:4 #: yadisk.objects._resources.AsyncResourceListObject:4 #: yadisk.objects._resources.AsyncResourceObject:4 #: yadisk.objects._resources.AsyncTrashResourceListObject:4 #: yadisk.objects._resources.AsyncTrashResourceObject:4 msgid ":any:`AsyncClient` or `None`, `YaDisk` object" msgstr ":any:`AsyncClient` или `None`, объект `YaDisk`" #: of yadisk.objects._resources.AsyncFilesResourceListObject:6 msgid "`list`, flat list of files (:any:`AsyncResourceObject`)" msgstr "`list`, плоский список файлов (:any:`AsyncResourceObject`)" #: of yadisk.objects._resources.AsyncFilesResourceListObject:7 #: yadisk.objects._resources.AsyncLastUploadedResourceListObject:7 #: yadisk.objects._resources.AsyncPublicResourceListObject:8 #: yadisk.objects._resources.AsyncPublicResourcesListObject:8 #: yadisk.objects._resources.AsyncResourceListObject:8 #: yadisk.objects._resources.AsyncTrashResourceListObject:8 #: yadisk.objects._resources.FilesResourceListObject:7 #: yadisk.objects._resources.LastUploadedResourceListObject:7 #: yadisk.objects._resources.PublicResourceListObject:8 #: yadisk.objects._resources.PublicResourcesListObject:8 #: yadisk.objects._resources.ResourceListObject:8 #: yadisk.objects._resources.SyncFilesResourceListObject:7 #: yadisk.objects._resources.SyncLastUploadedResourceListObject:7 #: yadisk.objects._resources.SyncPublicResourceListObject:8 #: yadisk.objects._resources.SyncPublicResourcesListObject:8 #: yadisk.objects._resources.SyncResourceListObject:8 #: yadisk.objects._resources.SyncTrashResourceListObject:8 #: yadisk.objects._resources.TrashResourceListObject:8 msgid "`int`, maximum number of elements in the list" msgstr "`int`, максимальное число элементов в списке" #: of yadisk.objects._resources.AsyncFilesResourceListObject:8 #: yadisk.objects._resources.AsyncPublicResourceListObject:9 #: yadisk.objects._resources.AsyncPublicResourcesListObject:9 #: yadisk.objects._resources.AsyncResourceListObject:9 #: yadisk.objects._resources.AsyncTrashResourceListObject:9 #: yadisk.objects._resources.FilesResourceListObject:8 #: yadisk.objects._resources.PublicResourceListObject:9 #: yadisk.objects._resources.PublicResourcesListObject:9 #: yadisk.objects._resources.ResourceListObject:9 #: yadisk.objects._resources.SyncFilesResourceListObject:8 #: yadisk.objects._resources.SyncPublicResourceListObject:9 #: yadisk.objects._resources.SyncPublicResourcesListObject:9 #: yadisk.objects._resources.SyncResourceListObject:9 #: yadisk.objects._resources.SyncTrashResourceListObject:9 #: yadisk.objects._resources.TrashResourceListObject:9 msgid "`int`, offset from the beginning of the list" msgstr "`int`, отступ от начала списка" #: of yadisk.objects._resources.AsyncLastUploadedResourceListObject:1 #: yadisk.objects._resources.SyncLastUploadedResourceListObject:1 msgid "" "Bases: " ":py:class:`~yadisk.objects._resources.LastUploadedResourceListObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.LastUploadedResourceListObject`" #: of yadisk.objects._resources.AsyncLastUploadedResourceListObject:1 #: yadisk.objects._resources.LastUploadedResourceListObject:1 #: yadisk.objects._resources.SyncLastUploadedResourceListObject:1 msgid "List of last uploaded resources." msgstr "Список последних загруженных файлов." #: of yadisk.objects._resources.AsyncLastUploadedResourceListObject:6 #: yadisk.objects._resources.AsyncPublicResourceListObject:7 #: yadisk.objects._resources.AsyncResourceListObject:7 msgid "`list`, list of resources (:any:`AsyncResourceObject`)" msgstr "`list`, список ресурсов (:any:`AsyncResourceObject`)" #: of yadisk.objects._operations.AsyncOperationLinkObject:1 #: yadisk.objects._operations.SyncOperationLinkObject:1 msgid "Bases: :py:class:`~yadisk.objects._operations.OperationLinkObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._operations.OperationLinkObject`" #: of yadisk.objects._operations.AsyncOperationLinkObject:1 #: yadisk.objects._operations.OperationLinkObject:1 #: yadisk.objects._operations.SyncOperationLinkObject:1 msgid "Operation link object." msgstr "Объект ссылки на операцию." #: of yadisk.objects._link_object.LinkObject:6 #: yadisk.objects._operations.AsyncOperationLinkObject:6 #: yadisk.objects._operations.OperationLinkObject:6 #: yadisk.objects._operations.SyncOperationLinkObject:6 #: yadisk.objects._resources.AsyncPublicResourceLinkObject:6 #: yadisk.objects._resources.AsyncResourceLinkObject:6 #: yadisk.objects._resources.PublicResourceLinkObject:6 #: yadisk.objects._resources.ResourceDownloadLinkObject:6 #: yadisk.objects._resources.ResourceLinkObject:6 #: yadisk.objects._resources.ResourceUploadLinkObject:7 #: yadisk.objects._resources.SyncPublicResourceLinkObject:6 #: yadisk.objects._resources.SyncResourceLinkObject:6 msgid "`str`, link URL" msgstr "`str`, URL ссылки" #: of yadisk._async_session.AsyncSession.send_request:10 #: yadisk._session.Session.send_request:10 #: yadisk.objects._link_object.LinkObject:7 #: yadisk.objects._operations.AsyncOperationLinkObject:7 #: yadisk.objects._operations.OperationLinkObject:7 #: yadisk.objects._operations.SyncOperationLinkObject:7 #: yadisk.objects._resources.AsyncPublicResourceLinkObject:7 #: yadisk.objects._resources.AsyncResourceLinkObject:7 #: yadisk.objects._resources.PublicResourceLinkObject:7 #: yadisk.objects._resources.ResourceDownloadLinkObject:7 #: yadisk.objects._resources.ResourceLinkObject:7 #: yadisk.objects._resources.ResourceUploadLinkObject:8 #: yadisk.objects._resources.SyncPublicResourceLinkObject:7 #: yadisk.objects._resources.SyncResourceLinkObject:7 msgid "`str`, HTTP method" msgstr "`str`, HTTP метод" #: of yadisk.objects._link_object.LinkObject:8 #: yadisk.objects._operations.AsyncOperationLinkObject:8 #: yadisk.objects._operations.OperationLinkObject:8 #: yadisk.objects._operations.SyncOperationLinkObject:8 #: yadisk.objects._resources.AsyncPublicResourceLinkObject:8 #: yadisk.objects._resources.AsyncResourceLinkObject:8 #: yadisk.objects._resources.PublicResourceLinkObject:8 #: yadisk.objects._resources.ResourceDownloadLinkObject:8 #: yadisk.objects._resources.ResourceLinkObject:8 #: yadisk.objects._resources.ResourceUploadLinkObject:9 #: yadisk.objects._resources.SyncPublicResourceLinkObject:8 #: yadisk.objects._resources.SyncResourceLinkObject:8 msgid "`bool`, tells whether the URL is templated" msgstr "`bool`, признак шаблонизированного URL" #: of yadisk.objects._resources.AsyncPublicResourceLinkObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.PublicResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" #: of yadisk.objects._resources.AsyncPublicResourceLinkObject:1 #: yadisk.objects._resources.PublicResourceLinkObject:1 #: yadisk.objects._resources.SyncPublicResourceLinkObject:1 msgid "Public resource link object." msgstr "Объект ссылки на публичный ресурс." #: of yadisk.objects._resources.AsyncPublicResourceLinkObject:9 #: yadisk.objects._resources.AsyncPublicResourceListObject:12 #: yadisk.objects._resources.PublicResourceLinkObject:9 #: yadisk.objects._resources.PublicResourceListObject:12 #: yadisk.objects._resources.SyncPublicResourceLinkObject:9 #: yadisk.objects._resources.SyncPublicResourceListObject:12 msgid "`str`, public key of the resource" msgstr "`str`, публичный ключ к ресурсу" #: of yadisk.objects._resources.AsyncPublicResourceLinkObject:10 #: yadisk.objects._resources.PublicResourceLinkObject:10 #: yadisk.objects._resources.SyncPublicResourceLinkObject:10 msgid "`str`, public URL of the resource" msgstr "`str`, публичный URL ресурса" #: of yadisk.objects._resources.AsyncPublicResourceListObject:1 #: yadisk.objects._resources.SyncPublicResourceListObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.PublicResourceListObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourceListObject`" #: of yadisk.objects._resources.AsyncPublicResourceListObject:1 #: yadisk.objects._resources.AsyncPublicResourcesListObject:1 #: yadisk.objects._resources.PublicResourceListObject:1 #: yadisk.objects._resources.PublicResourcesListObject:1 #: yadisk.objects._resources.SyncPublicResourceListObject:1 #: yadisk.objects._resources.SyncPublicResourcesListObject:1 msgid "List of public resources." msgstr "Список публичных ресурсов." #: of yadisk.objects._resources.AsyncPublicResourceListObject:6 #: yadisk.objects._resources.AsyncResourceListObject:6 #: yadisk.objects._resources.AsyncTrashResourceListObject:6 #: yadisk.objects._resources.PublicResourceListObject:6 #: yadisk.objects._resources.ResourceListObject:6 #: yadisk.objects._resources.SyncPublicResourceListObject:6 #: yadisk.objects._resources.SyncResourceListObject:6 #: yadisk.objects._resources.SyncTrashResourceListObject:6 #: yadisk.objects._resources.TrashResourceListObject:6 msgid "`str`, sort type" msgstr "`str`, тип сортировки" #: of yadisk.objects._resources.AsyncPublicResourceListObject:10 #: yadisk.objects._resources.AsyncResourceListObject:10 #: yadisk.objects._resources.AsyncTrashResourceListObject:10 #: yadisk.objects._resources.PublicResourceListObject:10 #: yadisk.objects._resources.ResourceListObject:10 #: yadisk.objects._resources.SyncPublicResourceListObject:10 #: yadisk.objects._resources.SyncResourceListObject:10 #: yadisk.objects._resources.SyncTrashResourceListObject:10 #: yadisk.objects._resources.TrashResourceListObject:10 msgid "`str`, path to the directory that contains the elements of the list" msgstr "`str`, путь к папке, содержащей элементы списка" #: of yadisk.objects._resources.AsyncPublicResourceListObject:11 #: yadisk.objects._resources.AsyncResourceListObject:11 #: yadisk.objects._resources.AsyncTrashResourceListObject:11 #: yadisk.objects._resources.PublicResourceListObject:11 #: yadisk.objects._resources.ResourceListObject:11 #: yadisk.objects._resources.SyncPublicResourceListObject:11 #: yadisk.objects._resources.SyncResourceListObject:11 #: yadisk.objects._resources.SyncTrashResourceListObject:11 #: yadisk.objects._resources.TrashResourceListObject:11 msgid "`int`, number of elements in the list" msgstr "`int`, количество элементов списка" #: of yadisk.objects._resources.AsyncPublicResourceObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.PublicResourceObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourceObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" #: of yadisk.objects._resources.AsyncPublicResourceObject:1 #: yadisk.objects._resources.PublicResourceObject:1 #: yadisk.objects._resources.SyncPublicResourceObject:1 msgid "Public resource object." msgstr "Объект публичного ресурса." #: of yadisk.objects._resources.AsyncPublicResourceObject:6 #: yadisk.objects._resources.AsyncResourceObject:6 #: yadisk.objects._resources.AsyncTrashResourceObject:6 #: yadisk.objects._resources.PublicResourceObject:6 #: yadisk.objects._resources.ResourceObject:6 #: yadisk.objects._resources.SyncPublicResourceObject:6 #: yadisk.objects._resources.SyncResourceObject:6 #: yadisk.objects._resources.SyncTrashResourceObject:6 #: yadisk.objects._resources.TrashResourceObject:6 msgid "`str`, antivirus check status" msgstr "`str`, статус проверки антивирусом" #: of yadisk.objects._resources.AsyncPublicResourceObject:7 #: yadisk.objects._resources.AsyncResourceObject:7 #: yadisk.objects._resources.AsyncTrashResourceObject:7 #: yadisk.objects._resources.PublicResourceObject:7 #: yadisk.objects._resources.ResourceObject:7 #: yadisk.objects._resources.SyncPublicResourceObject:7 #: yadisk.objects._resources.SyncResourceObject:7 #: yadisk.objects._resources.SyncTrashResourceObject:7 #: yadisk.objects._resources.TrashResourceObject:7 msgid "`str`, download URL" msgstr "`str`, URL для скачивания файла" #: of yadisk.objects._resources.AsyncPublicResourceObject:8 #: yadisk.objects._resources.AsyncResourceObject:8 #: yadisk.objects._resources.AsyncTrashResourceObject:8 #: yadisk.objects._resources.PublicResourceObject:8 #: yadisk.objects._resources.ResourceObject:8 #: yadisk.objects._resources.SyncPublicResourceObject:8 #: yadisk.objects._resources.SyncResourceObject:8 #: yadisk.objects._resources.SyncTrashResourceObject:8 #: yadisk.objects._resources.TrashResourceObject:8 msgid "`int`, file size" msgstr "`int`, размер файла" #: of yadisk.objects._resources.AsyncPublicResourceObject:9 #: yadisk.objects._resources.AsyncResourceObject:9 #: yadisk.objects._resources.AsyncTrashResourceObject:9 #: yadisk.objects._resources.PublicResourceObject:9 #: yadisk.objects._resources.ResourceObject:9 #: yadisk.objects._resources.SyncPublicResourceObject:9 #: yadisk.objects._resources.SyncResourceObject:9 #: yadisk.objects._resources.SyncTrashResourceObject:9 #: yadisk.objects._resources.TrashResourceObject:9 msgid "`str`, public resource key" msgstr "`str`, публичный ключ" #: of yadisk.objects._resources.AsyncPublicResourceObject:10 #: yadisk.objects._resources.AsyncResourceObject:10 #: yadisk.objects._resources.AsyncTrashResourceObject:10 #: yadisk.objects._resources.PublicResourceObject:10 #: yadisk.objects._resources.ResourceObject:10 #: yadisk.objects._resources.SyncPublicResourceObject:10 #: yadisk.objects._resources.SyncResourceObject:10 #: yadisk.objects._resources.SyncTrashResourceObject:10 #: yadisk.objects._resources.TrashResourceObject:10 msgid "`str`, SHA256 hash" msgstr "`str`, SHA256 хэш" #: of yadisk.objects._resources.AsyncPublicResourceObject:11 #: yadisk.objects._resources.AsyncResourceObject:11 #: yadisk.objects._resources.AsyncTrashResourceObject:11 #: yadisk.objects._resources.PublicResourceObject:11 #: yadisk.objects._resources.ResourceObject:11 #: yadisk.objects._resources.SyncPublicResourceObject:11 #: yadisk.objects._resources.SyncResourceObject:11 #: yadisk.objects._resources.SyncTrashResourceObject:11 #: yadisk.objects._resources.TrashResourceObject:11 msgid "`str`, MD5 hash" msgstr "`str`, MD5 хэш" #: of yadisk.objects._resources.AsyncPublicResourceObject:12 msgid ":any:`AsyncPublicResourceObject`, list of nested resources" msgstr ":any:`AsyncPublicResourceObject`, список вложенных ресурсов" #: of yadisk.objects._resources.AsyncPublicResourceObject:13 #: yadisk.objects._resources.AsyncResourceObject:13 #: yadisk.objects._resources.AsyncTrashResourceObject:13 #: yadisk.objects._resources.PublicResourceObject:13 #: yadisk.objects._resources.ResourceObject:13 #: yadisk.objects._resources.SyncPublicResourceObject:13 #: yadisk.objects._resources.SyncResourceObject:13 #: yadisk.objects._resources.SyncTrashResourceObject:13 #: yadisk.objects._resources.TrashResourceObject:13 msgid "`str`, filename" msgstr "`str`, имя файла" #: of yadisk.objects._resources.AsyncPublicResourceObject:14 #: yadisk.objects._resources.AsyncResourceObject:14 #: yadisk.objects._resources.AsyncTrashResourceObject:14 #: yadisk.objects._resources.PublicResourceObject:14 #: yadisk.objects._resources.ResourceObject:14 #: yadisk.objects._resources.SyncPublicResourceObject:14 #: yadisk.objects._resources.SyncResourceObject:14 #: yadisk.objects._resources.SyncTrashResourceObject:14 #: yadisk.objects._resources.TrashResourceObject:14 msgid ":any:`EXIFObject`, EXIF metadata" msgstr ":any:`EXIFObject`, метаданные EXIF" #: of yadisk.objects._resources.AsyncPublicResourceObject:15 #: yadisk.objects._resources.AsyncResourceObject:15 #: yadisk.objects._resources.AsyncTrashResourceObject:15 #: yadisk.objects._resources.PublicResourceObject:15 #: yadisk.objects._resources.ResourceObject:15 #: yadisk.objects._resources.SyncPublicResourceObject:15 #: yadisk.objects._resources.SyncResourceObject:15 #: yadisk.objects._resources.SyncTrashResourceObject:15 #: yadisk.objects._resources.TrashResourceObject:15 msgid "`str`, resource ID" msgstr "`str`, идентификатор ресурса" #: of yadisk.objects._resources.AsyncPublicResourceObject:16 #: yadisk.objects._resources.AsyncResourceObject:16 #: yadisk.objects._resources.AsyncTrashResourceObject:16 #: yadisk.objects._resources.PublicResourceObject:16 #: yadisk.objects._resources.ResourceObject:16 #: yadisk.objects._resources.SyncPublicResourceObject:16 #: yadisk.objects._resources.SyncResourceObject:16 #: yadisk.objects._resources.SyncTrashResourceObject:16 #: yadisk.objects._resources.TrashResourceObject:16 msgid "`dict`, custom resource properties" msgstr "`dict`, пользовательские свойства ресурса" #: of yadisk.objects._resources.AsyncPublicResourceObject:17 #: yadisk.objects._resources.AsyncResourceObject:17 #: yadisk.objects._resources.AsyncTrashResourceObject:17 #: yadisk.objects._resources.PublicResourceObject:17 #: yadisk.objects._resources.ResourceObject:17 #: yadisk.objects._resources.SyncPublicResourceObject:17 #: yadisk.objects._resources.SyncResourceObject:17 #: yadisk.objects._resources.SyncTrashResourceObject:17 #: yadisk.objects._resources.TrashResourceObject:17 msgid "`str`, public URL" msgstr "`str`, публичный URL" #: of yadisk.objects._resources.AsyncPublicResourceObject:18 #: yadisk.objects._resources.AsyncResourceObject:18 #: yadisk.objects._resources.AsyncTrashResourceObject:18 #: yadisk.objects._resources.PublicResourceObject:18 #: yadisk.objects._resources.ResourceObject:18 #: yadisk.objects._resources.SyncPublicResourceObject:18 #: yadisk.objects._resources.SyncResourceObject:18 #: yadisk.objects._resources.SyncTrashResourceObject:18 #: yadisk.objects._resources.TrashResourceObject:18 msgid ":any:`ShareInfoObject`, shared folder information" msgstr ":any:`ShareInfoObject`, информация об общей папке" #: of yadisk.objects._resources.AsyncPublicResourceObject:19 #: yadisk.objects._resources.AsyncResourceObject:19 #: yadisk.objects._resources.AsyncTrashResourceObject:19 #: yadisk.objects._resources.PublicResourceObject:19 #: yadisk.objects._resources.ResourceObject:19 #: yadisk.objects._resources.SyncPublicResourceObject:19 #: yadisk.objects._resources.SyncResourceObject:19 #: yadisk.objects._resources.SyncTrashResourceObject:19 #: yadisk.objects._resources.TrashResourceObject:19 msgid ":any:`datetime.datetime`, date of last modification" msgstr ":any:`datetime.datetime`, дата последнего изменения" #: of yadisk.objects._resources.AsyncPublicResourceObject:20 #: yadisk.objects._resources.AsyncResourceObject:20 #: yadisk.objects._resources.AsyncTrashResourceObject:20 #: yadisk.objects._resources.PublicResourceObject:20 #: yadisk.objects._resources.ResourceObject:20 #: yadisk.objects._resources.SyncPublicResourceObject:20 #: yadisk.objects._resources.SyncResourceObject:20 #: yadisk.objects._resources.SyncTrashResourceObject:20 #: yadisk.objects._resources.TrashResourceObject:20 msgid ":any:`datetime.datetime`, date of creation" msgstr ":any:`datetime.datetime`, дата создания" #: of yadisk.objects._resources.AsyncPublicResourceObject:21 #: yadisk.objects._resources.AsyncResourceObject:21 #: yadisk.objects._resources.AsyncTrashResourceObject:21 #: yadisk.objects._resources.PublicResourceObject:21 #: yadisk.objects._resources.ResourceObject:21 #: yadisk.objects._resources.SyncPublicResourceObject:21 #: yadisk.objects._resources.SyncResourceObject:21 #: yadisk.objects._resources.SyncTrashResourceObject:21 #: yadisk.objects._resources.TrashResourceObject:21 msgid ":any:`datetime.datetime`, photo/video creation date" msgstr ":any:`datetime.datetime`, дата создания фото/видео" #: of yadisk.objects._resources.AsyncPublicResourceObject:22 #: yadisk.objects._resources.AsyncResourceObject:22 #: yadisk.objects._resources.AsyncTrashResourceObject:22 #: yadisk.objects._resources.PublicResourceObject:22 #: yadisk.objects._resources.ResourceObject:22 #: yadisk.objects._resources.SyncPublicResourceObject:22 #: yadisk.objects._resources.SyncResourceObject:22 #: yadisk.objects._resources.SyncTrashResourceObject:22 #: yadisk.objects._resources.TrashResourceObject:22 msgid "`str`, MIME type" msgstr "`str`, MIME-тип" #: of yadisk.objects._resources.AsyncPublicResourceObject:23 #: yadisk.objects._resources.AsyncResourceLinkObject:9 #: yadisk.objects._resources.AsyncResourceObject:23 #: yadisk.objects._resources.AsyncTrashResourceObject:23 #: yadisk.objects._resources.PublicResourceObject:23 #: yadisk.objects._resources.ResourceLinkObject:9 #: yadisk.objects._resources.ResourceObject:23 #: yadisk.objects._resources.SyncPublicResourceObject:23 #: yadisk.objects._resources.SyncResourceLinkObject:9 #: yadisk.objects._resources.SyncResourceObject:23 #: yadisk.objects._resources.SyncTrashResourceObject:23 #: yadisk.objects._resources.TrashResourceObject:23 msgid "`str`, path to the resource" msgstr "`str`, путь к ресурсу" #: of yadisk.objects._resources.AsyncPublicResourceObject:24 #: yadisk.objects._resources.AsyncResourceObject:24 #: yadisk.objects._resources.AsyncTrashResourceObject:24 #: yadisk.objects._resources.PublicResourceObject:24 #: yadisk.objects._resources.ResourceObject:24 #: yadisk.objects._resources.SyncPublicResourceObject:24 #: yadisk.objects._resources.SyncResourceObject:24 #: yadisk.objects._resources.SyncTrashResourceObject:24 #: yadisk.objects._resources.TrashResourceObject:24 msgid "`str`, file preview URL" msgstr "`str`, URL превью файла" #: of yadisk.objects._resources.AsyncPublicResourceObject:25 #: yadisk.objects._resources.AsyncResourceObject:25 #: yadisk.objects._resources.AsyncTrashResourceObject:25 #: yadisk.objects._resources.PublicResourceObject:25 #: yadisk.objects._resources.ResourceObject:25 #: yadisk.objects._resources.SyncPublicResourceObject:25 #: yadisk.objects._resources.SyncResourceObject:25 #: yadisk.objects._resources.SyncTrashResourceObject:25 #: yadisk.objects._resources.TrashResourceObject:25 msgid ":any:`CommentIDsObject`, comment IDs" msgstr ":any:`CommentIDsObject`, идентификаторы комментариев" #: of yadisk.objects._resources.AsyncPublicResourceObject:26 #: yadisk.objects._resources.AsyncResourceObject:26 #: yadisk.objects._resources.AsyncTrashResourceObject:26 #: yadisk.objects._resources.PublicResourceObject:26 #: yadisk.objects._resources.ResourceObject:26 #: yadisk.objects._resources.SyncPublicResourceObject:26 #: yadisk.objects._resources.SyncResourceObject:26 #: yadisk.objects._resources.SyncTrashResourceObject:26 #: yadisk.objects._resources.TrashResourceObject:26 msgid "`str`, type (\"file\" or \"dir\")" msgstr "`str`, тип (\"file\" или \"dir\")" #: of yadisk.objects._resources.AsyncPublicResourceObject:27 #: yadisk.objects._resources.AsyncResourceObject:27 #: yadisk.objects._resources.AsyncTrashResourceObject:27 #: yadisk.objects._resources.PublicResourceObject:27 #: yadisk.objects._resources.ResourceObject:27 #: yadisk.objects._resources.SyncPublicResourceObject:27 #: yadisk.objects._resources.SyncResourceObject:27 #: yadisk.objects._resources.SyncTrashResourceObject:27 #: yadisk.objects._resources.TrashResourceObject:27 msgid "`str`, file type as determined by Yandex.Disk" msgstr "`str`, тип файла, согласно Яндекс.Диску" #: of yadisk.objects._resources.AsyncPublicResourceObject:28 #: yadisk.objects._resources.AsyncResourceObject:28 #: yadisk.objects._resources.AsyncTrashResourceObject:28 #: yadisk.objects._resources.PublicResourceObject:28 #: yadisk.objects._resources.ResourceObject:28 #: yadisk.objects._resources.SyncPublicResourceObject:28 #: yadisk.objects._resources.SyncResourceObject:28 #: yadisk.objects._resources.SyncTrashResourceObject:28 #: yadisk.objects._resources.TrashResourceObject:28 msgid "`int`, Yandex.Disk revision at the time of last modification" msgstr "`int`, ревизия Яндекс.Диска на момент последнего изменения" #: of yadisk.objects._resources.AsyncPublicResourceObject:29 #: yadisk.objects._resources.PublicResourceObject:29 #: yadisk.objects._resources.SyncPublicResourceObject:29 msgid "`int`, number of times the public resource was viewed" msgstr "`int`, количество просмотров публичного ресурса" #: of yadisk.objects._resources.AsyncPublicResourceObject:30 #: yadisk.objects._resources.PublicResourceObject:30 #: yadisk.objects._resources.SyncPublicResourceObject:30 msgid ":any:`UserPublicInfoObject`, owner of the public resource" msgstr ":any:`UserPublicInfoObject`, владелец публичного ресурса" #: of yadisk.objects._resources.AsyncPublicResourcesListObject:1 #: yadisk.objects._resources.SyncPublicResourcesListObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.PublicResourcesListObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourcesListObject`" #: of yadisk.objects._resources.AsyncPublicResourcesListObject:6 msgid "`list`, list of public resources (:any:`AsyncPublicResourceObject`)" msgstr "`list`, список публичных ресурсов (:any:`AsyncPublicResourceObject`)" #: of yadisk.objects._resources.AsyncPublicResourcesListObject:7 #: yadisk.objects._resources.PublicResourcesListObject:7 #: yadisk.objects._resources.SyncPublicResourcesListObject:7 msgid "`str`, resource type to filter by" msgstr "`str`, тип ресурса по которому фильтровать" #: of yadisk.objects._resources.AsyncResourceLinkObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.ResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.ResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" #: of yadisk.objects._resources.AsyncResourceLinkObject:1 #: yadisk.objects._resources.ResourceLinkObject:1 #: yadisk.objects._resources.SyncResourceLinkObject:1 msgid "Resource link object." msgstr "Объект ссылки на ресурс." #: of yadisk.objects._resources.AsyncResourceListObject:1 #: yadisk.objects._resources.PublicResourceListObject:1 #: yadisk.objects._resources.SyncResourceListObject:1 #: yadisk.objects._resources.TrashResourceListObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.ResourceListObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._resources.ResourceListObject`" #: of yadisk.objects._resources.AsyncResourceListObject:1 #: yadisk.objects._resources.ResourceListObject:1 #: yadisk.objects._resources.SyncResourceListObject:1 msgid "List of resources." msgstr "Список ресурсов." #: of yadisk.objects._resources.AsyncResourceObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.ResourceObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" msgstr "" "Базовые классы: :py:class:`~yadisk.objects._resources.ResourceObject`, " ":py:class:`~yadisk.objects._resources.AsyncResourceObjectMethodsMixin`" #: of yadisk.objects._resources.AsyncResourceObject:1 #: yadisk.objects._resources.ResourceObject:1 #: yadisk.objects._resources.SyncResourceObject:1 msgid "Resource object." msgstr "Объект ресурса." #: of yadisk.objects._resources.AsyncResourceObject:12 msgid ":any:`AsyncResourceListObject`, list of nested resources" msgstr ":any:`AsyncResourceListObject`, список вложенных ресурсов" #: of yadisk.objects._resources.AsyncResourceObject:29 #: yadisk.objects._resources.AsyncTrashResourceObject:31 #: yadisk.objects._resources.ResourceObject:29 #: yadisk.objects._resources.SyncResourceObject:29 #: yadisk.objects._resources.SyncTrashResourceObject:31 #: yadisk.objects._resources.TrashResourceObject:31 msgid "" "`dict[str, str]`, mapping of all preview sizes, where keys are names and " "values are download links" msgstr "" "`dict[str, str]`, соответствие всех размеров превью, где ключи - названия" " размеров, а значения - ссылки для скачивания превью" #: of yadisk.objects._resources.AsyncTrashResourceListObject:1 #: yadisk.objects._resources.SyncTrashResourceListObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.TrashResourceListObject`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.TrashResourceListObject`" #: of yadisk.objects._resources.AsyncTrashResourceListObject:1 #: yadisk.objects._resources.SyncTrashResourceListObject:1 #: yadisk.objects._resources.TrashResourceListObject:1 msgid "List of trash resources." msgstr "Список ресурсов корзины." #: of yadisk.objects._resources.AsyncTrashResourceListObject:7 msgid "`list`, list of resources (:any:`AsyncTrashResourceObject`)" msgstr "`list`, список ресурсов (:any:`AsyncTrashResourceObject`)" #: of yadisk.objects._resources.AsyncTrashResourceObject:1 #: yadisk.objects._resources.SyncTrashResourceObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.TrashResourceObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._resources.TrashResourceObject`" #: of yadisk.objects._resources.AsyncTrashResourceObject:1 #: yadisk.objects._resources.SyncTrashResourceObject:1 #: yadisk.objects._resources.TrashResourceObject:1 msgid "Trash resource object." msgstr "Объект ресурса корзины." #: of yadisk.objects._resources.AsyncTrashResourceObject:12 msgid ":any:`AsyncTrashResourceListObject`, list of nested resources" msgstr ":any:`AsyncTrashResourceListObject`, список вложенных ресурсов" #: of yadisk.objects._resources.AsyncTrashResourceObject:29 #: yadisk.objects._resources.SyncTrashResourceObject:29 #: yadisk.objects._resources.TrashResourceObject:29 msgid "`str`, original path" msgstr "`str`, оригинальный путь" #: of yadisk.objects._resources.AsyncTrashResourceObject:30 #: yadisk.objects._resources.SyncTrashResourceObject:30 #: yadisk.objects._resources.TrashResourceObject:30 msgid ":any:`datetime.datetime`, date of deletion" msgstr ":any:`datetime.datetime`, дата удаления" #: of yadisk.objects._resources.AsyncTrashResourceObject.exists:1 #: yadisk.objects._resources.SyncTrashResourceObject.exists:1 msgid "Check whether the trash resource exists." msgstr "Проверяет, существует ли ресурс в корзине." #: of yadisk.objects._resources.AsyncTrashResourceObject.exists:3 #: yadisk.objects._resources.AsyncTrashResourceObject.get_meta:3 #: yadisk.objects._resources.AsyncTrashResourceObject.get_type:3 #: yadisk.objects._resources.AsyncTrashResourceObject.is_dir:3 #: yadisk.objects._resources.AsyncTrashResourceObject.is_file:3 #: yadisk.objects._resources.SyncTrashResourceObject.exists:3 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:3 #: yadisk.objects._resources.SyncTrashResourceObject.get_type:3 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:3 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:3 msgid "`str` or `None`, relative path to the trash resource" msgstr "`str` или `None`, относительный путь к ресурсу" #: of yadisk.objects._resources.AsyncTrashResourceObject.is_dir:1 #: yadisk.objects._resources.SyncTrashResourceObject.is_dir:1 msgid "Check whether resource is a trash directory." msgstr "Проверяет, является ли ресурс папкой в корзине." #: of yadisk.objects._resources.AsyncTrashResourceObject.is_file:1 #: yadisk.objects._resources.SyncTrashResourceObject.is_file:1 msgid "Check whether resource is a trash file." msgstr "Проверяет, является ли ресурс файлом в корзине." #: of yadisk.objects._resources.AsyncTrashResourceObject.listdir:3 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:3 msgid "`str` or `None`, relative path to the directory in the trash bin" msgstr "`str` или `None`, относительный путь к папке в корзине" #: of yadisk.objects._resources.AsyncTrashResourceObject.listdir:23 msgid "generator of :any:`AsyncTrashResourceObject`" msgstr "генератор :any:`AsyncTrashResourceObject`" #: of yadisk.objects._resources.AsyncTrashResourceObject.remove:3 #: yadisk.objects._resources.SyncTrashResourceObject.remove:3 msgid "`str` or `None`, relative path to the trash resource to be deleted" msgstr "" "`str` или `None`, относительный путь к ресурсу корзины, подлежащий " "удалению" #: of yadisk.objects._resources.AsyncTrashResourceObject.restore:4 #: yadisk.objects._resources.SyncTrashResourceObject.restore:4 msgid "This method takes 1 or 2 positional arguments:" msgstr "Данный метод принимает 1 или 2 позиционных аргумента:" #: of yadisk.objects._resources.AsyncTrashResourceObject.restore:6 #: yadisk.objects._resources.SyncTrashResourceObject.restore:6 msgid ":code:`restore(dst_path, /, **kwargs)`" msgstr ":code:`restore(dst_path, /, **kwargs)`" #: of yadisk.objects._resources.AsyncTrashResourceObject.restore:7 #: yadisk.objects._resources.SyncTrashResourceObject.restore:7 msgid ":code:`restore(relative_path=None, dst_path, /, **kwargs)`" msgstr ":code:`restore(relative_path=None, dst_path, /, **kwargs)`" #: of yadisk.objects._resources.AsyncTrashResourceObject.restore:9 #: yadisk.objects._resources.SyncTrashResourceObject.restore:9 msgid "`str` or `None`, relative path to the trash resource to be restored" msgstr "`str` или `None`, относительный путь к восстанавливаему ресурсу" #: of yadisk.objects._auth.DeviceCodeObject:1 #: yadisk.objects._auth.TokenObject:1 #: yadisk.objects._auth.TokenRevokeStatusObject:1 #: yadisk.objects._disk.DiskInfoObject:1 #: yadisk.objects._disk.SystemFoldersObject:1 yadisk.objects._disk.UserObject:1 #: yadisk.objects._error_object.ErrorObject:1 #: yadisk.objects._link_object.LinkObject:1 #: yadisk.objects._operations.OperationStatusObject:1 #: yadisk.objects._resources.AvailableUntilVerboseObject:1 #: yadisk.objects._resources.CommentIDsObject:1 #: yadisk.objects._resources.EXIFObject:1 #: yadisk.objects._resources.ExternalOrganizationIdVerboseObject:1 #: yadisk.objects._resources.FilesResourceListObject:1 #: yadisk.objects._resources.LastUploadedResourceListObject:1 #: yadisk.objects._resources.PasswordVerboseObject:1 #: yadisk.objects._resources.PublicAccessObject:1 #: yadisk.objects._resources.PublicAvailableSettingsObject:1 #: yadisk.objects._resources.PublicDefaultObject:1 #: yadisk.objects._resources.PublicResourcesListObject:1 #: yadisk.objects._resources.PublicSettingsObject:1 #: yadisk.objects._resources.ResourceListObject:1 #: yadisk.objects._resources.ResourceObject:1 #: yadisk.objects._resources.ShareInfoObject:1 msgid "Bases: :py:class:`~yadisk.objects._yadisk_object.YaDiskObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._yadisk_object.YaDiskObject`" #: of yadisk.objects._resources.AvailableUntilVerboseObject:1 #: yadisk.types.AvailableUntilVerbose:1 msgid "Verbose information about the expiration date of a shared resource." msgstr "Развёрнутая информация о дате истечения доступа" #: of yadisk.objects._resources.AvailableUntilVerboseObject:3 #: yadisk.types.AvailableUntilVerbose:3 msgid "`bool`, whether the expiration date is enabled" msgstr "`bool`, признак наличия даты истечения" #: of yadisk.objects._resources.AvailableUntilVerboseObject:4 msgid "`int`, timestamp of the expiration date" msgstr "`int`, дата (timestamp) истечения ссылки" #: of yadisk.objects._resources.CommentIDsObject:1 msgid "Comment IDs object." msgstr "Список идентификаторов комментариев." #: of yadisk.objects._link_object.LinkObject:4 #: yadisk.objects._operations.OperationLinkObject:4 #: yadisk.objects._resources.CommentIDsObject:4 #: yadisk.objects._resources.EXIFObject:4 #: yadisk.objects._resources.FilesResourceListObject:4 #: yadisk.objects._resources.LastUploadedResourceListObject:4 #: yadisk.objects._resources.PublicResourceLinkObject:4 #: yadisk.objects._resources.PublicResourceListObject:4 #: yadisk.objects._resources.PublicResourceObject:4 #: yadisk.objects._resources.PublicResourcesListObject:4 #: yadisk.objects._resources.ResourceDownloadLinkObject:4 #: yadisk.objects._resources.ResourceLinkObject:4 #: yadisk.objects._resources.ResourceListObject:4 #: yadisk.objects._resources.ResourceObject:4 #: yadisk.objects._resources.ResourceUploadLinkObject:4 #: yadisk.objects._resources.ShareInfoObject:4 #: yadisk.objects._resources.TrashResourceListObject:4 #: yadisk.objects._resources.TrashResourceObject:4 msgid ":any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object" msgstr ":any:`Client`/:any:`AsyncClient` или `None`, объект `YaDisk`" #: of yadisk.objects._resources.CommentIDsObject:6 msgid "`str`, comment ID for private resources" msgstr "`str`, идентификатор комментария для приватных ресурсов" #: of yadisk.objects._resources.CommentIDsObject:7 msgid "`str`, comment ID for public resources" msgstr "`str`, идентификатор комментария для публичных ресурсов" #: of yadisk.objects._auth.DeviceCodeObject:1 msgid "" "Result of :any:`Client.get_device_code()` / " ":any:`AsyncClient.get_device_code()`." msgstr "" "Результат :any:`Client.get_device_code()` / " ":any:`AsyncClient.get_device_code()`." #: of yadisk.objects._auth.DeviceCodeObject:4 #: yadisk.objects._auth.TokenObject:4 #: yadisk.objects._auth.TokenRevokeStatusObject:4 #: yadisk.objects._disk.DiskInfoObject:4 #: yadisk.objects._disk.SystemFoldersObject:4 yadisk.objects._disk.UserObject:4 #: yadisk.objects._disk.UserPublicInfoObject:5 #: yadisk.objects._operations.OperationStatusObject:4 #: yadisk.objects._yadisk_object.YaDiskObject:6 msgid ":any:`YaDisk` or `None`, `YaDisk` object" msgstr ":any:`YaDisk` или `None`, объект `YaDisk`" #: of yadisk.objects._auth.DeviceCodeObject:6 msgid "`str`, device code that can be used for obtaining the token" msgstr "`str`, код устройства, который может быть использован для получения токена" #: of yadisk.objects._auth.DeviceCodeObject:7 msgid "`str`, code that the user should enter on the OAuth page" msgstr "`str`, код, который пользователь должен ввести на странице OAuth" #: of yadisk.objects._auth.DeviceCodeObject:8 msgid "" "`str`, URL of the OAuth page where user is expected to enter the " ":code:`user_code`" msgstr "" "`str`, URL страницы OAuth, на которой пользователь должен ввести " ":code:`user_code`" #: of yadisk.objects._auth.DeviceCodeObject:10 msgid "" "`int`, the minimum interval (in seconds) with which the app must request " "an OAuth token. If requests come more often, Yandex OAuth may respond " "with an error" msgstr "" "`int`, минимальный интервал времени (в секундах), с которым приложение " "должно запрашивать OAuth токен. Если запросы будут поступать чаще, Яндекс" " OAuth может вернуть ошибку" #: of yadisk.objects._auth.DeviceCodeObject:13 msgid "`int`, amount of time before the codes expire" msgstr "`int`, количество времени, после которого коды истекают" #: of yadisk.objects._disk.DiskInfoObject:1 msgid "Disk information object." msgstr "Объект информации о диске." #: of yadisk.objects._disk.DiskInfoObject:6 msgid "`int`, number of days before file deletion after account lock" msgstr "`int`, количество дней до удаления файлов после блокировки" #: of yadisk.objects._disk.DiskInfoObject:7 msgid "`int`, timestamp in ms of expiration date of unlimited photo upload" msgstr "`int`, timestamp в мс окончания бесплатного места в фотобезлимите" #: of yadisk.objects._disk.DiskInfoObject:9 msgid "`bool`, tells whether the screenshots are hidden in photoslice" msgstr "`bool`, настройка скрытия скриншотов у пользователя" #: of yadisk.objects._disk.DiskInfoObject:11 #: yadisk.objects._disk.DiskInfoObject:12 msgid "`bool`, not clear what this is for" msgstr "`bool`, не ясно, для чего это" #: of yadisk.objects._disk.DiskInfoObject:13 msgid "`bool`, tells if the account belongs to a legal entity" msgstr "`bool`, признак принадлежности пользователя к юридическому лицу" #: of yadisk.objects._disk.DiskInfoObject:14 msgid "`bool`, tells if the account is paid or not" msgstr "`bool`, признак платного аккаунта" #: of yadisk.objects._disk.DiskInfoObject:15 msgid "`int`, maximum supported file size (bytes)" msgstr "`int`, максимальный поддерживаемый размер файла (в байтах)" #: of yadisk.objects._disk.DiskInfoObject:16 msgid "`int`, maximum supported file size for a paid account (bytes)" msgstr "" "`int`, максимальный поддерживаемый размер файла для платного аккаунта (в " "байтах)" #: of yadisk.objects._disk.DiskInfoObject:17 msgid "`bool`, tells if the user is involved in `payment_flow`" msgstr "`bool`, признак причастности пользователя к payment_flow" #: of yadisk.objects._disk.DiskInfoObject:18 msgid "`int`, total file size in unlimited photos" msgstr "`int`, общий размер файлов в фотобезлимите" #: of yadisk.objects._disk.DiskInfoObject:19 yadisk.objects._disk.UserObject:6 msgid ":any:`datetime.datetime`, Disk registration date" msgstr ":any:`datetime.datetime`, дата регистрации" #: of yadisk.objects._disk.DiskInfoObject:20 msgid "`int`, current revision of Yandex.Disk" msgstr "`int`, текущая ревизия Яндекс.Диска" #: of yadisk.objects._disk.DiskInfoObject:21 msgid ":any:`SystemFoldersObject`, paths to the system folders" msgstr ":any:`SystemFoldersObject`, пути к системным папкам" #: of yadisk.objects._disk.DiskInfoObject:22 msgid "`int`, total disk size (bytes)" msgstr "`int`, общий размер диска (в байтах)" #: of yadisk.objects._disk.DiskInfoObject:23 msgid "`int`, amount of space used by trash (bytes), part of `used_space`" msgstr "`int`, размер, занятый мусором (в байтах), часть `used_space`" #: of yadisk.objects._disk.DiskInfoObject:24 msgid "`bool`, tells whether unlimited autoupload from mobile devices is enabled" msgstr "`bool`, признак включенной безлимитной автозагрузки с мобильных устройств" #: of yadisk.objects._disk.DiskInfoObject:26 msgid "`int`, amount of space used (bytes)" msgstr "`int`, количество занятого места (в байтах)" #: of yadisk.objects._disk.DiskInfoObject:27 msgid ":any:`UserObject`, owner of the disk" msgstr ":any:`UserObject`, владелец диска" #: of yadisk.objects._disk.DiskInfoObject:28 msgid "" "`bool`, tells if the user will be in overdraft upon reaching " "`free_photounlim_end_date`" msgstr "" "`bool`, признак - будет ли пользователь в овердрафте по достижении " "free_photounlim_end_date" #: of yadisk.objects._resources.EXIFObject:1 msgid "EXIF metadata object." msgstr "Объект метаданных EXIF." #: of yadisk.objects._resources.EXIFObject:6 msgid ":any:`datetime.datetime`, capture date" msgstr ":any:`datetime.datetime`, дата съёмки" #: of yadisk.objects._resources.EXIFObject:7 msgid "`float`, longitude of the photo's location" msgstr "`str`, координата съёмки (долгота)" #: of yadisk.objects._resources.EXIFObject:8 msgid "`float`, latitude of the photo's location" msgstr "`str`, координата съёмки (широта)" #: of yadisk.objects._error_object.ErrorObject:1 msgid "Mirrors Yandex.Disk REST API error object." msgstr "Реализует объект ошибки REST API Яндекс.Диска." #: of yadisk.objects._error_object.ErrorObject:4 msgid "`YaDisk` or `None`, `YaDisk` object" msgstr "`YaDisk` или `None`, объект `YaDisk`" #: of yadisk.objects._error_object.ErrorObject:6 msgid "`str`, human-readable error message" msgstr "`str`, человеко-читаемое сообщение ошибки" #: of yadisk.objects._error_object.ErrorObject:7 msgid "`str`, technical error description" msgstr "`str`, техническое описание ошибки" #: of yadisk.objects._error_object.ErrorObject:8 msgid "`str`, error code" msgstr "`str`, уникальный код ошибки" #: of yadisk.objects._resources.ExternalOrganizationIdVerboseObject:1 #: yadisk.types.ExternalOrganizationIdVerbose:1 msgid "" "Verbose information about the external organization ID of a shared " "resource." msgstr "" "Развёрнутая информация об идентификаторе внешней организации общего " "ресурса" #: of yadisk.objects._resources.ExternalOrganizationIdVerboseObject:3 #: yadisk.types.ExternalOrganizationIdVerbose:3 msgid "`bool`, whether the external organization ID is enabled" msgstr "`bool`, признак наличия идентификатора внешней организации" #: of yadisk.objects._resources.ExternalOrganizationIdVerboseObject:4 #: yadisk.objects._resources.PublicSettingsObject:8 #: yadisk.types.ExternalOrganizationIdVerbose:4 yadisk.types.PublicSettings:10 msgid "`str`, external organization ID" msgstr "`str`, идентификатор внешней организации" #: of yadisk.objects._resources.FilesResourceListObject:6 msgid "`list`, flat list of files (:any:`ResourceObject`)" msgstr "`list`, плоский список файлов (:any:`ResourceObject`)" #: of yadisk.objects._resources.LastUploadedResourceListObject:6 #: yadisk.objects._resources.PublicResourceListObject:7 #: yadisk.objects._resources.ResourceListObject:7 msgid "`list`, list of resources (:any:`ResourceObject`)" msgstr "`list`, список ресурсов (:any:`ResourceObject`)" #: of yadisk.objects._link_object.LinkObject:1 msgid "Link object." msgstr "Объект ссылки." #: of yadisk.objects._operations.OperationLinkObject:1 #: yadisk.objects._resources.PublicResourceLinkObject:1 #: yadisk.objects._resources.ResourceDownloadLinkObject:1 #: yadisk.objects._resources.ResourceLinkObject:1 #: yadisk.objects._resources.ResourceUploadLinkObject:1 msgid "Bases: :py:class:`~yadisk.objects._link_object.LinkObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._link_object.LinkObject`" #: of yadisk.objects._operations.OperationStatusObject:1 msgid "Operation status object." msgstr "Объект статуса операции." #: of yadisk.objects._auth.TokenRevokeStatusObject:6 #: yadisk.objects._operations.OperationStatusObject:6 msgid "`str`, status of the operation" msgstr "`str`, статус операции" #: of yadisk.objects._resources.PasswordVerboseObject:1 msgid "Verbose information about the password of shared resource." msgstr "Развёрнутая информация о пароле общего ресурса." #: of yadisk.objects._resources.PasswordVerboseObject:3 #: yadisk.types.PasswordVerbose:3 msgid "`bool`, whether the password is enabled" msgstr "`bool`, признак активности пароля" #: of yadisk.objects._resources.PasswordVerboseObject:4 msgid "`str`, password value" msgstr "`str`, значения пароля" #: of yadisk.objects._resources.PublicAccessObject:1 #: yadisk.objects._resources.PublicDefaultObject:1 #: yadisk.types.PublicSettingsAccess:1 msgid "Access settings of a shared resource." msgstr "Настройки доступа общего ресурса." #: of yadisk.objects._resources.PublicAccessObject:3 #: yadisk.objects._resources.PublicDefaultObject:3 #: yadisk.types.PublicSettingsAccess:3 msgid "" "`List[Union[Literal[\"employees\"], Literal[\"all\"]]],`, specifies who " "has access to the shared resource, must contain only one element" msgstr "" "`List[Union[Literal[\"employees\"], Literal[\"all\"]]],`, определяет кто " "имеет доступ к общему ресурсу, может содержать только один элемент" #: of yadisk.objects._resources.PublicAccessObject:6 msgid "`str`, specifies the type of access, must be one of the following:" msgstr "`str`, указывает тип доступа, должен быть один из следующих:" #: of yadisk.objects._resources.PublicAccessObject:8 msgid "`macro`: access for all employees or all users" msgstr "`macro`: доступ для всех сотрудников или пользователей" #: of yadisk.objects._resources.PublicAccessObject:9 msgid "`user`: access for a specific user" msgstr "`user`: доступ для конкретного пользователя" #: of yadisk.objects._resources.PublicAccessObject:10 msgid "`group`: access for a specific group" msgstr "`group`: доступ для конкретной группы" #: of yadisk.objects._resources.PublicAccessObject:11 msgid "`department`: access for a specific department" msgstr "`department`: доступ для конкретного подразделения" #: of yadisk.objects._resources.PublicAccessObject:13 #: yadisk.objects._resources.PublicDefaultObject:6 #: yadisk.types.PublicSettingsAccess:6 msgid "`int`, organization ID" msgstr "`str`, идентификатор организации" #: of yadisk.objects._resources.PublicAccessObject:14 msgid "`str`, user, group or department ID" msgstr "`str`, пользователь, группа или идентификатор подразделения" #: of yadisk.objects._resources.PublicAccessObject:15 #: yadisk.objects._resources.PublicDefaultObject:7 msgid "`List[str]`, specifies the access rights" msgstr "`List[str]`, описывает права доступа" #: of yadisk.objects._resources.PublicAccessObject:17 #: yadisk.objects._resources.PublicDefaultObject:9 #: yadisk.types.PublicSettingsAccess:12 msgid "Valid access rights:" msgstr "Доступные права доступа:" #: of yadisk.objects._resources.PublicAccessObject:19 #: yadisk.objects._resources.PublicDefaultObject:11 #: yadisk.types.PublicSettingsAccess:14 msgid "`write`: write access" msgstr "`write`: редактирование" #: of yadisk.objects._resources.PublicAccessObject:20 #: yadisk.objects._resources.PublicDefaultObject:12 #: yadisk.types.PublicSettingsAccess:15 msgid "`read`: read access" msgstr "`read`: просмотр" #: of yadisk.objects._resources.PublicAccessObject:21 #: yadisk.objects._resources.PublicDefaultObject:13 #: yadisk.types.PublicSettingsAccess:16 msgid "`read_without_download`: read access without download" msgstr "`read_without_download`: просмотр без возможности скачивания" #: of yadisk.objects._resources.PublicAccessObject:22 #: yadisk.objects._resources.PublicDefaultObject:14 #: yadisk.types.PublicSettingsAccess:17 msgid "`read_with_password`: read access with password" msgstr "`read_with_password`: просмотр с доступом по паролю" #: of yadisk.objects._resources.PublicAccessObject:23 #: yadisk.objects._resources.PublicDefaultObject:15 #: yadisk.types.PublicSettingsAccess:18 msgid "" "`read_with_password_without_download`: read access with password and " "without download" msgstr "" "`read_with_password_without_download`: просмотр с доступом по паролю без " "возможности скачивания" #: of yadisk.objects._resources.PublicAvailableSettingsObject:1 msgid "Public settings of a shared resource for the current OAuth token owner." msgstr "Cписок настроек доступа к ресурсу для владельца OAuth-токена" #: of yadisk.objects._resources.PublicAvailableSettingsObject:3 msgid "`List[str]`, list of available permissions" msgstr "`List[str]`, список доступных разрешений" #: of yadisk.objects._resources.PublicAvailableSettingsObject:4 #: yadisk.objects._resources.PublicAvailableSettingsObject:11 msgid "" "`str`, specifies who has access to the shared resource, must be one of " "the following: - `all`: access for all users - `inner`: access for all " "employees" msgstr "" "`str`, определяет кто имеет доступ к общему ресурсу, значение должно быть" " одним из следующих: - `all`: доступ для всех пользователей - `inner`: " "доступ для всех сотрудников" #: of yadisk.objects._resources.PublicAvailableSettingsObject:4 #: yadisk.objects._resources.PublicAvailableSettingsObject:11 msgid "" "`str`, specifies who has access to the shared resource, must be one of " "the following:" msgstr "" "`str`, определяет кто имеет доступ к общему ресурсу, значение должно быть" " одним из следующих:" #: of yadisk.objects._resources.PublicAvailableSettingsObject:7 #: yadisk.objects._resources.PublicAvailableSettingsObject:14 msgid "`all`: access for all users" msgstr "`all`: доступ для всех пользователей" #: of yadisk.objects._resources.PublicAvailableSettingsObject:8 #: yadisk.objects._resources.PublicAvailableSettingsObject:15 msgid "`inner`: access for all employees" msgstr "`inner`: доступ для всех сотрудников" #: of yadisk.objects._resources.PublicAvailableSettingsObject:10 msgid "`bool`, whether the resource can be shared" msgstr "" "`bool`, признак возможности предоставлять персональный доступ на " "опубликованный ресурс." #: of yadisk.objects._resources.PublicAvailableSettingsObject:17 msgid "`List[PublicDefault]`, default public settings" msgstr "`List[PublicDefault]`, настройки доступа по умолчанию" #: of yadisk.objects._resources.PublicResourceObject:1 #: yadisk.objects._resources.TrashResourceObject:1 msgid "Bases: :py:class:`~yadisk.objects._resources.ResourceObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._resources.ResourceObject`" #: of yadisk.objects._resources.PublicResourceObject:12 msgid ":any:`PublicResourceObject`, list of nested resources" msgstr ":any:`PublicResourceObject`, список вложенных ресурсов" #: of yadisk.objects._resources.PublicResourcesListObject:6 msgid "`list`, list of public resources (:any:`PublicResourceObject`)" msgstr "`list`, список публичных ресурсов (:any:`PublicResourceObject`)" #: of yadisk.objects._resources.PublicSettingsObject:1 msgid "Public settings of a shared resource." msgstr "Настройки доступа к общему ресурсу." #: of yadisk.objects._resources.PublicSettingsObject:3 #: yadisk.types.PublicSettings:5 msgid "`int`, timestamp indicating the expiration date of the link" msgstr "`int`, timestamp даты истечения ссылки" #: of yadisk.objects._resources.PublicSettingsObject:4 #: yadisk.types.PublicSettings:6 msgid "`bool`, whether the resource is read-only" msgstr "`bool`, признак того, что ссылка доступна только на чтение" #: of yadisk.objects._resources.PublicSettingsObject:5 msgid "" ":any:`AvailableUntilVerboseObject`, verbose information about the " "expiration date" msgstr "" ":any:`AvailableUntilVerboseObject`, развёрнутая информация о дате " "истечения доступа" #: of yadisk.objects._resources.PublicSettingsObject:6 #: yadisk.types.PasswordVerbose:4 yadisk.types.PublicSettings:8 msgid "`str`, password to access the resource" msgstr "`str`, пароль для доступа к ресурсу" #: of yadisk.objects._resources.PublicSettingsObject:7 msgid ":any:`PasswordVerboseObject`, verbose information about the password" msgstr ":any:`PasswordVerboseObject`, развёрнутая информация о пароле" #: of yadisk.objects._resources.PublicSettingsObject:9 msgid "" ":any:`ExternalOrganizationIdVerboseObject`, verbose information about the" " external organization ID" msgstr "" ":any:`ExternalOrganizationIdVerboseObject`, развёрнутая информация о " "идентификаторе внешней организации" #: of yadisk.objects._resources.PublicSettingsObject:11 msgid "`List[PublicSettingsAccessObject]`, list of access settings" msgstr "`List[PublicSettingsAccessObject]`, список настроек доступа" #: of yadisk.objects._resources.ResourceDownloadLinkObject:1 msgid "Resource download link." msgstr "Ссылка для скачивания ресурса." #: of yadisk.objects._resources.ResourceObject:12 msgid ":any:`ResourceListObject`, list of nested resources" msgstr ":any:`ResourceListObject`, список вложенных ресурсов" #: of yadisk.objects._resources.ResourceUploadLinkObject:1 msgid "Resource upload link." msgstr "Ссылка для загрузки файла." #: of yadisk.objects._resources.ResourceUploadLinkObject:6 msgid "`str`, ID of the upload operation" msgstr "`str`, идентификатор операции по загрузке файла" #: of yadisk.objects._resources.ShareInfoObject:1 msgid "Shared folder information object." msgstr "Объект информации об общей папке." #: of yadisk.objects._resources.ShareInfoObject:6 msgid "`bool`, tells whether the folder is root" msgstr "`bool`, признак того, что папка является корневой" #: of yadisk.objects._resources.ShareInfoObject:7 msgid "`bool`, tells whether the user is the owner of this directory" msgstr "`bool`, признак того, что пользователь является владельцем этой папки" #: of yadisk.objects._resources.ShareInfoObject:8 msgid "`str`, access rights" msgstr "`str`, права доступа" #: of yadisk.objects._operations.SyncOperationLinkObject:4 #: yadisk.objects._resources.SyncFilesResourceListObject:4 #: yadisk.objects._resources.SyncLastUploadedResourceListObject:4 #: yadisk.objects._resources.SyncPublicResourceLinkObject:4 #: yadisk.objects._resources.SyncPublicResourceListObject:4 #: yadisk.objects._resources.SyncPublicResourceObject:4 #: yadisk.objects._resources.SyncPublicResourcesListObject:4 #: yadisk.objects._resources.SyncResourceLinkObject:4 #: yadisk.objects._resources.SyncResourceListObject:4 #: yadisk.objects._resources.SyncResourceObject:4 #: yadisk.objects._resources.SyncTrashResourceListObject:4 #: yadisk.objects._resources.SyncTrashResourceObject:4 msgid ":any:`Client` or `None`, `YaDisk` object" msgstr ":any:`Client` или `None`, объект `YaDisk`" #: of yadisk.objects._resources.SyncFilesResourceListObject:6 msgid "`list`, flat list of files (:any:`SyncResourceObject`)" msgstr "`list`, плоский список файлов (:any:`SyncResourceObject`)" #: of yadisk.objects._resources.SyncLastUploadedResourceListObject:6 #: yadisk.objects._resources.SyncPublicResourceListObject:7 #: yadisk.objects._resources.SyncResourceListObject:7 msgid "`list`, list of resources (:any:`SyncResourceObject`)" msgstr "`list`, список ресурсов (:any:`SyncResourceObject`)" #: of yadisk._client.Client.wait_for_operation:1 #: yadisk.objects._operations.SyncOperationLinkObject.wait:1 msgid "" "Wait until an operation is completed. If the operation fails, an " "exception is raised. Waiting is performed by calling :any:`time.sleep`." msgstr "" "Ждёт, пока операция не будет выполнена. Если операция не удалась, " "вызывает исключение. Ожидание осуществляется с помощью вызова " ":any:`time.sleep`." #: of yadisk.objects._resources.SyncPublicResourceLinkObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.PublicResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" #: of yadisk.objects._resources.SyncPublicResourceObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.PublicResourceObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.PublicResourceObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" #: of yadisk.objects._resources.SyncPublicResourceObject:12 msgid ":any:`SyncPublicResourceObject`, list of nested resources" msgstr ":any:`SyncPublicResourceObject`, список вложенных ресурсов" #: of yadisk.objects._resources.SyncPublicResourcesListObject:6 msgid "`list`, list of public resources (:any:`SyncPublicResourceObject`)" msgstr "`list`, список публичных ресурсов (:any:`SyncPublicResourceObject`)" #: of yadisk.objects._resources.SyncResourceLinkObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.ResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" msgstr "" "Базовые классы: " ":py:class:`~yadisk.objects._resources.ResourceLinkObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" #: of yadisk.objects._resources.SyncResourceObject:1 msgid "" "Bases: :py:class:`~yadisk.objects._resources.ResourceObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" msgstr "" "Базовые классы: :py:class:`~yadisk.objects._resources.ResourceObject`, " ":py:class:`~yadisk.objects._resources.ResourceObjectMethodsMixin`" #: of yadisk.objects._resources.SyncResourceObject:12 msgid ":any:`SyncResourceListObject`, list of nested resources" msgstr ":any:`SyncResourceListObject`, список вложенных ресурсов" #: of yadisk.objects._resources.SyncTrashResourceListObject:7 msgid "`list`, list of resources (:any:`SyncTrashResourceObject`)" msgstr "`list`, список ресурсов (:any:`SyncTrashResourceObject`)" #: of yadisk.objects._resources.SyncTrashResourceObject:12 msgid ":any:`SyncTrashResourceListObject`, list of nested resources" msgstr ":any:`SyncTrashResourceListObject`, список вложенных ресурсов" #: of yadisk._client.Client.get_trash_meta:28 #: yadisk.objects._resources.SyncTrashResourceObject.get_meta:23 msgid ":any:`SyncTrashResourceObject`" msgstr ":any:`SyncTrashResourceObject`" #: of yadisk._client.Client.trash_listdir:24 #: yadisk.objects._resources.SyncTrashResourceObject.listdir:24 msgid "generator of :any:`SyncTrashResourceObject`" msgstr "генератор :any:`SyncTrashResourceObject`" #: of yadisk._client.Client.remove:38 yadisk._client.Client.remove_trash:34 #: yadisk.objects._resources.SyncTrashResourceObject.remove:29 msgid "" ":any:`SyncOperationLinkObject` if the operation is performed " "asynchronously, `None` otherwise" msgstr "" ":any:`SyncOperationLinkObject`, если операция выполняется асинхронно, " "иначе `None`" #: of yadisk._client.Client.copy:42 yadisk._client.Client.move:37 #: yadisk._client.Client.rename:34 yadisk._client.Client.restore_trash:38 #: yadisk._client.Client.save_to_disk:41 #: yadisk.objects._resources.SyncTrashResourceObject.restore:38 msgid ":any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject`" msgstr ":any:`SyncResourceLinkObject` или :any:`SyncOperationLinkObject`" #: of yadisk.objects._disk.SystemFoldersObject:1 msgid "Object, containing paths to system folders." msgstr "Объект, содержащий пути к системным папкам." #: of yadisk.objects._disk.SystemFoldersObject:6 msgid "`str`, path to the Odnoklassniki folder" msgstr "`str`, путь к папке Одноклассников" #: of yadisk.objects._disk.SystemFoldersObject:7 msgid "`str`, path to the Google+ folder" msgstr "`str`, путь к папке Google+" #: of yadisk.objects._disk.SystemFoldersObject:8 msgid "`str`, path to the Instagram folder" msgstr "`str`, путь к папке Instagram" #: of yadisk.objects._disk.SystemFoldersObject:9 msgid "`str`, path to the VKontakte folder" msgstr "`str`, путь к папке ВКонтакте" #: of yadisk.objects._disk.SystemFoldersObject:10 msgid "`str`, path to the mail attachments folder" msgstr "`str`, путь к папке \"Почтовые вложения\"" #: of yadisk.objects._disk.SystemFoldersObject:11 msgid "`str`, path to the My World folder" msgstr "`str`, путь к папке Моего Мира" #: of yadisk.objects._disk.SystemFoldersObject:12 msgid "`str`, path to the Downloads folder" msgstr "`str`, путь к папке \"Загрузки\"" #: of yadisk.objects._disk.SystemFoldersObject:13 msgid "`str` path to the Applications folder" msgstr "`str`, путь к папке \"Приложения\"" #: of yadisk.objects._disk.SystemFoldersObject:14 msgid "`str`, path to the Facebook folder" msgstr "`str`, путь к папке Facebook" #: of yadisk.objects._disk.SystemFoldersObject:15 msgid "`str`, path to the social networks folder" msgstr "`str`, путь к папке социальных сетей" #: of yadisk.objects._disk.SystemFoldersObject:16 msgid "`str`, path to the Messenger Files folder" msgstr "`str`, путь к папке \"Файлы Мессенджера\"" #: of yadisk.objects._disk.SystemFoldersObject:17 msgid "`str`, path to the Meeting Materials folder" msgstr "`str`, путь к папке \"Материалы встреч\"" #: of yadisk.objects._disk.SystemFoldersObject:18 msgid "`str`, path to the camera folder" msgstr "`str`, путь к папке фотокамеры" #: of yadisk.objects._disk.SystemFoldersObject:19 msgid "`str`, path to the screenshot folder" msgstr "`str`, путь к папке скриншотов" #: of yadisk.objects._disk.SystemFoldersObject:20 msgid "`str`, path to the Scans folder" msgstr "`str`, путь к папке \"Сканы\"" #: of yadisk.objects._auth.TokenObject:1 msgid "Token object." msgstr "Объект токена." #: of yadisk.objects._auth.TokenObject:6 msgid "`str`, token string" msgstr "`str`, строка токена" #: of yadisk.objects._auth.TokenObject:7 msgid "`str`, the refresh-token" msgstr "`str`, refresh-токен" #: of yadisk.objects._auth.TokenObject:8 msgid "`str`, type of the token" msgstr "`str`, тип токена" #: of yadisk.objects._auth.TokenObject:9 msgid "`int`, amount of time before the token expires" msgstr "`int`, количество времени, на которое выдаётся токен" #: of yadisk.objects._auth.TokenObject:10 msgid "" "`str`, list of rights requested by the application, returned only if the " "token has a smaller set of rights than requested" msgstr "" "`str`, список прав, запрашиваемых приложением, возвращается только если " "токен обладает меньшим набором прав, чем было запрошено" #: of yadisk.objects._auth.TokenRevokeStatusObject:1 msgid "Result of token revocation request." msgstr "Результат запроса по отзыву токена." #: of yadisk.objects._resources.TrashResourceListObject:7 msgid "`list`, list of resources (:any:`TrashResourceObject`)" msgstr "`list`, список ресурсов (:any:`TrashResourceObject`)" #: of yadisk.objects._resources.TrashResourceObject:12 msgid ":any:`TrashResourceListObject`, list of nested resources" msgstr ":any:`ResourceListObject`, список вложенных ресурсов" #: of yadisk.objects._disk.UserObject:1 msgid "User object." msgstr "Объект пользователя." #: of yadisk.objects._disk.UserObject:7 #: yadisk.objects._disk.UserPublicInfoObject:8 msgid "`str`, user's display name" msgstr "`str`, отображаемое имя пользователя" #: of yadisk.objects._disk.UserObject:8 #: yadisk.objects._disk.UserPublicInfoObject:9 msgid "`str`, user's UID" msgstr "`str`, уникальный идентификатор пользователя" #: of yadisk.objects._disk.UserObject:9 msgid "`str`, user's country" msgstr "`str`, страна пользователя" #: of yadisk.objects._disk.UserObject:10 msgid "`bool`, tells whether it's a child account" msgstr "`bool`, признак того, что аккаунт является детским" #: of yadisk.objects._disk.UserObject:11 #: yadisk.objects._disk.UserPublicInfoObject:7 msgid "`str`, user's login" msgstr "`str`, логин пользователя" #: of yadisk.objects._disk.UserPublicInfoObject:1 msgid "Bases: :py:class:`~yadisk.objects._disk.UserObject`" msgstr "Базовые классы: :py:class:`~yadisk.objects._disk.UserObject`" #: of yadisk.objects._disk.UserPublicInfoObject:1 msgid "" "Public user information object. Inherits from :any:`UserObject` for " "compatibility." msgstr "" "Публичная информация о пользователе. Наследуется от :any:`UserObject` для" " совместимости." #: of yadisk.objects._yadisk_object.YaDiskObject:1 msgid "Bases: :py:class:`object`" msgstr "Базовые классы: :py:class:`object`" #: of yadisk.objects._yadisk_object.YaDiskObject:1 msgid "" "Base class for all objects mirroring the ones returned by Yandex.Disk " "REST API. It must have a fixed number of fields, each field must have a " "type. It also supports subscripting and access of fields through the . " "operator." msgstr "" "Базовый класс для всех объектов, реализующий объекты, возвращаемые REST " "API Яндекс.Диска. У наследующего объекта фиксированное количество полей, " "каждое со своим типом. Поддерживает доступ по индексу и через точку." #: of yadisk.objects._yadisk_object.YaDiskObject.__matmul__:1 msgid "" "The :code:`@` operator. Same as :any:`YaDiskObject.field()`. Can be used " "like this:" msgstr "" "Оператор :code:`@`. Делает то же самое, что " ":any:`YaDiskObject.field()`.Может быть использован следующим образом:" #: of yadisk.objects._yadisk_object.YaDiskObject.__matmul__:10 #: yadisk.objects._yadisk_object.YaDiskObject.field:4 msgid "`str`, name of the field" msgstr "`str`, имя поля" #: of yadisk.objects._yadisk_object.YaDiskObject.__matmul__:12 #: yadisk.objects._yadisk_object.YaDiskObject.field:6 msgid "value of the given field is :code:`None`" msgstr "значение требуемого поля - :code:`None`" #: of yadisk.objects._yadisk_object.YaDiskObject.__matmul__:14 #: yadisk.objects._yadisk_object.YaDiskObject.field:8 msgid "field's value" msgstr "значение поля" #: of yadisk.objects._yadisk_object.YaDiskObject.field:1 msgid "" "Get value of field `name`, guarantee it's not :code:`None` or raise a " ":any:`ValueError`." msgstr "" "Получает значение поля `name`, гарантируя, что оно не :code:`None` или " "вызывает :any:`ValueError` в противном случае" #: of yadisk.objects._yadisk_object.YaDiskObject.import_fields:1 msgid "" "Set all the fields of the object to the values in `source_dict`. All the " "other fields are ignored" msgstr "" "Задаёт значения всех полей объекта из `source_dict`. Все остальные ключи " "игнорируются." #: of yadisk.objects._yadisk_object.YaDiskObject.import_fields:4 msgid "`dict` or `None` (nothing will be done in that case)" msgstr "`dict` или `None` (тогда ничего не будет сделано)" #: of yadisk.objects._yadisk_object.YaDiskObject.remove_alias:1 msgid "Remove an alias." msgstr "Удаляет псевдоним." #: of yadisk.objects._yadisk_object.YaDiskObject.remove_field:1 msgid "Remove field." msgstr "Удаляет поле." #: of yadisk.objects._yadisk_object.YaDiskObject.set_alias:1 msgid "Set an alias." msgstr "Задаёт псевдоним." #: of yadisk.objects._yadisk_object.YaDiskObject.set_alias:3 msgid "`str`, alias to add" msgstr "`str`, псевдоним" #: of yadisk.objects._yadisk_object.YaDiskObject.set_alias:4 msgid "`str`, field name" msgstr "`str`, имя поля" #: of yadisk.objects._yadisk_object.YaDiskObject.set_field_type:1 msgid "Set field type." msgstr "Задаёт тип поля." #: of yadisk.objects._yadisk_object.YaDiskObject.set_field_type:4 msgid "type or factory" msgstr "тип данных или factory" #: of yadisk.objects._yadisk_object.YaDiskObject.set_field_types:1 msgid "Set the field types of the object" msgstr "Задаёт типы полей объекта" #: of yadisk.objects._yadisk_object.YaDiskObject.set_field_types:3 msgid "`dict`, where keys are the field names and values are types (or factories)" msgstr "`dict`, где ключи - это наименования полей, а значения - это типы" #: ../../api_reference/session_interface.rst:2 msgid "Session Interface" msgstr "Интерфейс Session" #: ../../api_reference/session_interface.rst:4 msgid "" "The :any:`Session` and :any:`AsyncSession` are abstract classes that act " "as adapters to underlying HTTP client libraries. A session instance is " "used by :any:`Client` or :any:`AsyncClient` to perform all the HTTP " "requests to the Yandex.Disk API." msgstr "" ":any:`Session` и :any:`AsyncSession` - абстрактные классы, которые " "работают в качестве адаптеров для нижележащих HTTP библиотек. Экземпляр " "сессии используется в :any:`Client` или :any:`AsyncSession` для " "выполнения всех HTTP запросов к API Яндекс.Диска." #: ../../api_reference/session_interface.rst:8 msgid "" "These interfaces can be implemented to add support for any HTTP library. " "For a concrete example, see the source code of any existing " "implementation (e.g. :any:`HTTPXSession`)." msgstr "" "Эти интерфейсы могут быть реализованы, чтобы добавить поддержку любой " "HTTP библиотеки. Для конкретного примера см. исходный код любой из " "существующих реализаций (например, :any:`HTTPXSession`)." #: ../../api_reference/session_interface.rst:13 msgid "Synchronous" msgstr "Синхронный" #: of yadisk._async_session.AsyncSession:1 yadisk._session.Session:1 msgid "" "HTTP session class. Maintains open connections, stores headers and some " "other request parameters." msgstr "" "Класс HTTP сессии. Поддерживает открытые соединения, хранит заданные " "заголовки и некоторые другие параметры запросов." #: of yadisk._async_session.AsyncSession:4 yadisk._session.Session:4 msgid "Must be explicitly closed (can be done using the `with` statement)." msgstr "" "Должен быть явным образом закрыт (может быть сделано с помощью " "конструкции `with`)." #: of yadisk._async_session.AsyncSession.close:1 #: yadisk._session.Session.close:1 msgid "Closes the session." msgstr "Закрывает сессию." #: of yadisk._async_session.AsyncResponse.close:4 #: yadisk._async_session.AsyncResponse.download:4 #: yadisk._async_session.AsyncResponse.json:4 #: yadisk._async_session.AsyncSession.close:4 #: yadisk._async_session.AsyncSession.send_request:8 #: yadisk._session.Response.close:4 yadisk._session.Response.download:4 #: yadisk._session.Response.json:4 yadisk._session.Session.close:4 #: yadisk._session.Session.send_request:8 msgid "This is an abstract method that needs to be implemented." msgstr "Это абстрактный метод, который необходимо реализовать." #: of yadisk._async_session.AsyncSession.send_request:1 #: yadisk._session.Session.send_request:1 msgid "" "Sends an HTTP request with given parameters. In case an error occurs, the" " method should throw one of exceptions derived from :any:`YaDiskError`. " "Additional keyword arguments may be passed, they may be forwarded to the " "underlying HTTP client without modification." msgstr "" "Отправляет HTTP запрос с указанными параметрами. В случае ошибки, метод " "должен вызвать одно из исключений, основанных на :any:`YaDiskError`. " "Могут быть указаны дополнительные keyword-аргументы, они могут быть " "напрямую переданы в нижележащий HTTP клиент без изменений." #: of yadisk._async_session.AsyncSession.send_request:11 #: yadisk._session.Session.send_request:11 msgid "`str`, URL" msgstr "`str`, URL" #: of yadisk._async_session.AsyncSession.send_request:12 #: yadisk._session.Session.send_request:12 msgid "`dict`, GET parameters" msgstr "`dict`, GET параметры" #: of yadisk._session.Session.send_request:13 msgid "" "`bytes`, an iterator or a file-like object, data to be sent in the " "request body" msgstr "" "`bytes`, итератор или файл-подобный объект, данные, которые будут " "отправлены в теле запроса" #: of yadisk._async_session.AsyncSession.send_request:15 #: yadisk._session.Session.send_request:14 msgid "`dict`, additional headers to be set" msgstr "`dict`, дополнительные заголовки" #: of yadisk._async_session.AsyncSession.send_request:16 #: yadisk._session.Session.send_request:15 msgid "" "request timeout, a `tuple` of `(read timeout, connect timeout)`, `float` " "or `None` (no timeout)" msgstr "" "таймаут запроса, `tuple` вида `(read timeout, connect timeout)`, `float` " "или `None` (без таймаута)" #: of yadisk._async_session.AsyncSession.send_request:18 #: yadisk._session.Session.send_request:17 msgid "`bool`, if `False`, the response content will be immediately downloaded" msgstr "`bool`, если `False`, содержимое ответа будет сразу целиком скачано" #: of yadisk._async_session.AsyncSession.send_request:20 #: yadisk._session.Session.send_request:19 msgid ":any:`Response`, response object" msgstr ":any:`Response`, объект ответа" #: of yadisk._async_session.AsyncResponse:1 yadisk._session.Response:1 msgid "Represents an HTTP response." msgstr "Представляет собой ответ HTTP." #: of yadisk._async_session.AsyncResponse:3 yadisk._session.Response:3 msgid "" "In case an error occurs, methods of this class should throw one of " "exceptions derived from :any:`YaDiskError`." msgstr "" "В случае, если возникает ошибка, методы данного классы должны вызвать " "одно из исключений, основанных на :any:`YaDiskError`." #: of yadisk._async_session.AsyncResponse:6 yadisk._session.Response:6 msgid "`int`, HTTP status code" msgstr "`int`, HTTP код статуса" #: of yadisk._session.Response.close:1 msgid "Closes the response and releases the underlying connection into the pool" msgstr "Закрывает ответ и освобождает лежащее в основе соединение в пул" #: of yadisk._async_session.AsyncResponse.download:1 #: yadisk._session.Response.download:1 msgid "Downloads response's content." msgstr "Скачивает содержимое ответа." #: of yadisk._session.Response.download:6 msgid "" "function, takes one parameter - chunk of data (bytes), consumes the chunk" " (e.g. by writing to a file)" msgstr "" "функция, принимает 1 параметр - фрагмент данных (bytes), потребляет этот " "фрагмент (например, записывает его в файл)" #: of yadisk._async_session.AsyncResponse.download:10 #: yadisk._async_session.AsyncResponse.json:6 #: yadisk._session.Response.download:9 yadisk._session.Response.json:6 msgid "could not receive the response's body" msgstr "не удалось получить тело ответа" #: of yadisk._async_session.AsyncResponse.get_exception:1 #: yadisk._session.Response.get_exception:1 msgid "Convenience wrapper for :any:`yadisk.utils.get_exception`." msgstr "Обёртка над :any:`yadisk.utils.get_exception` для удобства." #: of yadisk._async_session.AsyncResponse.get_exception:3 #: yadisk._session.Response.get_exception:3 msgid ":any:`YaDiskError`" msgstr ":any:`YaDiskError`" #: of yadisk._async_session.AsyncResponse.json:1 #: yadisk._session.Response.json:1 msgid "Returns JSON-content of the response (parses JSON)." msgstr "Возвращает JSON, содержащийся в ответе (парсит JSON)." #: of yadisk._async_session.AsyncResponse.json:7 #: yadisk._session.Response.json:7 msgid "could not parse JSON" msgstr "не удалось обработать JSON" #: of yadisk._async_session.AsyncResponse.json:9 #: yadisk._session.Response.json:9 msgid "`dict`, `list`, `str`, `int`, `float` or `None`" msgstr "`dict`, `list`, `str`, `int`, `float` или `None`" #: ../../api_reference/session_interface.rst:22 msgid "Asynchronous" msgstr "Асинхронный" #: of yadisk._async_session.AsyncSession.send_request:13 msgid "" "`bytes`, iterator (possibly async) or a file-like object (possible " "async), data to be sent in the request body" msgstr "" "`bytes`, итератор (возможно асинхронный) или файл-подобный объект " "(возможно асинхронный), данные, которые будут отправлены в теле запроса" #: of yadisk._async_session.AsyncResponse.close:1 msgid "Closes the response and releases the underlying connection into the pool." msgstr "Закрывает запрос и освобождает лежащее в основе соединение в пул." #: of yadisk._async_session.AsyncResponse.download:6 msgid "" "regular or async function, takes one parameter - chunk of data (bytes), " "consumes the chunk (e.g. by writing to a file)" msgstr "" "обычная или асинхронная функция, принимает 1 параметр - фрагмент данных " "(bytes), потребляет этот фрагмент данных (например, записывает его в " "файл)" #: ../../api_reference/sessions.rst:2 msgid "Available Session Implementations" msgstr "Доступные реализации сессий" #: ../../api_reference/sessions.rst:4 msgid "" "You can choose which HTTP library will be used by :any:`Client` and " ":any:`AsyncClient` by specifying the :code:`session` parameter. Below you" " can see the list of session implementations that are shipped with the " ":code:`yadisk` library." msgstr "" "Вы можете выбрать, какая HTTP библиотека будет использоваться в " ":any:`Client` и :any:`AsyncClient`, указав параметр :code:`session`. Ниже" " вы можете найти список реализаций сессий, поставляемых вместе с " "библиотекой." #: ../../api_reference/sessions.rst:8 msgid "" "Alternatively, you can make your own :any:`Session`/:any:`AsyncSession` " "implementation. For a concrete example, take a look at the source code of" " any existing implementations (e.g. :any:`HTTPXSession`)." msgstr "" "Вы также можете сделать собственную реализацию " ":any:`Session`/:any:`AsyncSession`. Для конкретного примера, см. исходный" " код любой из существующих реализаций (например, :any:`HTTPXSession`)." #: ../../api_reference/sessions.rst:12 msgid "Synchronous Implementations" msgstr "Синхронные реализации" #: of yadisk.sessions.httpx_session.HTTPXSession:1 #: yadisk.sessions.pycurl_session.PycURLSession:1 #: yadisk.sessions.requests_session.RequestsSession:1 msgid "Bases: :py:class:`~yadisk._session.Session`" msgstr "Базовые классы: :py:class:`~yadisk._session.Session`" #: of yadisk.sessions.requests_session.RequestsSession:3 msgid ":any:`Session` implementation using the `requests`_ library." msgstr "Реализация :any:`Session` с помощью библиотеки `requests`_." #: of yadisk.sessions.requests_session.RequestsSession:5 msgid "" "All arguments passed in the constructor are directly forwared to " ":any:`requests.Session`." msgstr "" "Все аргументы, переданные конструкторе напрямую передаются в " ":any:`requests.Session`." #: of yadisk.sessions.requests_session.RequestsSession:7 msgid "underlying instance of :any:`requests.Session`" msgstr "лежащий в основе объект :any:`requests.Session`" #: of yadisk.sessions.requests_session.RequestsSession:10 msgid "" "Internally, this class creates thread-local instances of " ":any:`requests.Session`, since it is not currently guaranteed to be " "thread safe. Calling :any:`Session.close()` will close all thread-local " "sessions managed by this object." msgstr "" "Внутри данный класс создаёт локальные для потоков экземпляры " ":any:`requests.Session`, т.к. на данный момент нет гарантии их " "потокобезопасности. Вызов :any:`Session.close()` закрывает все сессии, " "управляемые данным объектом." #: of yadisk.sessions.requests_session.RequestsSession:16 msgid "" "To pass `requests`-specific arguments from :any:`Client` use " ":code:`requests_args` keyword argument." msgstr "" "Для того чтобы передать специфичные для `requests` аргументы из " ":any:`Client` используйте keyword-аргумент :code:`requests_args`." #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:11 #: yadisk.sessions.async_httpx_session.AsyncHTTPXSession:13 #: yadisk.sessions.httpx_session.HTTPXSession:13 #: yadisk.sessions.pycurl_session.PycURLSession:7 #: yadisk.sessions.requests_session.RequestsSession:18 msgid "Usage example:" msgstr "Пример использования:" #: of yadisk.sessions.httpx_session.HTTPXSession:3 msgid ":any:`Session` implementation using the `httpx`_ library." msgstr "Реализация :any:`Session` с помощью библиотеки `httpx`_." #: of yadisk.sessions.httpx_session.HTTPXSession:7 msgid "" "All arguments passed in the constructor are directly forwared to " "`httpx.Client`_." msgstr "" "Все аргументы, переданные конструкторе напрямую передаются в " "`httpx.Client`_." #: of yadisk.sessions.httpx_session.HTTPXSession:9 msgid "underlying instance of `httpx.Client`_" msgstr "лежащий в основе объект `httpx.Client`_" #: of yadisk.sessions.httpx_session.HTTPXSession:11 msgid "" "To pass `httpx`-specific arguments from :any:`Client` use " ":code:`httpx_args` keyword argument." msgstr "" "Для того чтобы передать специфичные для `httpx` аргументы из " ":any:`Client` используйте keyword-аргумент :code:`httpx_args`." #: of yadisk.sessions.pycurl_session.PycURLSession:3 msgid ":any:`Session` implementation using the `pycurl`_ library." msgstr "Реализация :any:`Session` с помощью библиотеки `pycurl`_." #: of yadisk.sessions.pycurl_session.PycURLSession:5 msgid "" "To pass `pycurl`-specific arguments from :any:`Client` use " ":code:`curl_options` keyword argument." msgstr "" "Для того чтобы передать специфичные для `pycurl` аргументы из " ":any:`Client` используйте keyword-аргумент :code:`curl_options`." #: ../../api_reference/sessions.rst:24 msgid "Asynchronous Implementations" msgstr "Асинхронные реализации" #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:1 #: yadisk.sessions.async_httpx_session.AsyncHTTPXSession:1 msgid "Bases: :py:class:`~yadisk._async_session.AsyncSession`" msgstr "Базовые классы: :py:class:`~yadisk._async_session.AsyncSession`" #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:3 msgid ":any:`AsyncSession` implementation using the `aiohttp`_ library." msgstr "Реализация :any:`AsyncSession` с помощью библиотеки `aiohttp`_." #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:5 msgid "" "All arguments passed in the constructor are directly forwared to " ":any:`aiohttp.ClientSession`." msgstr "" "Все аргументы, переданные конструкторе напрямую передаются в " ":any:`aiohttp.ClientSession`." #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:7 msgid "underlying instance of :any:`aiohttp.ClientSession`" msgstr "лежащий в основе объект :any:`aiohttp.ClientSession`" #: of yadisk.sessions.aiohttp_session.AIOHTTPSession:9 msgid "" "To pass `aiohttp`-specific arguments from :any:`AsyncClient` use " ":code:`aiohttp_args` keyword argument." msgstr "" "Для того чтобы передать специфичные для `aiohttp` аргументы из " ":any:`Client` используйте keyword-аргумент :code:`aiohttp_args`." #: of yadisk.sessions.async_httpx_session.AsyncHTTPXSession:3 msgid ":any:`AsyncSession` implementation using the `httpx`_ library." msgstr "Реализация :any:`AsyncSession` с помощью библиотеки `httpx`_." #: of yadisk.sessions.async_httpx_session.AsyncHTTPXSession:7 msgid "" "All arguments passed in the constructor are directly forwared to " "`httpx.AsyncClient`_." msgstr "" "Все аргументы, переданные конструкторе напрямую передаются в " "`httpx.AsyncClient`_." #: of yadisk.sessions.async_httpx_session.AsyncHTTPXSession:9 msgid "underlying instance of `httpx.AsyncClient`_" msgstr "лежащий в основе объект `httpx.AsyncClient`_" #: of yadisk.sessions.async_httpx_session.AsyncHTTPXSession:11 msgid "" "To pass `httpx`-specific arguments from :any:`AsyncClient` use " ":code:`httpx_args` keyword argument." msgstr "" "Для того чтобы передать специфичные для `httpx` аргументы из " ":any:`AsyncClient` используйте keyword-аргумент :code:`httpx_args`." #: ../../api_reference/sessions.rst:33 msgid "Importing Session Classes" msgstr "Импортирование классов сессий" #: ../../api_reference/sessions.rst:35 msgid "You can use the following functions to import a session class by name:" msgstr "" "Вы можете использовать следующие функции, чтобы импортировать класс " "сессии по именsи:" #: of yadisk._import_session.import_session:1 msgid "Imports relevant session class based on provided name." msgstr "Импортирует релевантный класс сессии на основе указанного имени." #: of yadisk._import_session.import_async_session:5 #: yadisk._import_session.import_session:3 msgid "The following sessions are available:" msgstr "Доступны следующие сессии:" #: of yadisk._client.Client:31 yadisk._import_session.import_session:5 msgid ":code:`\"httpx\"` - :any:`HTTPXSession`" msgstr ":code:`\"httpx\"` - :any:`HTTPXSession`" #: of yadisk._client.Client:32 yadisk._import_session.import_session:6 msgid ":code:`\"pycurl\"` - :any:`PycURLSession`" msgstr ":code:`\"pycurl\"` - :any:`PycURLSession`" #: of yadisk._client.Client:33 yadisk._import_session.import_session:7 msgid ":code:`\"requests\"` - :any:`RequestsSession`" msgstr ":code:`\"requests\"` - :any:`RequestsSession`" #: of yadisk._import_session.import_async_session:3 #: yadisk._import_session.import_session:9 msgid "`str`, session name" msgstr "`str`, имя сессии" #: of yadisk._import_session.import_async_session:10 #: yadisk._import_session.import_session:11 msgid "could not import module" msgstr "не удалось импортировать модуль" #: of yadisk._import_session.import_async_session:11 #: yadisk._import_session.import_session:12 msgid "unknown name" msgstr "неизвестное имя" #: of yadisk._import_session.import_session:14 msgid "subclass of :any:`Session`" msgstr "класс, наследующийся от :any:`Session`" #: of yadisk._import_session.import_async_session:1 msgid "Imports relevant asynchronous session class based on provided name." msgstr "" "Импортирует релевантный класс асинхронной сессии на основе указанного " "имени." #: of yadisk._import_session.import_async_session:13 msgid "subclass of :any:`AsyncSession`" msgstr "класс, наследующийся от :any:`AsyncSession`" #: ../../api_reference/settings.rst:2 msgid "Settings" msgstr "Настройки" #: ../../api_reference/settings.rst:4 msgid "" "The following settings can be accessed and changed at runtime in " "`yadisk.settings` module:" msgstr "" "Следующие настройки в модуле `yadisk.settings` могут быть получены и " "изменены:" #: ../../docstring of yadisk.settings.BASE_API_URL:1 msgid "" "Base URL for Yandex.Disk's REST API. Can be overriden for testing and " "other purposes" msgstr "" "Базовый URL для REST API Яндекс.Диска. Может быть переопределён для " "тестирования и прочих целей" #: ../../docstring of yadisk.settings.BASE_OAUTH_API_URL:1 msgid "" "Base URL for Yandex.Disk's OAuth API. Can be overriden for testing and " "other purposes" msgstr "" "Базовый URL для OAuth API Яндекс.Диска. Может быть переопределён для " "тестирования и прочих целей" #: ../../docstring of yadisk.settings.DEFAULT_N_RETRIES:1 msgid "`int`, default number of retries" msgstr "`int`, число повторных попыток запроса по умолчанию" #: ../../docstring of yadisk.settings.DEFAULT_RETRY_INTERVAL:1 msgid "`float`, default retry interval" msgstr "`float`, стандартная задержка между повторными попытками" #: ../../docstring of yadisk.settings.DEFAULT_TIMEOUT:1 msgid "" "`tuple` of 2 numbers (`int` or `float`), default timeout for requests. " "First number is the connect timeout, the second one is the read timeout." msgstr "" "`tuple` из 2-х чисел (`int` или `float`), стандартный таймаут для " "запросов. Первое число - это таймаут соединения, второе - таймаут чтения." #: ../../docstring of yadisk.settings.DEFAULT_UPLOAD_RETRY_INTERVAL:1 msgid "" "Analogous to :any:`settings.DEFAULT_RETRY_INTERVAL` but for " ":any:`Client.upload()`/:any:`AsyncClient.upload()` function" msgstr "" "Аналогично :any:`settings.DEFAULT_RETRY_INTERVAL`, но для функции " ":any:`Client.upload()`/:any:`AsyncClient.upload()`" #: ../../docstring of yadisk.settings.DEFAULT_UPLOAD_TIMEOUT:1 msgid "" "Analogous to :any:`settings.DEFAULT_TIMEOUT` but for " ":any:`Client.upload()`/:any:`AsyncClient.upload()` function" msgstr "" "Аналогично :any:`settings.DEFAULT_TIMEOUT`, но для функции " ":any:`Client.upload()`/:any:`AsyncClient.upload()`" #: ../../docstring of yadisk.settings.logger:1 msgid "" "Logger for the library. Logs include information about requests to the " "API and automatic retry attempts." msgstr "" "Логгер библиотеки. Логи включают в себя информацию о запросах к API и " "автоматических повторных попытках." #: ../../api_reference/sync_api.rst:2 msgid "Synchronous API" msgstr "Синхронный API" #: of yadisk._client.Client:1 msgid "Implements access to Yandex.Disk REST API (provides synchronous API)." msgstr "Реализует доступ к REST API Яндекс.Диска (предоставляет синхронный API)." #: of yadisk._client.Client:3 msgid "" "HTTP client implementation can be specified using the :code:`session` " "parameter. :any:`RequestsSession` is used by default. For other options, " "see :doc:`/api_reference/sessions`." msgstr "" "Реализация HTTP-клиента может быть указана с помощью параметра `session`." " По умолчанию используется :any:`RequestsSession`. см. " ":doc:`/api_reference/sessions` для других списка других доступных " "вариантов." #: of yadisk._client.Client:7 msgid "" "Almost all methods of :any:`Client` (the ones that accept `**kwargs`) " "accept some additional arguments:" msgstr "" "Почти все методы :any:`Client` (те, которые принимают `**kwargs`) " "принимают некоторые дополнительные параметры:" #: of yadisk._client.Client:17 msgid "" "Additional parameters, specific to a given HTTP client library can also " "be passed, see documentation for specific :any:`Session` subclasses " "(:doc:`/api_reference/sessions`)." msgstr "" "Дополнительные параметры, относящиеся к конкретной HTTP библиотеке могут " "также быть переданы, см. документацию для конкретных подклассов " ":any:`Session` (:doc:`/api_reference/sessions`)." #: of yadisk._client.Client:26 msgid "" "`None`, `str` or an instance of :any:`Session`. If :code:`session` is a " "string, the appropriate session class will be imported, it must be one of" " the following values: * :code:`\"httpx\"` - :any:`HTTPXSession` * " ":code:`\"pycurl\"` - :any:`PycURLSession` * :code:`\"requests\"` - " ":any:`RequestsSession`" msgstr "" "`None`, `str` или объект :any:`Session`. Если :code:`session` - строка, " "то нужный класс будет автоматически импортирован, допустимые значения:" " * :code:`\"httpx\"` - :any:`HTTPXSession` * :code:`\"pycurl\"` - " ":any:`PycURLSession` * :code:`\"requests\"` - :any:`RequestsSession`" #: of yadisk._client.Client:26 msgid "" "`None`, `str` or an instance of :any:`Session`. If :code:`session` is a " "string, the appropriate session class will be imported, it must be one of" " the following values:" msgstr "" "`None`, `str` или объект :any:`Session`. Если :code:`session` - строка, " "то нужный класс будет автоматически импортирован, допустимые значения:" #: of yadisk._client.Client:35 msgid "" "`None` or a function that opens a file for reading or writing " "(:code:`open()` by default)" msgstr "" "`None` или функция, которая открывает файл для чтения или записи " "(:code:`open()` по умолчанию)" #: of yadisk._client.Client:37 msgid "" "kept for compatibility, callable that returns an instance of " ":any:`Session`" msgstr "оставлен для совместимости, функция, возвращающая объект :any:`Session`" #: of yadisk._client.Client:45 msgid "current session (:any:`Session` instance)" msgstr "текущая сессия (объект :any:`Session`)" #: of yadisk._client.Client:46 msgid "" "function that opens a file for reading or writing (:code:`open()` by " "default)" msgstr "" "функция, которая открывает файл для чтения или записи (:code:`open()` по " "умолчанию)" #: of yadisk._client.Client.close:4 msgid "This method can also be called implicitly by using the `with` statement." msgstr "Этот метод может также быть вызван неявно с помощью конструкции `with`." #: of yadisk._client.Client.get_device_code:1 msgid "" "This request is used for authorization using the Yandex OAuth page. In " "this case the user must enter the verification code (:code:`user_code`) " "in the browser on the Yandex OAuth page. After the user has entered the " "code on the OAuth page, the application can exchange the " ":code:`device_code` for the token using the " ":any:`Client.get_token_from_device_code()`." msgstr "" "Данный запрос используется для авторизации с помощью страницы Яндекс " "OAuth. В данном случае пользователь должен ввести код подтверждения " "(:code:`user_code`) в браузере на странице Яндекс OAuth. После того как " "пользователь ввёл код, приложение может обменять :code:`device_code` на " "токен с помощью метода :any:`Client.get_token_from_device_code()`." #: of yadisk._client.Client.get_device_code:21 msgid "invalid client ID" msgstr "неправильный идентификатор приложения" #: of yadisk._client.Client.get_token_from_device_code:1 msgid "" "Get a new token from a device code, previously obtained with " ":any:`Client.get_device_code()`." msgstr "" "Получает новый токен с помощью кода устройства (device_code), полученного" " с помощью :any:`Client.get_device_code()`" #: of yadisk._client.Client.get_token_from_device_code:3 msgid "device code, obtained from :any:`Client.get_device_code()`" msgstr "" "код устройства (device_code), полученный с помощью " ":any:`Client.get_device_code()`" #: of yadisk._client.Client.revoke_token:3 msgid "token to revoke" msgstr "токен, подлежащий отзыву" #: of yadisk._client.Client.get_meta:28 msgid ":any:`SyncResourceObject`" msgstr ":any:`SyncResourceObject`" #: of yadisk._client.Client.get_files:28 #: yadisk._client.Client.get_last_uploaded:25 yadisk._client.Client.listdir:24 msgid "generator of :any:`ResourceObject`" msgstr "генератор :any:`ResourceObject`" #: of yadisk._client.Client.upload:3 yadisk._client.Client.upload_by_link:3 msgid "" "path, file-like object to be uploaded or a function that returns an " "iterator (or generator)" msgstr "" "путь, файл-подобный объект, который нужно загрузить, или функция, которая" " возвращает итератор (или генератор)" #: of yadisk._client.Client.upload:28 msgid ":any:`SyncResourceLinkObject`, link to the destination resource" msgstr ":any:`SyncResourceLinkObject`, ссылка на загруженный ресурс" #: of yadisk._client.Client.get_upload_link_object:1 msgid "" "Get a link to upload the file using the PUT request. This is similar to " ":any:`Client.get_upload_link()`, except it returns an instance of " ":any:`ResourceUploadLinkObject` which also contains an asynchronous " "operation ID." msgstr "" "Получает ссылку для загрузки файла на диск при помощи PUT запроса. Этот " "метод аналогичен :any:`Client.get_upload_link()`, но возвращает объект " ":any:`ResourceUploadLinkObject`, который также содержит идентификатор " "асинхронной операции." #: of yadisk._client.Client.upload_url:38 msgid ":any:`SyncOperationLinkObject`, link to the asynchronous operation" msgstr ":any:`SyncOperationLinkObject`, ссылка на асинхронную операцию" #: of yadisk._client.Client.download:19 msgid ":any:`SyncResourceLinkObject`, link to the source resource" msgstr ":any:`SyncResourceLinkObject`, ссылка на исходный ресурс" #: of yadisk._client.Client.makedirs:21 yadisk._client.Client.mkdir:26 #: yadisk._client.Client.unpublish:24 msgid ":any:`SyncResourceLinkObject`" msgstr ":any:`SyncResourceLinkObject`" #: of yadisk._client.Client.patch:25 msgid ":any:`ResourceObject`" msgstr ":any:`ResourceObject`" #: of yadisk._client.Client.publish:27 msgid ":any:`SyncResourceLinkObject`, link to the resource" msgstr ":any:`SyncResourceLinkObject`, ссылка на ресурс" #: of yadisk._client.Client.download_public:3 #: yadisk._client.Client.get_public_download_link:3 #: yadisk._client.Client.get_public_meta:3 #: yadisk._client.Client.get_public_type:3 #: yadisk._client.Client.is_public_dir:3 yadisk._client.Client.is_public_file:3 #: yadisk._client.Client.public_exists:3 yadisk._client.Client.save_to_disk:5 msgid "public key or public URL of the public resource" msgstr "публичный ключ или URL к публичному ресурсу" #: of yadisk._client.Client.get_public_meta:31 msgid ":any:`SyncPublicResourceObject`" msgstr ":any:`SyncPublicResourceObject`" #: of yadisk._client.Client.is_public_dir:1 msgid "Check whether the public resource is a public directory." msgstr "Проверяет, является ли публичный ресурс публичной папкой." #: of yadisk._client.Client.is_public_file:1 msgid "Check whether the public resource is a public file." msgstr "Проверяет, является ли публичный ресурс публичным файлом." #: of yadisk._client.Client.download_public:20 msgid ":any:`SyncPublicResourceLinkObject`" msgstr ":any:`SyncPublicResourceLinkObject`" #: of yadisk._client.Client.get_public_resources:26 msgid ":any:`SyncPublicResourcesListObject`" msgstr ":any:`SyncPublicResourceObject`" #: of yadisk._client.Client.get_all_public_resources:27 msgid "generator of :any:`SyncPublicResourceObject`" msgstr "генератор :any:`SyncPublicResourceObject`" #: of yadisk._client.Client.restore_trash:4 msgid "path to the trash resource to be restored" msgstr "путь к восстанавливаему ресурсу" #: ../../api_reference/types.rst:2 msgid "Types" msgstr "Типы" #: ../../docstring of typing.Union:1 msgid ":any:`Client` or :any:`AsyncClient`" msgstr ":any:`Client` или :any:`AsyncClient`" #: ../../docstring of typing.Union:1 msgid ":any:`Response` or :any:`AsyncResponse`" msgstr ":any:`Response` или :any:`AsyncResponse`" #: ../../docstring of typing.Union:1 msgid "" "Callback function (may be asynchronous) that is invoked to consume the " "streamed HTTP response body" msgstr "" "Функция обратного вызова (может быть асинхронной), которая вызывается для" " \"потребления\" тела HTTP-запроса" #: of yadisk.types.AsyncFileLike:1 yadisk.types.BinaryAsyncFileLike:1 msgid "Bases: :py:class:`~typing.Protocol`" msgstr "Базовые классы: :py:class:`~typing.Protocol`" #: of yadisk.types.AsyncFileLike:1 msgid "" "This protocol describes the bare minimum set of required methods for an " "async file-like object (open in either binary or unicode mode)." msgstr "" "Данный протокол описывает минимальный набор методов для асинхронного " "файл-подобного объекта (открытого либо в бинарном или текстовом режиме)." #: of yadisk.types.AsyncFileLike.read:1 msgid "Reads `size` bytes or characters." msgstr "Считывает `size` байт или символов" #: of yadisk.types.AsyncFileLike.read:3 yadisk.types.BinaryAsyncFileLike.read:3 msgid "`int`, number of bytes/characters to read from the file" msgstr "`int`, число байт/символов, которые нужно считать" #: of yadisk.types.AsyncFileLike.read:4 yadisk.types.BinaryAsyncFileLike.read:4 msgid "data that was read from the file" msgstr "данные, которые были прочитаны из файла" #: of yadisk.types.AsyncFileLike.seek:1 yadisk.types.BinaryAsyncFileLike.seek:1 msgid "Performs a seek operation on a file." msgstr "Выполняет операцию seek над файлом" #: of yadisk.types.AsyncFileLike.seek:3 yadisk.types.BinaryAsyncFileLike.seek:3 msgid "`int`, position to seek to" msgstr "`int`, позиция" #: of yadisk.types.AsyncFileLike.seek:4 yadisk.types.BinaryAsyncFileLike.seek:4 msgid "" "`int`, 0 (seek absolute position), 1 (seek relative to current position) " "or 2 (seek to file's end)" msgstr "" "`int`, 0 (абсолютное позиционирование), 1 (относительное " "позиционирование) или 2 (позиционирование относительно конца файла)" #: of yadisk.types.AsyncFileLike.seek:7 yadisk.types.BinaryAsyncFileLike.seek:7 msgid "`int`, absolute position within the file after the seek operation" msgstr "`int`, абсолютная позиция внутри файла после операции seek" #: of yadisk.types.AsyncFileLike.tell:1 yadisk.types.BinaryAsyncFileLike.tell:1 msgid "Returns current position within the file." msgstr "Возвращает текущую позицию внутри файла" #: of yadisk.types.AsyncFileLike.tell:3 yadisk.types.BinaryAsyncFileLike.tell:3 msgid "`int`, current position within the file" msgstr "`int`, текущая позиция внутри файла" #: of yadisk.types.AsyncFileLike.write:1 #: yadisk.types.BinaryAsyncFileLike.write:1 msgid "Writes data (contained in `buffer`)." msgstr "Записывает данные (содержащейся в `buffer`)." #: of yadisk.types.AsyncFileLike.write:3 #: yadisk.types.BinaryAsyncFileLike.write:3 msgid "data to be written" msgstr "данные, которые нужно записать" #: of yadisk.types.AsyncFileLike.write:4 msgid "the number of written bytes/characters" msgstr "число записанных байт/символов" #: ../../docstring of typing.Union:1 msgid "This is used to specify a source file to upload (async variant)" msgstr "" "Используется для указания исходного файла для загрузки на сервер " "(асинхронный вариант)" #: ../../docstring of typing.Union:1 msgid "" "This is used to specify a destination file to download into (async " "variant)" msgstr "" "Используется для указания файла назначения, в который будут скачаны " "данные (асинхронный вариант)" #: ../../docstring of typing.Union:1 msgid "Function that is used for opening local files (async variant)" msgstr "" "Функция, которая используется для открытия локальных файлов (асинхронный " "вариант)" #: ../../docstring of typing.Union:1 msgid "Request payload - data to be uploaded (async variant)" msgstr "" "Полезная нагрузка запроса - данные, которые будут загружены на сервер " "(асинхронный вариант)" #: ../../docstring collections.abc.Callable:1 of msgid "Function that returns an instance of :any:`AsyncSession`" msgstr "Функция, возвращающая объект :any:`AsyncSession`" #: ../../docstring of typing.Union:1 msgid "Valid asynchronous session name (see :doc:`/api_reference/sessions`)" msgstr "Имя асинхронной сессии (см. :doc:`/api_reference/sessions`)" #: of yadisk.types.AvailableUntilVerbose:1 #: yadisk.types.ExternalOrganizationIdVerbose:1 yadisk.types.PasswordVerbose:1 #: yadisk.types.PublicSettings:1 yadisk.types.PublicSettingsAccess:1 msgid "Bases: :py:class:`~typing.TypedDict`" msgstr "Базовые классы: :py:class:`~typing.TypedDict`" #: of yadisk.types.AvailableUntilVerbose:4 msgid "`int`, timestamp indicating the expiration date" msgstr "`int`, timestamp даты истечения" #: of yadisk.types.BinaryAsyncFileLike:1 msgid "" "This protocol describes the bare minimum set of required methods for an " "async file-like object open in binary mode." msgstr "" "Данный протокол описывает минимальный набор методов для асинхронного " "файл-подобного объекта, открытого в бинарном режиме." #: of yadisk.types.BinaryAsyncFileLike.read:1 msgid "Reads `size` bytes." msgstr "Считывает `size` байт." #: of yadisk.types.BinaryAsyncFileLike.write:4 msgid "the number of written bytes" msgstr "число записанных байт" #: ../../docstring collections.abc.Callable:1 of msgid "" "Callback function that is invoked to consume the streamed HTTP response " "body" msgstr "" "Функция обратного вызова, которая вызывается для \"потребления\" тела " "HTTP-запроса" #: ../../docstring of typing.Union:1 msgid "File mode for :any:`OpenFileCallback` and :any:`AsyncOpenFileCallback`" msgstr "" "Режим открытия файла для :any:`OpenFileCallback` и " ":any:`AsyncOpenFileCallback`" #: ../../docstring of typing.Union:1 msgid "This is used to specify a source file to upload" msgstr "Используется для указания исходного файла для загрузки на сервер" #: ../../docstring of typing.Union:1 msgid "This is used to specify a destination file to download into" msgstr "Используется для указания файла назначения, в который будут скачаны данные" #: ../../docstring of typing.Union:1 msgid "HTTP request method" msgstr "Метод HTTP запроса" #: ../../docstring collections.abc.Mapping:1 of msgid "Type used for passing HTTP request headers" msgstr "Тип используемый для задания заголовков HTTP запросов" #: ../../docstring of typing.Union:1 msgid "JSON data (parsed)" msgstr "Данные JSON (после парсинга)" #: ../../docstring collections.abc.Callable:1 of msgid "Function that is used for opening local files (like :any:`open`)" msgstr "" "Функция, которая используется для открытия локальных файлов (как " ":any:`open`)" #: ../../docstring of typing.Union:1 msgid "Yandex.Disk's asynchronous operation status" msgstr "Статус асинхронной операции Яндекс.Диска" #: of yadisk.types.PasswordVerbose:1 msgid "Verbose information about the password of a shared resource." msgstr "Развёрнутая информация о пароле общего ресурса." #: ../../docstring of typing.Union:1 msgid "Request payload - data to be uploaded" msgstr "Полезная нагрузка запроса - данные, которые будут загружены на сервер" #: of yadisk.types.PublicSettings:1 msgid "" "Public settings of a shared resource. This type describes the input for " "requests that modify public settings. For the related response object, " "see :any:`PublicSettingsObject`." msgstr "" "Публичные настройки общего ресурса. Этот тип описывает входные данные для" " запросов, модифицирующих публичные настройки. См. также связанный с ним " "объект :any:`PublicSettingsObject`." #: of yadisk.types.PublicSettings:7 msgid "" ":any:`AvailableUntilVerbose`, verbose information about the expiration " "date" msgstr ":any:`AvailableUntilVerbose`, развёрнутая информация о дате истечения" #: of yadisk.types.PublicSettings:9 msgid ":any:`PasswordVerbose`, verbose information about the password" msgstr ":any:`PasswordVerbose`, развёрнутая информация о пароле" #: of yadisk.types.PublicSettings:11 msgid "" ":any:`ExternalOrganizationIdVerbose`, verbose information about the " "external organization ID" msgstr "" ":any:`ExternalOrganizationIdVerbose`, развёрнутая информация " "обидентификаторе внешней организации" #: of yadisk.types.PublicSettings:13 msgid "`List[PublicSettingsAccess]`, list of access settings" msgstr "`List[PublicSettingsAccess]`, список настроек доступа" #: of yadisk.types.PublicSettings:17 msgid "" "It appears that passing :code:`available_until` as an empty string " "disables the expiration date. Similarly, password can be disabled by " "passing :code:`False` or :code:`0`. This is not officially documented, " "though." msgstr "" "Как показывает практика, передача пустой строки в поле " ":code:`available_until` отключает дату истечения доступа. Аналогично, " "пароль можно отключить, передав :code:`False` или :code:`0`. Но подобное " "поведение не задокументировано." #: of yadisk.types.PublicSettingsAccess:7 msgid "`List[str]`, list of user IDs" msgstr "`List[str]`, список идентификаторов пользователей" #: of yadisk.types.PublicSettingsAccess:8 msgid "`List[int]`, list of group IDs" msgstr "`List[int]`, список идентификаторов групп" #: of yadisk.types.PublicSettingsAccess:9 msgid "`List[int]`, list of department IDs" msgstr "`List[int]`, список идентификаторов подразделений" #: of yadisk.types.PublicSettingsAccess:10 msgid "`list[str]`, list of access rights" msgstr "`list[str]`, список прав доступа" #: ../../docstring collections.abc.Callable:1 of msgid "Function that returns an instance of :any:`Session`" msgstr "Функция, возвращающая объект :any:`Session`" #: ../../docstring of typing.Union:1 msgid "Valid session name (see :doc:`/api_reference/sessions`)" msgstr "Имя сессии (см. :doc:`/api_reference/sessions`)" #: ../../docstring of typing.Union:1 msgid "" "Request timeout (in seconds). Can be a single number, None or a tuple. If" " the timeout is specified as a tuple, then the first value is the connect" " timeout, and the second value is the read timeout. Otherwise, both " "connect and read timeouts are set to the same value. A value of None " "means no timeout. If the timeout's value is :code:`...`, the default " "timeout is used (either :any:`settings.DEFAULT_TIMEOUT` or " ":any:`settings.DEFAULT_UPLOAD_TIMEOUT`)" msgstr "" "Таймаут запроса (в секундах). Может быть числом, None или кортежем. Если " "таймаут задан как кортеж, то первое значение - таймаут соединения, а " "второе - таймаут чтения. Иначе, заданное значение используется для обоих " "таймаутов. Значение None означает отсутствие таймаута. Если в качестве " "таймаута передано значение :code:`...`, то используется таймаут по " "умолчанию (:any:`settings.DEFAULT_TIMEOUT` или " ":any:`settings.DEFAULT_UPLOAD_TIMEOUT`)" #: ../../api_reference/utilities.rst:2 msgid "Utilities" msgstr "Вспомогательные средства" #: of yadisk.utils.CaseInsensitiveDict:1 msgid "A case-insensitive dictionary. All keys are converted to lowercase." msgstr "" "Словарь, нечувствительный к регистру. Все ключи преобразуются в нижний " "регистр." #: of yadisk.utils.CaseInsensitiveDict.get:1 #: yadisk.utils.CaseInsensitiveDict.setdefault:3 msgid "Return the value for key if key is in the dictionary, else default." msgstr "Return the value for key if key is in the dictionary, else default." #: of yadisk.utils.CaseInsensitiveDict.pop:1 msgid "" "If the key is not found, return the default if given; otherwise, raise a " "KeyError." msgstr "" "If the key is not found, return the default if given; otherwise, raise a " "KeyError." #: of yadisk.utils.CaseInsensitiveDict.setdefault:1 msgid "Insert key with a value of default if key is not in the dictionary." msgstr "Insert key with a value of default if key is not in the dictionary." #: of yadisk.utils.CaseInsensitiveDict.update:1 msgid "" "If E is present and has a .keys() method, then does: for k in E.keys(): " "D[k] = E[k] If E is present and lacks a .keys() method, then does: for " "k, v in E: D[k] = v In either case, this is followed by: for k in F: " "D[k] = F[k]" msgstr "" "If E is present and has a .keys() method, then does: for k in E.keys(): " "D[k] = E[k] If E is present and lacks a .keys() method, then does: for " "k, v in E: D[k] = v In either case, this is followed by: for k in F: " "D[k] = F[k]" #: of yadisk.utils.async_auto_retry:1 yadisk.utils.auto_retry:1 msgid "" "Attempt to perform a request with automatic retries. A retry is triggered" " by :any:`RequestError` or :any:`RetriableYaDiskError`, unless the raised" " exception has :code:`disable_retry` set to :code:`True`." msgstr "" "Выполняет запрос с автоматическими повторными попытками. Повторная " "попытка может быть вызвана :any:`RequestError` или " ":any:`RetriableYaDiskError`, если у исключения не задан атрибут " ":code:`disable_retry=True`." #: of yadisk.utils.async_auto_retry:5 yadisk.utils.auto_retry:5 msgid "function to run, must not require any arguments" msgstr "Функция, подлежащая исполнению, не должна требовать аргументов" #: of yadisk.utils.async_auto_retry:7 yadisk.utils.auto_retry:7 msgid "`int` or `float`, delay between retries (in seconds)" msgstr "`int` или `float`, задержка между повторными попытками в секундах" #: of yadisk.utils.async_auto_retry:8 yadisk.utils.auto_retry:8 msgid "`tuple` or `None`, additional arguments for `func`" msgstr "`tuple` или `None`, дополнительные аргументы для `func`" #: of yadisk.utils.async_auto_retry:9 yadisk.utils.auto_retry:9 msgid "`dict` or `None`, additional keyword arguments for `func`" msgstr "`dict` или `None`, дополнительные keyword-аргументы для `func`" #: of yadisk.utils.async_auto_retry:12 yadisk.utils.auto_retry:12 msgid "return value of func()" msgstr "Значение, возвращаемое func()" #: of yadisk.utils.get_exception:1 msgid "" "Get an exception instance based on response, assuming the request has " "failed." msgstr "" "Возвращает объект исключения, основываясь на ответе (подразумевается, что" " запрос не удался)." #: of yadisk.utils.get_exception:4 msgid "an instance of :any:`ErrorObject` or `None`" msgstr "экземпляр :any:`ErrorObject` или `None`" #: of yadisk.utils.get_exception:6 msgid "an exception instance, subclass of :any:`YaDiskError`" msgstr "Объект исключения, подкласс :any:`YaDiskError`" #~ msgid ":any:`ResourceLinkObject`, link to the source resource" #~ msgstr ":any:`ResourceLinkObject`, ссылка на исходный ресурс" #~ msgid "generator of :any:`PublicResourceObject`" #~ msgstr "генератор :any:`PublicResourceObject`" #~ msgid ":any:`ResourceLinkObject`, link to the resource" #~ msgstr ":any:`ResourceLinkObject`, ссылка на ресурс" #~ msgid "" #~ ":any:`OperationLinkObject` if the operation is" #~ " performed asynchronously, `None` otherwise" #~ msgstr "" #~ ":any:`OperationLinkObject`, если операция " #~ "выполняется асинхронно, иначе `None`" #~ msgid ":any:`ResourceLinkObject`, link to the destination resource" #~ msgstr ":any:`ResourceLinkObject`, ссылка на загруженный ресурс" #~ msgid ":any:`OperationLinkObject`, link to the asynchronous operation" #~ msgstr ":any:`OperationLinkObject`, ссылка на асинхронную операцию" #~ msgid "generator of :any:`TrashResourceObject`" #~ msgstr "генератор :any:`TrashResourceObject`" #~ msgid "" #~ "path, file-like object to be " #~ "uploaded or a function that returns " #~ "a an iterator (or generator)" #~ msgstr "" #~ msgid "" #~ "path or file-like object to be " #~ "uploaded or a function that returns " #~ "a an iterator (or generator)" #~ msgstr "" #~ msgid "" #~ "path or file-like object to be " #~ "uploaded or a function that returns " #~ "an iterator (or generator)" #~ msgstr "" #~ msgid "`None` or a function that returns a new instance of :any:`AsyncSession`" #~ msgstr "" #~ "`None` или функция, которая возвращает " #~ "новый экземпляр :any:`AsyncSession`" #~ msgid "function that returns a new instance of :any:`AsyncSession`" #~ msgstr "функция, которая возвращает новый экземпляр :any:`AsyncSession`" #~ msgid "" #~ "current session (:any:`AsyncSession` instance), " #~ "created using the `session_factory` with " #~ "filled out authentication headers" #~ msgstr "" #~ "текущая сессия (экземпляр :any:`AsyncSession`), " #~ "созданная с помощью `session_factory` с " #~ "заполненными заголовками аутентификации" #~ msgid "Get authentication URL for the user to go to." #~ msgstr "Получает URL для аутентификации для пользователя." #~ msgid "" #~ "indicates whether to use lightweight " #~ "layout, values other than \"popup\" are" #~ " ignored" #~ msgstr "" #~ "указывает использовать облегчённую вёрстку, " #~ "обрабатывает только \"popup\", остальные " #~ "значения игнорируются" #~ msgid "" #~ "Get the URL for the user to " #~ "get the confirmation code. The " #~ "confirmation code can later be used " #~ "to get the token." #~ msgstr "" #~ "Получает URL для получения пользователем " #~ "кода подтверждения. Он может быть " #~ "использован для получения токена." #~ msgid "Prepares a new :any:`AsyncSession` object with headers needed for API." #~ msgstr "" #~ "Готовит новый объект :any:`AsyncSession` с " #~ "заголовками, необходимыми для API." #~ msgid "application token, equivalent to `self.token` if `None`" #~ msgstr "токен, то же самое, что `self.token`, если `None`" #~ msgid "`AsyncSession`" #~ msgstr "`AsyncSession`" #~ msgid "token cannot be revoked (not bound to this application, etc.)" #~ msgstr "" #~ "токен не может быть отозван (например," #~ " если не привязан к данному " #~ "приложению)" #~ msgid "Bases: :py:class:`~yadisk.objects.resources.LinkObject`" #~ msgstr "Базовые классы: :py:class:`~yadisk.objects.resources.LinkObject`" #~ msgid "`None` or a function that returns a new instance of :any:`Session`" #~ msgstr "`None` или функция, которая возващает новый экземпляр :any:`Session`" #~ msgid "function that returns a new instance of :any:`Session`" #~ msgstr "функция, которая возващает новый экземпляр :any:`Session`" #~ msgid "" #~ "current session (:any:`Session` instance), " #~ "created using the `session_factory` with " #~ "filled out authentication headers" #~ msgstr "" #~ "текущая сессия (экземпляр :any:`Session`), " #~ "созданная с помощью `session_factory` с " #~ "заполненными заголовками аутентификации" #~ msgid "Prepares :any:`Session` object with headers needed for API." #~ msgstr "Готовит объект :any:`Session` с заголовками, необходимыми для API." #~ msgid ":any:`Session`" #~ msgstr ":any:`Session`" #~ msgid "an instance of :any:`Response`" #~ msgstr "объект :any:`Response`" #~ msgid "Low-Level API" #~ msgstr "Низкоуровневый API" #~ msgid "API Request Objects" #~ msgstr "Объекты запросов к API" #~ msgid "Base class for all API requests." #~ msgstr "Базовый класс для всех объектов запросов к REST API." #~ msgid "an instance of :any:`Session`" #~ msgstr "объект :any:`Session`" #~ msgid "`dict` of arguments, that will be passed to `process_args`" #~ msgstr "`dict`, аргументы, которые будут перданы в `process_args`" #~ msgid "`str`, request URL" #~ msgstr "`str`, URL запроса" #~ msgid "" #~ "`str`, Content-Type header (\"application/x" #~ "-www-form-urlencoded\" by default)" #~ msgstr "" #~ "`str`, заголовок Content-Type (\"application/x" #~ "-www-form-urlencoded\" по умолчанию)" #~ msgid "`list`-like, list of response codes that indicate request's success" #~ msgstr "`list`-подобный, список кодов ответов, означающих успех запроса" #~ msgid "`float`, delay between retries in seconds" #~ msgstr "`float`, задержка между повторными попытками в секундах" #~ msgid "Process the response." #~ msgstr "Обрабатывает ответ." #~ msgid "extra arguments (optional)" #~ msgstr "дополнительные аргументы (опциональные)" #~ msgid "depends on `self.process_json()`" #~ msgstr "зависит от `self.process_json()`" #~ msgid "Actually send the request" #~ msgstr "Отправляет запрос" #~ msgid ":any:`AsyncResponse` (`self.response`)" #~ msgstr ":any:`AsyncResponse` (`self.response`)" #~ msgid "Process the JSON response." #~ msgstr "Обрабатывает JSON ответ." #~ msgid "`dict` or `None`, JSON response" #~ msgstr "`dict` или `None`, JSON ответ" #~ msgid "processed response, can be anything" #~ msgstr "обработанный ответ, может быть что угодно" #~ msgid ":any:`Response` (`self.response`)" #~ msgstr ":any:`Response` (`self.response`)" #~ msgid "Bases: :py:class:`~yadisk.api.api_request.APIRequest`" #~ msgstr "Базовые классы: :py:class:`~yadisk.api.api_request.APIRequest`" #~ msgid "" #~ "This request is used for authorization" #~ " using the Yandex OAuth page. In " #~ "this case the user must enter the" #~ " verification code (:code:`user_code`) in " #~ "the browser on the Yandex OAuth " #~ "page. After the user has entered " #~ "the code on the OAuth page, the" #~ " application can exchange the " #~ ":code:`device_code` for the token." #~ msgstr "" #~ "Данный запрос используется для авторизации " #~ "с помощью страницы Яндекс OAuth. В " #~ "данном случае пользователь должен ввести " #~ "код подтверждения (:code:`user_code`) в " #~ "браузере на странице Яндекс OAuth. После" #~ " того как пользователь ввёл код, " #~ "приложение может обменять :code:`device_code` " #~ "на токен." #~ msgid "" #~ "an instance of :any:`Session` or " #~ ":any:`AsyncSession` with prepared headers" #~ msgstr "" #~ "объект :any:`Session` или :any:`AsyncSession` " #~ "с подготовленными заголовками" #~ msgid "A request to get the token." #~ msgstr "Запрос для получения токена." #~ msgid "A request to refresh an existing token." #~ msgstr "Запрос для обновления существующего токена." #~ msgid "the refresh token that was received with the original token" #~ msgstr "refresh-токен, полученный вместе с токеном" #~ msgid "A request to revoke the token." #~ msgstr "Запрос для отзыва токена." #~ msgid "the token to be revoked" #~ msgstr "токен, подлежащий отзыву" #~ msgid "A request to get disk information." #~ msgstr "Запрос для получения информации о диске." #~ msgid "A request to copy a file or a directory." #~ msgstr "Запрос копирования файла или папки." #~ msgid ":any:`ResourceLinkObject` or :any:`OperationLinkObject`" #~ msgstr ":any:`ResourceLinkObject` или :any:`OperationLinkObject`" #~ msgid "A request to delete a file or a directory." #~ msgstr "Запрос для удаления ресурса." #~ msgid ":any:`OperationLinkObject` or `None`" #~ msgstr ":any:`OperationLinkObject` или `None`" #~ msgid "A request to delete a trash resource." #~ msgstr "Запрос для удаления ресурса корзины." #~ msgid "" #~ "A request to get a flat list " #~ "of all files (that doesn't include " #~ "directories)." #~ msgstr "Запрос для получения плоского списка всех файлов." #~ msgid ":any:`FilesResourceListObject`" #~ msgstr ":any:`FilesResourceListObject`" #~ msgid "A request to get a download link to a resource." #~ msgstr "Запрос для получения ссылки на скачивание ресурса." #~ msgid "path to the resource to be downloaded" #~ msgstr "путь к скачиваемому ресурсу" #~ msgid ":any:`ResourceDownloadLinkObject`" #~ msgstr ":any:`ResourceDownloadLinkObject`" #~ msgid "A request to get meta-information about a resource." #~ msgstr "Запрос для получния мета-информации о ресурсе." #~ msgid "A request to get a download link for a public resource." #~ msgstr "Запрос для получения ссылки на скачивание публичного ресурса." #~ msgid "A request to get meta-information about a public resource." #~ msgstr "Запрос для получния мета-информации о публичном ресурсе." #~ msgid ":any:`PublicResourceObject`" #~ msgstr ":any:`PublicResourceObject`" #~ msgid "A request to get a list of public resources." #~ msgstr "Запрос для получения списка публичных ресурсов." #~ msgid ":any:`PublicResourcesListObject`" #~ msgstr ":any:`PublicResourcesListObject`" #~ msgid "A request to get meta-information about a trash resource." #~ msgstr "Запрос для получния мета-информации о ресурсе корзины." #~ msgid ":any:`TrashResourceObject`" #~ msgstr ":any:`TrashResourceObject`" #~ msgid "A request to get an upload link." #~ msgstr "Запрос для получения ссылки для загрузки ресурса." #~ msgid "" #~ "A request to get the list of " #~ "latest uploaded files sorted by upload" #~ " date." #~ msgstr "" #~ "Запрос для получения списка последних " #~ "загруженных файлов, отсортированного по дате" #~ " загрузки." #~ msgid ":any:`LastUploadedResourceListObject`" #~ msgstr ":any:`LastUploadedResourceListObject`" #~ msgid "A request to create a new directory." #~ msgstr "Запрос для создания новой папки." #~ msgid ":any:`ResourceLinkObject`" #~ msgstr ":any:`ResourceLinkObject`" #~ msgid "A request to move a resource." #~ msgstr "Запрос для перемещения ресурса." #~ msgid ":any:`OperationLinkObject` or :any:`ResourceLinkObject`" #~ msgstr ":any:`OperationLinkObject` или :any:`ResourceLinkObject`" #~ msgid "A request to update custom properties of a resource." #~ msgstr "Запрос для обновления пользовательских свойств ресурса." #~ msgid "A request to make a resource public." #~ msgstr "Запрос для того, чтобы сделать ресурс публичным." #~ msgid "A request to restore trash." #~ msgstr "Запрос для восстановления мусора." #~ msgid "A request to save a public resource to the disk." #~ msgstr "Запрос для сохранения публичного ресурса на диск." #~ msgid "A request to make a public resource private." #~ msgstr "Запрос для того, чтобы сделать публичный ресурс приватным." #~ msgid "A request to upload a file from URL." #~ msgstr "Запрос для загрузки файла по URL." #~ msgid ":any:`OperationLinkObject`" #~ msgstr ":any:`OperationLinkObject`" #~ msgid "A request to get operation status." #~ msgstr "Запрос для получения статуса операции." #~ msgid "operation ID or link" #~ msgstr "идентификатор операции или ссылка на нее" #~ msgid ":any:`OperationStatusObject`" #~ msgstr ":any:`OperationStatusObject`" #~ msgid "" #~ "Copy resource to `dst_path`. If the " #~ "operation is performed asynchronously, returns" #~ " the link to the operation, " #~ "otherwise, returns the link to the " #~ "newly created resource." #~ msgstr "" #~ "Копирует ресурс в `dst_path`. Если " #~ "операция выполняется асинхронно, возвращает " #~ "ссылку на операцию, иначе, возвращает " #~ "ссылку на новый ресурс." #~ msgid ":code:`copy(dst_path, /, **kwargs)`" #~ msgstr ":code:`copy(dst_path, /, **kwargs)`" #~ msgid ":code:`copy(relative_path, dst_path, /, **kwargs)`" #~ msgstr ":code:`copy(relative_path, dst_path, /, **kwargs)`" #~ msgid "`str` or `None`, source path relative to the resource" #~ msgstr "`str` or `None`, исходный путь, относительно ресурса" #~ msgid "Download the file. This method takes 1 or 2 positional arguments:" #~ msgstr "Скачивает файл. Данный метод принимает 1 или 2 позиционных аргумента:" #~ msgid ":code:`download(dst_path_or_file, /, **kwargs)`" #~ msgstr ":code:`download(dst_path_or_file, /, **kwargs)`" #~ msgid ":code:`download(relative_path, dst_path_or_file, /, **kwargs)`" #~ msgstr ":code:`download(relative_path, dst_path_or_file, /, **kwargs)`" #~ msgid "" #~ "If `relative_path` is empty or None " #~ "(or not specified) this method will " #~ "try to use the `file` attribute as" #~ " a download link." #~ msgstr "" #~ "Если `relative_path` пустой или None " #~ "(или не указан), данный метод будет " #~ "использовать поле `file` (если доступно) " #~ "в качестве ссылки для скачивания." #~ msgid "Check whether resource exists." #~ msgstr "Проверяет, существует ли ресурс." #~ msgid "`str` or `None`, relative path from the resource" #~ msgstr "`str` или `None`, относительный путь от ресурса" #~ msgid "`str` or `None`, path relative to the resource" #~ msgstr "`str` или `None`, относительный путь от ресурса" #~ msgid "`str` or `None`, relative path from resource" #~ msgstr "`str` или `None`, относительный путь от ресурса" #~ msgid "relative path to a resource in a public folder." #~ msgstr "относительный путь к ресурсу внутри публичной папки." #~ msgid "relative path from the resource" #~ msgstr "относительный путь от ресурса" #~ msgid "`str` or `None`, relative path to the resource" #~ msgstr "`str` или `None`, относительный путь от ресурса" #~ msgid "Check whether resource is a directory." #~ msgstr "Проверяет, является ли ресурс папкой." #~ msgid "Check whether resource is a file." #~ msgstr "Проверяет, является ли ресурс файлом." #~ msgid "Get contents of the resource." #~ msgstr "Получает содержимое папки." #~ msgid "relative path from resource" #~ msgstr "относительный путь от ресурса" #~ msgid "generator of :any:`AsyncResourceObject`" #~ msgstr "генератор :any:`AsyncResourceObject`" #~ msgid "`str` or `None`, relative path to the directory to be created" #~ msgstr "`str` или `None`, относительный путь к папке, подлежащей созданию" #~ msgid "" #~ "Move resource to `dst_path`. This method" #~ " takes 1 or 2 positional arguments:" #~ msgstr "" #~ "Перемещает ресурс в `dst_path`. Данный " #~ "метод принимает 1 или 2 позиционных " #~ "аргумента:" #~ msgid ":code:`move(dst_path, /, **kwargs)`" #~ msgstr ":code:`move(dst_path, /, **kwargs)`" #~ msgid ":code:`move(relative_path, dst_path, /, **kwargs)`" #~ msgstr ":code:`move(relative_path, dst_path, /, **kwargs)`" #~ msgid "`str` or `None`, source path to be moved relative to the resource" #~ msgstr "" #~ "`str` или `None`, исходный путь, " #~ "относительно ресурса, подлежащий перемещению" #~ msgid "" #~ "Update custom properties of a resource." #~ " This method takes 1 or 2 " #~ "positional arguments:" #~ msgstr "" #~ "Обновляет пользовательские свойства ресурса. " #~ "Данный метод принимает 1 или 2 " #~ "позиционных аргумента:" #~ msgid ":code:`patch(properties, /, **kwargs)`" #~ msgstr ":code:`patch(properties, /, **kwargs)`" #~ msgid ":code:`patch(relative_path, properties, /, **kwargs)`" #~ msgstr ":code:`patch(relative_path, properties, /, **kwargs)`" #~ msgid "relative path to the resource in the public folder." #~ msgstr "относительный путь к ресурсу внутри публичной папки" #~ msgid "generator of :any:`AsyncPublicResourceObject`" #~ msgstr "генератор :any:`AsyncPublicResourceObject`" #~ msgid "`str` or `None`, relative path to the resource to be published" #~ msgstr "`str` или `None`, относительный путь к публикуемому ресурсу" #~ msgid "`str` or `None`, relative path to the resource to be removed" #~ msgstr "`str` или `None`, относительный путь к удаляемому ресурсу" #~ msgid "`str` or `None`, source path to be renamed relative to the resource" #~ msgstr "" #~ "`str` или `None`, исходный путь, " #~ "относительно ресурса, подлежащий переименованию" #~ msgid "`str` or `None`, relative path to the resource to be unpublished" #~ msgstr "" #~ "`str` или `None`, относительный путь к" #~ " ресурсу, подлежащему депубликации" #~ msgid "path or file-like object to be uploaded" #~ msgstr "путь к файлу или файл-подобный объект для загрузки" #~ msgid "`str` or `None`, destination path relative to the resource" #~ msgstr "`str` или `None`, путь назначения относительно ресурса" #~ msgid ":code:`copy(relative_src_path, dst_path, /, **kwargs)`" #~ msgstr ":code:`copy(relative_src_path, dst_path, /, **kwargs)`" #~ msgid "generator of :any:`SyncResourceObject`" #~ msgstr "генератор :any:`SyncResourceObject`" #~ msgid "`str`, type of the operation" #~ msgstr "`str`, тип операции" #~ msgid ":any:`LinkObject`, link to the operation" #~ msgstr ":any:`LinkObject`, ссылка на операцию" #~ msgid "`dict`, other information about the operation" #~ msgstr "`dict`, другая информация об операции" #~ msgid "Updates session's headers." #~ msgstr "Обновляет заголовки сессии." #~ msgid "dictionary of headers to be set" #~ msgstr "словарь заголовков, которые будут заданы" #~ msgid "Sets token for the session by setting the Authorization header." #~ msgstr "Задаёт токен для сессии (заголовок Authorization)." #~ msgid "`str`, API token" #~ msgstr "`str`, токен API" #~ msgid "**DEFAULT_N_RETRIES** - `int`, default number of retries" #~ msgstr "" #~ "**DEFAULT_N_RETRIES** - `int`, максимальное " #~ "число повторных попыток запроса по " #~ "умолчанию" #~ msgid "" #~ "**DEFAULT_UPLOAD_TIMEOUT** - analogous to " #~ "`DEFAULT_TIMEOUT` but for `upload` function" #~ msgstr "" #~ "**DEFAULT_UPLOAD_TIMEOUT** - аналогично " #~ "`DEFAULT_TIMEOUT`, но для функции `upload`" #~ msgid "" #~ "**DEFAULT_UPLOAD_RETRY_INTERVAL** - analogous to " #~ "`DEFAULT_RETRY_INTERVAL` but for `upload` " #~ "function" #~ msgstr "" #~ "**DEFAULT_UPLOAD_RETRY_INTERVAL** - аналогично " #~ "`DEFAULT_RETRY_INTERVAL`, но для функции " #~ "`upload`" #~ msgid "`bool`, not clear waht this is for" #~ msgstr "" #~ msgid "Get contents of a public directory." #~ msgstr "Получает содержимое публичной папки." #~ msgid "" #~ "relative path to the resource in " #~ "the public folder. By specifying the " #~ "key of the published folder in " #~ "`public_key`, you can request contents " #~ "of any nested folder." #~ msgstr "" #~ "относительный путь к ресурсу в публичной" #~ " папке. Указывая ключ опубликованной папки" #~ " через `public_key`, вы можете запросить" #~ " содержимое любой вложенной папки." #~ msgid "" #~ "Valid access rights: - `write`: write" #~ " access - `read`: read access - " #~ "`read_without_download`: read access without " #~ "download - `read_with_password`: read access" #~ " with password - " #~ "`read_with_password_without_download`: read access " #~ "with password and without download" #~ msgstr "" #~ msgid "" #~ "`str`, specifies the type of access, " #~ "must be one of the following: -" #~ " `macro`: access for all employees or" #~ " all users - `user`: access for " #~ "a specific user - `group`: access " #~ "for a specific group - `department`: " #~ "access for a specific department" #~ msgstr "" #~ "`str`, определяет тип доступа, значение " #~ "должно быть одним из следующих: - " #~ "`macro`: все субъекты уровня общего " #~ "доступа - `user`: отрудник организации, " #~ "для которого настроен персональный доступ " #~ "- `group`: группа в организации, для " #~ "которой настроен персональный доступ - " #~ "`department`: отдел в организации, для " #~ "которого настроен персональный доступ" #~ msgid "" #~ "`Official docs `__" #~ msgstr "" #~ "`Официальная документация `__" ================================================ FILE: docs/locales/ru/LC_MESSAGES/changelog.po ================================================ # changelog.rst translations # Copyright (C) 2026, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2026. # msgid "" msgstr "" "Project-Id-Version: YaDisk 3.4.1\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2026-04-15 18:50+0500\n" "PO-Revision-Date: 2026-04-16 12:47+0500\n" "Last-Translator: Ivan Konovalov \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.18.0\n" #: ../../changelog.rst:2 msgid "Changelog" msgstr "История изменений" #: ../../changelog.rst:23 msgid "**Release 3.4.1 (2026-04-16)**" msgstr "**Release 3.4.1 (2026-04-16)**" #: ../../changelog.rst:25 ../../changelog.rst:77 ../../changelog.rst:103 #: ../../changelog.rst:119 ../../changelog.rst:209 msgid "Bug fixes:" msgstr "Исправления:" #: ../../changelog.rst:27 msgid "" "Fixed a :code:`TypeError` when passing a file path to " ":any:`AsyncClient.download()` or :any:`AsyncClient.upload()` while not " "having :code:`aiofiles` installed (see `issue #62`_)" msgstr "" "Исправлена ошибка :code:`TypeError` при передаче пути к файлу в " ":any:`AsyncClient.download()` или :any:`AsyncClient.upload()` без " "установленного :code:`aiofiles` (см. `issue #62`_)" #: ../../changelog.rst:31 msgid "" "Work around Yandex.Disk ignoring request body for :any:`Client.patch()` " "and :any:`Client.update_public_settings()` when using :code:`pycurl` due " "to setting :code:`Transfer-Encoding: chunked` by default" msgstr "" "Обход проблемы, когда Яндекс.Диск игнорирует тело запроса для " ":any:`Client.patch()` и :any:`Client.update_public_settings()` при " "использовании :code:`pycurl` из-за задания заголовка :code:`Transfer-Encoding: chunked` " "по умолчанию" #: ../../changelog.rst:35 msgid "**Release 3.4.0 (2025-07-10)**" msgstr "**Release 3.4.0 (2025-07-10)**" #: ../../changelog.rst:37 ../../changelog.rst:66 ../../changelog.rst:89 #: ../../changelog.rst:112 ../../changelog.rst:161 msgid "New features:" msgstr "Нововведения:" #: ../../changelog.rst:39 msgid "Added methods for managing public settings of resources:" msgstr "Добавлены методы для управления настройками публичного доступа к ресурсам:" #: ../../changelog.rst:41 msgid ":any:`Client.update_public_settings()`" msgstr ":any:`Client.update_public_settings()`" #: ../../changelog.rst:42 msgid ":any:`Client.get_public_settings()`" msgstr ":any:`Client.get_public_settings()`" #: ../../changelog.rst:43 msgid ":any:`Client.get_public_available_settings()`" msgstr ":any:`Client.get_public_available_settings()`" #: ../../changelog.rst:45 msgid "" "Note, it appears that these API endpoints do not fully conform to the " "official REST API documentation, their functionality is limited in " "practice." msgstr "" "Внимание: похоже, что эти эндпоинты не полностью соответствуют " "официальной документации REST API, их функциональность на практике " "ограничена." #: ../../changelog.rst:49 msgid "Added new exception class :any:`PasswordRequiredError`" msgstr "Добавлен новый класс исключений :any:`PasswordRequiredError`" #: ../../changelog.rst:51 msgid "Added several new fields for :any:`DiskInfoObject`:" msgstr "Добавлено несколько новых полей :any:`DiskInfoObject`:" #: ../../changelog.rst:53 msgid ":code:`deletion_restricion_days`" msgstr ":code:`deletion_restricion_days`" #: ../../changelog.rst:54 msgid ":code:`hide_screenshots_in_photoslice`" msgstr ":code:`hide_screenshots_in_photoslice`" #: ../../changelog.rst:55 msgid ":code:`is_legal_entity`" msgstr ":code:`is_legal_entity`" #: ../../changelog.rst:57 msgid "Implemented the :code:`__dir__()` method for response objects" msgstr "Реализован метод :code:`__dir__()` для объектов ответов сервера" #: ../../changelog.rst:59 ../../changelog.rst:82 ../../changelog.rst:191 msgid "Improvements:" msgstr "Улучшения:" #: ../../changelog.rst:61 msgid "" ":code:`repr()` of API response objects now only shows the keys that are " "actually present (instead of displaying them as :code:`None` like before)" msgstr "" ":code:`repr()` объектов ответов API теперь показывает только те ключи, " "которые фактически присутствуют (вместо отображения их значений как " ":code:`None`, как раньше)" #: ../../changelog.rst:64 msgid "**Release 3.3.0 (2025-04-29)**" msgstr "**Release 3.3.0 (2025-04-29)**" #: ../../changelog.rst:68 msgid "" "User-Agent spoofing to bypass Yandex.Disk's upload speed limit (see `PR " "#57`_). :any:`Client.upload()` and related methods (including " ":any:`AsyncClient`) have a new optional parameter " ":code:`spoof_user_agent`, which is set to :code:`True` by default. This " "parameter can be used to disable User-Agent spoofing if necessary." msgstr "" "Спуфинг User-Agent для обхода ограничения скорости загрузки файлов на " "Диск (см. `PR #57`_). :any:`Client.upload()` и связанные с ним методы " "(включая :any:`AsyncClient`) имеют новый опциональный параметр " ":code:`spoof_user_agent`, который по умолчанию имеет значение " ":code:`True`. Этот параметр можно использовать для отключения спуфинга, " "если это необходимо." #: ../../changelog.rst:74 msgid "" "Added IPython's pretty printing support for :any:`YaDiskObject` and " "derived classes" msgstr "" "Добавлена поддержка pretty-printing в IPython для :any:`YaDiskObject` и " "производных классов" #: ../../changelog.rst:79 msgid "" ":any:`Client.wait_for_operation()` now uses :code:`time.monotonic()` " "instead of :code:`time.time()`" msgstr "" ":any:`Client.wait_for_operation()` теперь использует " ":code:`time.monotonic()` вместо :code:`time.time()`" #: ../../changelog.rst:84 msgid "" "REST API error messages are now clearly divided into four parts (message," " description, error code and HTTP status code)" msgstr "" "Сообщения об ошибках REST API теперь чётко разделены на четыре части " "(сообщение, описание, код ошибки и код состояния HTTP)" #: ../../changelog.rst:87 msgid "**Release 3.2.0 (2025-02-03)**" msgstr "**Release 3.2.0 (2025-02-03)**" #: ../../changelog.rst:91 msgid "" "Added new method: :any:`Client.makedirs()` / " ":any:`AsyncClient.makedirs()` (see `issue #53`_)" msgstr "" "Добавлен новый метод: :any:`Client.makedirs()` и " ":any:`AsyncClient.makedirs()` (см. `issue #53`_)" #: ../../changelog.rst:93 msgid "Added several missing fields for :any:`DiskInfoObject`:" msgstr "Добавлено несколько недостающих полей :any:`DiskInfoObject`" #: ../../changelog.rst:95 msgid ":code:`photounlim_size`" msgstr ":code:`photounlim_size`" #: ../../changelog.rst:96 msgid ":code:`will_be_overdrawn`" msgstr ":code:`will_be_overdrawn`" #: ../../changelog.rst:97 msgid ":code:`free_photounlim_end_date`" msgstr ":code:`free_photounlim_end_date`" #: ../../changelog.rst:98 msgid ":code:`payment_flow`" msgstr ":code:`payment_flow`" #: ../../changelog.rst:100 msgid "" "Added missing field :code:`sizes` for :any:`ResourceObject` and related " "objects" msgstr "" "Добавлено недостающее поле :code:`sizes` для :any:`ResourceObject` и " "связанных с ним объектов" #: ../../changelog.rst:105 msgid "" ":any:`Client.rename()` / :any:`AsyncClient.rename()` now raises " ":any:`ValueError` on attempt to rename the root directory" msgstr "" ":any:`Client.rename()` / :any:`AsyncClient.rename()` теперь вызывает " ":any:`ValueError` при попытке переименовать корневую папку" #: ../../changelog.rst:107 msgid "" "Automatic retry attempt numbers were logged off by one, now they are " "logged correctly" msgstr "" "Номера автоматических повторных попыток логировались с ошибкой на " "единицу, теперь они логируются правильно" #: ../../changelog.rst:110 msgid "**Release 3.1.0 (2024-07-12)**" msgstr "**Release 3.1.0 (2024-07-12)**" #: ../../changelog.rst:114 msgid "" "Added new exception classes: :any:`GoneError` and " ":any:`ResourceDownloadLimitExceededError`" msgstr "" "Добавлены новые исключения: :any:`GoneError` и " ":any:`ResourceDownloadLimitExceededError`" #: ../../changelog.rst:116 msgid "" "Added a new method: :any:`Client.get_all_public_resources()` and " ":any:`AsyncClient.get_all_public_resources()`" msgstr "" "Добавлен новый метод: :any:`Client.get_all_public_resources()` и " ":any:`AsyncClient.get_all_public_resources()`" #: ../../changelog.rst:121 msgid "" "Fixed setting :code:`headers` and session arguments to :code:`None` " "causing errors" msgstr "" "Задание :code:`headers` и других опциональных параметров сессии как " ":code:`None` больше не вызывает ошибок" #: ../../changelog.rst:123 msgid "" "Fixed incorrect handling of empty filename in :any:`Client.rename()` and " ":any:`AsyncClient.rename()`" msgstr "" "Исправлено неправильное поведение :any:`Client.rename()` и " ":any:`AsyncClient.rename()` при указании пустого имени файла" #: ../../changelog.rst:125 msgid "" "Fixed several typos in async convenience method implementations " "(:code:`listdir()` and related)" msgstr "" "Исправлено несколько опечаток в асинхронных реализациях " "convenience-методов (:code:`listdir()` и аналогичных)" #: ../../changelog.rst:127 msgid "" "Fixed :any:`PublicResourceListObject` having the wrong type for its " ":code:`items` member" msgstr "" "Исправлен неправильный тип данных у атрибута :code:`items` класса " ":any:`PublicResourceListObject`" #: ../../changelog.rst:129 msgid "" "Fixed API requests not working with :any:`PycURLSession` when " ":code:`stream=True` is set" msgstr "" "Исправлены ошибки при отправке запросов API с помощью " ":any:`PycURLSession` при задании :code:`stream=True`" #: ../../changelog.rst:131 msgid "" "No data will be written to the output file by :any:`Client.download()`, " ":any:`Client.download_by_link()`, :any:`AsyncClient.download()` and " ":any:`AsyncClient.download_by_link()` if the server returns a bad status " "code" msgstr "" "Данные не будут записаны в файл методами :any:`Client.download()`, " ":any:`Client.download_by_link()`, :any:`AsyncClient.download()` и " ":any:`AsyncClient.download_by_link()`, если сервер вернул ошибочный код " "состояния" #: ../../changelog.rst:136 msgid "**Release 3.0.1 (2024-07-09)**" msgstr "**Release 3.0.1 (2024-07-09)**" #: ../../changelog.rst:138 msgid "" "Fixed broken :code:`pyproject.toml` that did not include full package " "contents (see `issue #49`_)" msgstr "" "Исправлен сломанный :code:`pyproject.toml`, который не включал в сборку " "полное содержимое пакета (см. `issue #49`_)" #: ../../changelog.rst:141 msgid "**Release 3.0.0 (2024-07-09)**" msgstr "**Release 3.0.0 (2024-07-09)**" #: ../../changelog.rst:143 msgid "Breaking changes:" msgstr "Несовместимые изменения:" #: ../../changelog.rst:145 msgid "See :doc:`/migration_guide` for full details" msgstr "См. :doc:`/migration_guide` для подробностей" #: ../../changelog.rst:146 msgid "" "All methods wait for asynchronous operations to complete by default (see " "the new :code:`wait=` parameter)" msgstr "" "Все методы теперь ожидают завершения асинхронных операций по умолчанию " "(см. новый параметр :code:`wait=`)" #: ../../changelog.rst:148 msgid "" "Iterating over the result of :any:`AsyncClient.listdir()` no longer " "requires the additional await keyword." msgstr "" "Итерация по результату :any:`AsyncClient.listdir()` больше не требует " "дополнительного ключевого слова await" #: ../../changelog.rst:150 msgid "" "Number of returned items of :any:`Client.get_files()` / " ":any:`AsyncClient.get_files()` is now controlled by the :code:`max_items`" " parameter, rather than :code:`limit`" msgstr "" "Число возвращаемых файлов :any:`Client.get_files()` / " ":any:`AsyncClient.get_files()` теперь контролируется параметром " ":code:`max_items`, вместо :code:`limit`" #: ../../changelog.rst:153 msgid "" "Methods :code:`set_token()`, :code:`set_headers()` of :any:`Session` and " ":any:`AsyncSession` were removed" msgstr "" "Методы :code:`set_token()`, :code:`set_headers()` интерфейсов " ":any:`Session` и :any:`AsyncSession` были удалены" #: ../../changelog.rst:155 msgid "Some methods no longer accept the :code:`fields` parameter" msgstr "Некоторые методы больше не принимают параметр :code:`fields`" #: ../../changelog.rst:156 msgid "" ":any:`Client.get_last_uploaded()` / " ":any:`AsyncClient.get_last_uploaded()` now return a list instead of a " "generator" msgstr "" ":any:`Client.get_last_uploaded()` / " ":any:`AsyncClient.get_last_uploaded()` теперь возвращает список вместо " "генератора" #: ../../changelog.rst:158 msgid ":code:`yadisk.api` is now a private module" msgstr ":code:`yadisk.api` - теперь скрытый модуль" #: ../../changelog.rst:159 msgid "" "All private modules were renamed to have names that start with :code:`_` " "(e.g, :code:`yadisk._api`)" msgstr "" "Все скрытые модули были переименованы, их имена начинаются с :code:`_` " "(например, :code:`yadisk._api`)" #: ../../changelog.rst:163 msgid "" "Added methods to wait until an asynchronous operation completes (see " ":any:`Client.wait_for_operation()` / " ":any:`AsyncClient.wait_for_operation()`)" msgstr "" "Добавлены методы для ожидания завершения асинхронной операции (см. " ":any:`Client.wait_for_operation()` / " ":any:`AsyncClient.wait_for_operation()`)" #: ../../changelog.rst:165 msgid "" "Methods that may start an asynchronous operation now accept additional " "parameters: :python:`wait: bool = True`, :python:`poll_interval: float = " "1.0` and :python:`poll_timeout: Optional[float] = None`" msgstr "" "Методы, которые могут запускать асинхронную операцию, теперь принимают " "дополнительные параметры: :python:`wait: bool = True`, " ":python:`poll_interval: float = 1.0` и :python:`poll_timeout: " "Optional[float] = None`" #: ../../changelog.rst:169 msgid "" ":any:`Client.listdir()`, :any:`Client.get_files()` and their async " "variants now accept a new parameter :python:`max_items: Optional[int] = " "None`, which can be used to limit the maximum number of returned items" msgstr "" ":any:`Client.listdir()`, :any:`Client.get_files()` и их асинхронные " "вариации теперь принимают новый параметр :python:`max_items: " "Optional[int] = None`, который может быть использован, чтобы ограничить " "максимальное число возвращаемых файлов" #: ../../changelog.rst:173 msgid "" "Most :any:`Client` and :any:`AsyncClient` methods now accept an optional " "parameter :python:`retry_on: Optional[Tuple[Type[Exception], ...]] = " "None`, which lets you specify a tuple of additional exceptions that can " "trigger an automatic retry" msgstr "" "Большинство методов :any:`Client` и :any:`AsyncClient` теперь принимает " ":python:`retry_on: Optional[Tuple[Type[Exception], ...]] = None`, который" " позволяет указывать кортеж из дополнительных исключений, которые могут " "вызвать автоматическую повторную попытку" #: ../../changelog.rst:177 msgid ":any:`yadisk.types` module is now public" msgstr "Модуль :any:`yadisk.types` - теперь публичный" #: ../../changelog.rst:178 msgid "Added basic logging of outgoing API requests and automatic retries" msgstr "" "Добавлено логирование исходящих запросов к API и автоматических повторных" " попыток" #: ../../changelog.rst:179 msgid "" "The logger instance for the library can be accessed as " ":any:`yadisk.settings.logger`" msgstr "Объект логгера библиотеки доступен как :any:`yadisk.settings.logger`" #: ../../changelog.rst:181 msgid "" "Added :any:`YaDiskObject.field()` and the :code:`@` operator " "(:any:`YaDiskObject.__matmul__()`) which verify that the given field is " "not :code:`None`" msgstr "" "Добавлен метод :any:`YaDiskObject.field()` и оператор :code:`@` " "(:any:`YaDiskObject.__matmul__()`), который удостоверяется, что указанное" " поле объекта не является :code:`None`" #: ../../changelog.rst:184 msgid "" "Added :any:`Client.get_upload_link_object()`, " ":any:`AsyncClient.get_upload_link_object()` whose return values " "additionally contain :code:`operation_id`" msgstr "" "Добавлены методы :any:`Client.get_upload_link_object()`, " ":any:`AsyncClient.get_upload_link_object()`, возвращаемые значения " "которых дополнительно содержат :code:`operation_id`" #: ../../changelog.rst:187 msgid ":any:`utils.auto_retry()` now accepts more parameters" msgstr ":any:`utils.auto_retry()` теперь принимает больше параметров" #: ../../changelog.rst:188 msgid "Added a few missing fields for :any:`DiskInfoObject`" msgstr "Добавлено несколько недостающих полей :any:`DiskInfoObject`" #: ../../changelog.rst:189 msgid ":any:`EXIFObject` now contains GPS coordinates" msgstr ":any:`EXIFObject` теперь содержит GPS-координаты" #: ../../changelog.rst:190 msgid ":any:`CaseInsensitiveDict` is now part of :any:`yadisk.utils`" msgstr ":any:`CaseInsensitiveDict` - теперь часть :any:`yadisk.utils`" #: ../../changelog.rst:193 msgid "" "Added full type hints for :any:`Client`, :any:`AsyncClient` through " ":code:`.pyi` stub files" msgstr "" "Добавлены полные подсказки типов для :any:`Client` и :any:`AsyncClient` с" " помощью файлов :code:`.pyi`" #: ../../changelog.rst:195 msgid "" "Docstrings for :any:`Client` / :any:`AsyncClient` now include more " "parameters" msgstr "" "Строки документации для :any:`Client` / :any:`AsyncClient` теперь " "включают в себя больше параметров" #: ../../changelog.rst:197 msgid "" "Errors during JSON processing (e.g. :any:`InvalidResponseError`) also " "trigger automatic retries" msgstr "" "Ошибки во время обработки JSON (например, :any:`InvalidResponseError`) " "также вызывают автоматические повторные попытки" #: ../../changelog.rst:199 msgid "" "Error message when the default session module is not available is now " "less confusing (see `issue #43`_)" msgstr "" "Сообщение об ошибке в случае, когда модуль сессии по умолчанию " "недоступен, теперь не вводит в заблуждение (см. `issue #43`_)" #: ../../changelog.rst:201 msgid "" "Reduced :any:`Client.listdir()`'s default :code:`limit` to :code:`500` " "from :code:`10000` to avoid timeouts on large directories (see `issue " "#45`_)" msgstr "" "Уменьшено значение :code:`limit` до :code:`500` (было :code:`10000`) для " ":any:`Client.listdir()` для избежания таймаутов при больших папках (см. " "`issue #45`_)" #: ../../changelog.rst:203 msgid "" "Reduced :any:`Client.get_files()`'s default :code:`limit` to :code:`200` " "from :code:`1000` to avoid timeouts" msgstr "" "Уменьшено значение :code:`limit` до :code:`200` (было :code:`1000`) для " ":any:`Client.get_files()` для избежания таймаутов" #: ../../changelog.rst:205 msgid "" ":any:`Client.download()` and similar methods no longer set " ":code:`Connection: close` header, since it's not necessary (unlike with " ":any:`Client.upload()`)" msgstr "" ":any:`Client.download()` и подобные методы больше не задают заголовок " ":code:`Connection: close` т.к. в этом нет необходимости (в отличие от " ":any:`Client.upload()`)" #: ../../changelog.rst:208 msgid ":any:`UnknownYaDiskError` now includes status code in the error message" msgstr "" ":any:`UnknownYaDiskError` теперь включает код статуса в сообщение об " "ошибке" #: ../../changelog.rst:211 msgid "" "Fixed :code:`httpx`- and :code:`aiohttp`-based session implementations " "not converting their exceptions to :any:`RequestError` in their " ":any:`Response.json()` / :any:`AsyncResponse.json()` implementations" msgstr "" "Исправлены реализации на основе :code:`httpx` и :code:`aiohttp`: " "реализации методов :any:`Response.json()` / :any:`AsyncResponse.json()` " "не преобразовывали свои исключения в :any:`RequestError`" #: ../../changelog.rst:214 msgid "" "Fixed :python:`stream=True` not being set by default in " ":any:`AsyncClient.download()`, :any:`AsyncClient.download_public()`" msgstr "" "Исправлено: параметр :python:`stream=True` был не задан по умолчанию в " ":any:`AsyncClient.download()`, :any:`AsyncClient.download_public()`" #: ../../changelog.rst:216 msgid "Other changes:" msgstr "Другие изменения:" #: ../../changelog.rst:218 msgid ":code:`typing_extensions` is now required for Python < 3.10" msgstr ":code:`typing_extensions` теперь требуется для Python < 3.10" #: ../../changelog.rst:220 msgid "**Release 2.1.0 (2024-01-03)**" msgstr "**Release 2.1.0 (2024-01-03)**" #: ../../changelog.rst:222 msgid "Fixed a bug where POST request parameters were not encoded correctly" msgstr "" "Исправлен баг, из-за которого параметры в теле POST-запроса неправильно " "кодировались" #: ../../changelog.rst:223 msgid "" "Fixed a bug in :code:`PycURLSession.send_request()` that made it ignore " "passed headers" msgstr "" "Исправлен баг в :code:`PycURLSession.send_request()`, из-за которого " "переданные заголовки игнорировались" #: ../../changelog.rst:224 msgid "" ":code:`RequestsSession.close()` now closes all underlying session " "instances, instead of only the current thread-local one" msgstr ":code:`RequestsSession.close()` теперь закрывает сессию для всех потоков" #: ../../changelog.rst:226 msgid "" "All methods of :any:`Client` and :any:`AsyncClient` now use existing " "session" msgstr "" "Все методы :any:`Client` и :any:`AsyncClient` теперь используют " "существующую сессию" #: ../../changelog.rst:227 msgid "" "Removed :code:`session_factory` attribute and :code:`make_session()` " "method of :any:`Client` and :any:`AsyncClient`" msgstr "" "Удалены аттрибут :code:`session_factory` и метод :code:`make_session()` " "классов :any:`Client` и :any:`AsyncClient`" #: ../../changelog.rst:229 msgid "" "Session class can now be specified as a string (see " ":any:`Client`/:any:`AsyncClient`)" msgstr "" "Класс сессии теперь может быть указан в качестве строки (см. " ":any:`Client`/:any:`AsyncClient`)" #: ../../changelog.rst:230 msgid "" "Added " ":any:`Client.get_device_code()`/:any:`AsyncClient.get_device_code()` " "methods" msgstr "" "Добавлены методы " ":any:`Client.get_device_code()`/:any:`AsyncClient.get_device_code()`" #: ../../changelog.rst:231 msgid "" "Added " ":any:`Client.get_token_from_device_code()`/:any:`AsyncClient.get_token_from_device_code()`" " methods" msgstr "" "Добавлены методы " ":any:`Client.get_token_from_device_code()`/:any:`AsyncClient.get_token_from_device_code()`" #: ../../changelog.rst:232 msgid "" "Added missing :code:`redirect_uri` parameter for " ":any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()` and " ":any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()`" msgstr "" "Добавлен недостающий параметр :code:`redirect_uri` для " ":any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()` и " ":any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()`" #: ../../changelog.rst:234 msgid "" "Added support for PKCE parameters for " ":any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()`, " ":any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()` and " ":any:`Client.get_token()`/:any:`AsyncClient.get_token()`" msgstr "" "Добавлена поддержка параметров PKCE для " ":any:`Client.get_auth_url()`/:any:`AsyncClient.get_auth_url()`, " ":any:`Client.get_code_url()`/:any:`AsyncClient.get_code_url()` и " ":any:`Client.get_token()`/:any:`AsyncClient.get_token()`" #: ../../changelog.rst:237 msgid "Added :code:`scope` attribute for :any:`TokenObject`" msgstr "Добавлен аттрибут :code:`scope` для :any:`TokenObject`" #: ../../changelog.rst:238 msgid "" "Added new exception classes: :any:`InvalidClientError`, " ":any:`InvalidGrantError`, :any:`AuthorizationPendingError`, " ":any:`BadVerificationCodeError` and :any:`UnsupportedTokenTypeError`" msgstr "" "Добавлены новые классы исключений: :any:`InvalidClientError`, " ":any:`InvalidGrantError`, :any:`AuthorizationPendingError`, " ":any:`BadVerificationCodeError` и :any:`UnsupportedTokenTypeError`" #: ../../changelog.rst:242 msgid "**Release 2.0.0 (2023-12-12)**" msgstr "**Release 2.0.0 (2023-12-12)**" #: ../../changelog.rst:244 msgid "" "The library now provides both synchronous and asynchronous APIs (see " ":doc:`/intro` and :doc:`/api_reference/index`)" msgstr "" "Библиотека теперь предоставляет как синхронный, так и асинхронный API " "(см. :doc:`/intro` и :doc:`/api_reference/index`)" #: ../../changelog.rst:246 msgid "" "Multiple HTTP libraries are supported by default (see " ":doc:`/api_reference/sessions` for the full list)" msgstr "" "Теперь поддерживается несколько HTTP библиотек (см. " ":doc:`/api_reference/sessions` для полного списка)" #: ../../changelog.rst:248 msgid "" "It is now possible to add support for any HTTP library (see " ":doc:`/api_reference/session_interface`)" msgstr "" "Теперь возможно добавить поддержку любой HTTP библиотеки (см. " ":doc:`/api_reference/session_interface`)" #: ../../changelog.rst:250 msgid "" "`requests`_ is now an optional dependency (although it's still used by " "default for synchronous API)" msgstr "" "`requests`_ - теперь опциональная зависимость (хотя всё ещё используется " "по умолчанию для синхронного API)" #: ../../changelog.rst:252 msgid "" "Note that now requests-specific arguments must be passed differently (see" " :doc:`/api_reference/sessions`)" msgstr "" "Обратите внимание, что аргументы, специфичные для requests теперь " "передаются по другому (см. :doc:`/api_reference/sessions`)" #: ../../changelog.rst:253 msgid "" "Preferred HTTP client libraries must be explicitly installed now (see " ":doc:`/intro`)" msgstr "" "Предпочитаемые HTTP библиотеки теперь должны быть установлены явным " "образом (см. :doc:`/intro`)" #: ../../changelog.rst:254 msgid "" ":any:`Client.upload()` and :any:`Client.upload_by_link()` can now accept " "a function that returns an iterator (or a generator) as a payload" msgstr "" ":any:`Client.upload()` и :any:`Client.upload_by_link()` теперь могут " "принимать функцию, возвращающую итератор (или генератор) в качестве " "полезной нагрузки" #: ../../changelog.rst:257 msgid "**Release 1.3.4 (2023-10-15)**" msgstr "**Release 1.3.4 (2023-10-15)**" #: ../../changelog.rst:259 msgid "" "`upload()` and `download()` (and related) methods can now upload/download" " non-seekable file-like objects (e.g. `stdin` or `stdout` when open in " "binary mode), see `PR #31`_" msgstr "" "Методы `upload()` и `download()` (и связянные с ними) теперь могут " "загружать/скачивать файлы, не поддерживающие операцию `seek()` (например," " `stdin` и `stdout`, при условии, что они открыты в режиме `\"rb\"` или " "`\"wb\"`), см. `PR #31`_" #: ../../changelog.rst:263 msgid "**Release 1.3.3 (2023-04-22)**" msgstr "**Release 1.3.3 (2023-04-22)**" #: ../../changelog.rst:265 msgid "`app:/` paths now work correctly (see `issue #26`_)" msgstr "Пути вида `app:/` теперь работают правильно (см. `issue #26`_)" #: ../../changelog.rst:267 msgid "**Release 1.3.2 (2023-03-20)**" msgstr "**Release 1.3.2 (2023-03-20)**" #: ../../changelog.rst:269 msgid "Fixed `issue #29`_: TypeError: 'type' object is not subscriptable" msgstr "Исправлено `issue #29`_: TypeError: 'type' object is not subscriptable" #: ../../changelog.rst:271 msgid "**Release 1.3.1 (2023-02-28)**" msgstr "**Release 1.3.1 (2023-02-28)**" #: ../../changelog.rst:273 msgid "" "Fixed `issue #28`_: calling `download_public()` with `path` keyword " "argument raises `TypeError`" msgstr "" "Исправлено `issue #28`_: `TypeError` при вызове `download_public()` с " "параметром `path`" #: ../../changelog.rst:274 msgid "" "Fixed `AttributeError` raised when calling " "`ResourceLinkObject.public_listdir()`" msgstr "" "Исправлено `AttributeError` при вызове " "`ResourceLinkObject.public_listdir()`" #: ../../changelog.rst:276 msgid "**Release 1.3.0 (2023-01-30)**" msgstr "**Release 1.3.0 (2023-01-30)**" #: ../../changelog.rst:278 msgid "" "Added convenience methods to `...Object` objects (e.g. see " "`ResourceObject`)" msgstr "" "Добавлены convenience-методы для объектов `...Object` (например, см. " "`ResourceObject`)" #: ../../changelog.rst:279 msgid "Added type hints" msgstr "Добавлены подсказки типов (type hints)" #: ../../changelog.rst:280 msgid "Improved error checking and response validation" msgstr "Улучшены проверки ошибок и проверка ответа" #: ../../changelog.rst:281 msgid "" "Added `InvalidResponseError`, `PayloadTooLargeError`, " "`UploadTrafficLimitExceededError`" msgstr "" "Добавлены `InvalidResponseError`, `PayloadTooLargeError`, " "`UploadTrafficLimitExceededError`" #: ../../changelog.rst:282 msgid "Added a few missing fields to `DiskInfoObject` and `SystemFoldersObject`" msgstr "" "Добавлено несколько недостающих полей объектов `DiskInfoObject` и " "`SystemFoldersObject`" #: ../../changelog.rst:283 msgid "Added `rename()`, `upload_by_link()` and `download_by_link()` methods" msgstr "Добавлены методы `rename()`, `upload_by_link()` и `download_by_link()`" #: ../../changelog.rst:284 msgid "Added `default_args` field for `YaDisk` object" msgstr "Добавлен аттрибут `default_args` объекта `YaDisk`" #: ../../changelog.rst:285 msgid "`download()` and `upload()` now return `ResourceLinkObject`" msgstr "`download()` и `upload()` теперь возвращают `ResourceLinkObject`" #: ../../changelog.rst:286 msgid "" "Returned `LinkObject` instances have been replaced by more specific " "subclasses" msgstr "" "До этого возвращаемые объекты `LinkObject` были заменены более " "конкретными подклассами" #: ../../changelog.rst:287 msgid ":any:`ConnectionError` now also triggers a retry" msgstr ":any:`ConnectionError` теперь тоже вызывает повторную попытку" #: ../../changelog.rst:289 msgid "**Release 1.2.19 (2023-01-20)**" msgstr "**Release 1.2.19 (2023-01-20)**" #: ../../changelog.rst:291 msgid "" "Fixed incorrect behavior of the fix from 1.2.18 for paths `disk:` and " "`trash:` (only these two)." msgstr "" "Исправлено неправильное поведение фикса из 1.2.18 для путей `disk:` и " "`trash:`." #: ../../changelog.rst:294 msgid "**Release 1.2.18 (2023-01-20)**" msgstr "**Release 1.2.18 (2023-01-20)**" #: ../../changelog.rst:296 msgid "" "Fixed `issue #26`_: ':' character in filenames causes `BadRequestError`. " "This is due the behavior of Yandex.Disk's REST API itself but is avoided " "on the library level with this fix." msgstr "" "Исправлено `issue #26`_: символ ':' в именах файлов приводит к " "`BadRequestError`. Это поведение вызвано работой самого REST API " "Яндекс.Диска, но было исправлено на уровне библиотеки." #: ../../changelog.rst:300 msgid "**Release 1.2.17 (2022-12-11)**" msgstr "**Release 1.2.17 (2022-12-11)**" #: ../../changelog.rst:302 msgid "" "Fixed a minor bug which could cause a `ReferenceError` (which would not " "cause a crash, but still show an error message). The bug involved using " "`__del__()` method in `SelfDestructingSession` to automatically close the" " sessions it seems to affect primarily old Python versions (such as 3.4)." msgstr "" "Исправлен баг, связанный с автоматическим закрытием сессии.Использование " "метода `__del__()` приводило в некоторых случаях к ошибке " "`ReferenceError` (ошибка игнорировалась, но сообщение выводилось).Баг " "проявляется по большей части в старых версиях Python (например 3.4)." #: ../../changelog.rst:308 msgid "**Release 1.2.16 (2022-08-17)**" msgstr "**Release 1.2.16 (2022-08-17)**" #: ../../changelog.rst:310 msgid "" "Fixed a bug in `check_token()`: could throw `ForbiddenError` if the " "application lacks necessary permissions (`issue #23`_)." msgstr "" "Исправлен баг в `check_token()`: функция могла вызвать " ":code:`ForbiddenError`, если у приложения недостатчно прав (`issue " "#23`_)." #: ../../changelog.rst:313 msgid "**Release 1.2.15 (2021-12-31)**" msgstr "**Release 1.2.15 (2021-12-31)**" #: ../../changelog.rst:315 msgid "" "Fixed an issue where `http://` links were not recognized as operation " "links (they were assumed to always be `https://`, since all the other " "requests are always HTTPS). Occasionally, Yandex.Disk can for some reason" " return an `http://` link to an asynchronous operation instead of " "`https://`. Both links are now recognized correctly and an `https://` " "version will always be used by `get_operation_status()`, regardless of " "which one Yandex.Disk returned." msgstr "" "Исправлено: не распознавались ссылки на асинхронные операции, если они " "использовали `http://` (вместо `https://`). Иногда Яндекс.Диск может " "вернуть `http://` ссылку на асинхронную операцию. Теперь обе версии " "ссылок распознаются правильно, при этом, при получении информации об " "операции (через `get_operation_status()`) всегда используется `https://` " "версия ссылки, даже если Яндекс.Диск вернул `http://`." #: ../../changelog.rst:324 msgid "**Release 1.2.14 (2019-03-26)**" msgstr "**Release 1.2.14 (2019-03-26)**" #: ../../changelog.rst:326 msgid "" "Fixed a `TypeError` in `get_public_*` functions when passing `path` " "parameter (see `issue #7`_)" msgstr "" "Исправлена ошибка `TypeError` в функциях `get_public_*` при использовании" " с параметром `path` (`issue #7`_)" #: ../../changelog.rst:328 msgid "Added `unlimited_autoupload_enabled` attribute for `DiskInfoObject`" msgstr "Добавлен аттрибут `unlimited_autoupload_enabled` для `DiskInfoObject`" #: ../../changelog.rst:330 msgid "**Release 1.2.13 (2019-02-23)**" msgstr "**Release 1.2.13 (2019-02-23)**" #: ../../changelog.rst:332 msgid "Added `md5` parameter for `remove()`" msgstr "Добавлен параметр `md5` для `remove()`" #: ../../changelog.rst:333 msgid "Added `UserPublicInfoObject`" msgstr "Добавлен `UserPublicInfoObject`" #: ../../changelog.rst:334 msgid "Added `country` attribute for `UserObject`" msgstr "Добавлен аттрибут `country` для `UserObject`" #: ../../changelog.rst:335 msgid "" "Added `photoslice_time` attribute for `ResourceObject`, " "`PublicResourceObject` and `TrashResourceObject`" msgstr "" "Добавлен аттрибут `photoslice_time` для `ResourceObject`, " "`PublicResourceObject` и `TrashResourceObject`" #: ../../changelog.rst:338 msgid "**Release 1.2.12 (2018-10-11)**" msgstr "**Release 1.2.12 (2018-10-11)**" #: ../../changelog.rst:340 msgid "Fixed `fields` parameter not working properly in `listdir()` (`issue #4`_)" msgstr "Исправлен баг: не работает параметр `fields` в `listdir()` (`issue #4`_)" #: ../../changelog.rst:342 msgid "**Release 1.2.11 (2018-06-30)**" msgstr "**Release 1.2.11 (2018-06-30)**" #: ../../changelog.rst:344 msgid "Added the missing parameter `sort` for `get_meta()`" msgstr "Добавлен недостающий параметр `sort` для `get_meta()`" #: ../../changelog.rst:345 msgid "" "Added `file` and `antivirus_status` attributes for `ResourceObject`, " "`PublicResourceObject` and `TrashResourceObject`" msgstr "" "Добавлены аттрибуты `file` и `antivirus_status` для `ResourceObject`, " "`PublicResourceObject` и `TrashResourceObject`" #: ../../changelog.rst:347 msgid "Added `headers` parameter" msgstr "Добавлен параметр `headers`" #: ../../changelog.rst:348 msgid "Fixed a typo in `download()` and `download_public()` (`issue #2`_)" msgstr "Исправлена опечатка в `download()` и `download_public()` (`issue #2`_)" #: ../../changelog.rst:349 msgid "Removed `*args` parameter everywhere" msgstr "Убран параметр `*args`" #: ../../changelog.rst:351 msgid "**Release 1.2.10 (2018-06-14)**" msgstr "**Release 1.2.10 (2018-06-14)**" #: ../../changelog.rst:353 msgid "" "Fixed `timeout=None` behavior. `None` is supposed to mean 'no timeout' " "but in the older versions it was synonymous with the default timeout." msgstr "" "Исправлено поведение `timeout=None`. `None` должен означать 'без " "таймаута', но в предыдущих версиях значение `None` было синонимично со " "стандартным таймаутом." #: ../../changelog.rst:356 msgid "**Release 1.2.9 (2018-04-28)**" msgstr "**Release 1.2.9 (2018-04-28)**" #: ../../changelog.rst:358 msgid "Changed the license to LGPLv3 (see `COPYING` and `COPYING.lesser`)" msgstr "Изменена лицензия на LGPLv3 (см. `COPYING` и `COPYING.lesser`)" #: ../../changelog.rst:359 msgid "Other package info updates" msgstr "Другие изменения информации о пакете" #: ../../changelog.rst:361 msgid "**Release 1.2.8 (2018-04-17)**" msgstr "**Release 1.2.8 (2018-04-17)**" #: ../../changelog.rst:363 msgid "" "Fixed a couple of typos: `PublicResourceListObject.items` and " "`TrashResourceListObject.items` had wrong types" msgstr "" "Исправлено несколько опечаток: у `PublicResourceListObject.items` и " "`TrashResourceListObject.items` были неправильные типы данных" #: ../../changelog.rst:365 msgid "" "Substitute field aliases in `fields` parameter when performing API " "requests (e.g. `embedded` -> `_embedded`)" msgstr "" "Псевдонимы полей в параметре `fields` заменяются при выполнении запросов " "API (например, `embedded` -> `_embedded`)" #: ../../changelog.rst:368 msgid "**Release 1.2.7 (2018-04-15)**" msgstr "**Release 1.2.7 (2018-04-15)**" #: ../../changelog.rst:370 msgid "Fixed a file rewinding bug when uploading/downloading files after a retry" msgstr "" "Исправлен баг перемотки файла при загрузке/скачивании после повторной " "попытки" #: ../../changelog.rst:372 msgid "**Release 1.2.6 (2018-04-13)**" msgstr "**Release 1.2.6 (2018-04-13)**" #: ../../changelog.rst:374 msgid "" "Now caching `requests` sessions so that open connections can be reused " "(which can significantly speed things up sometimes)" msgstr "" "Теперь объекты сессий `requests` кэшируются, чтобы их можно было " "переиспользовать (иногда может существенно ускорить выполнение запросов)" #: ../../changelog.rst:376 msgid "Disable `keep-alive` when uploading/downloading files by default" msgstr "`keep-alive` отключается при загрузке/скачивании файлов по умолчанию" #: ../../changelog.rst:378 msgid "**Release 1.2.5 (2018-03-31)**" msgstr "**Release 1.2.5 (2018-03-31)**" #: ../../changelog.rst:380 msgid "" "Fixed an off-by-one bug in `utils.auto_retry()` (which could sometimes " "result in `AttributeError`)" msgstr "" "Исправлен баг (ошибка на единицу) в `utils.auto_retry()` (иногда мог " "вызвать `AttributeError`)" #: ../../changelog.rst:382 msgid "" "Retry the whole request for `upload()`, `download()` and " "`download_public()`" msgstr "" "Повторные попытки применяются для `upload()`, `download()` и " "`download_public()` целиком" #: ../../changelog.rst:383 msgid "Set `stream=True` for `download()` and `download_public()`" msgstr "Задано `stream=True` для `download()` и `download_public()`" #: ../../changelog.rst:384 msgid "Other minor fixes" msgstr "Другие мелкие исправления" #: ../../changelog.rst:386 msgid "**Release 1.2.4 (2018-02-19)**" msgstr "**Release 1.2.4 (2018-02-19)**" #: ../../changelog.rst:388 msgid "" "Fixed `TokenObject` having `exprires_in` instead of `expires_in` (fixed a" " typo)" msgstr "" "Исправлена опечатка (`TokenObject.exprires_in` -> " "`TokenObject.expires_in`)" #: ../../changelog.rst:390 msgid "**Release 1.2.3 (2018-01-20)**" msgstr "**Release 1.2.3 (2018-01-20)**" #: ../../changelog.rst:392 msgid "Fixed a `TypeError` when `WrongResourceTypeError` is raised" msgstr "Исправлено `TypeError` при вызове `WrongResourceTypeError`" #: ../../changelog.rst:394 msgid "**Release 1.2.2 (2018-01-19)**" msgstr "**Release 1.2.2 (2018-01-19)**" #: ../../changelog.rst:396 msgid "`refresh_token()` no longer requires a valid or empty token." msgstr "`refresh_token()` больше не требует валидный или пустой токен." #: ../../changelog.rst:398 msgid "**Release 1.2.1 (2018-01-14)**" msgstr "**Release 1.2.1 (2018-01-14)**" #: ../../changelog.rst:400 msgid "Fixed auto retries not working. Whoops." msgstr "Исправлена неработоспособность повторных попыток." #: ../../changelog.rst:402 msgid "**Release 1.2.0 (2018-01-14)**" msgstr "**Release 1.2.0 (2018-01-14)**" #: ../../changelog.rst:404 msgid "" "Fixed passing `n_retries=0` to `upload()`, `download()` and " "`download_public()`" msgstr "" "Исправлено использование `n_retries=0` в `upload()`, `download()` и " "`download_public()`" #: ../../changelog.rst:406 msgid "" "`upload()`, `download()` and `download_public()` no longer return " "anything (see the docs)" msgstr "" "`upload()`, `download()` и `download_public()` больше не возвращают " "ничего (см. документацию)" #: ../../changelog.rst:408 msgid "Added `utils` module (see the docs)" msgstr "Добавлен модуль `utils` (см. документацию)" #: ../../changelog.rst:409 msgid "" "Added `RetriableYaDiskError`, `WrongResourceTypeError`, `BadGatewayError`" " and `GatewayTimeoutError`" msgstr "" "Добавлены `RetriableYaDiskError`, `WrongResourceTypeError`, " "`BadGatewayError` и `GatewayTimeoutError`" #: ../../changelog.rst:411 msgid "" "`listdir()` now raises `WrongResourceTypeError` instead of " "`NotADirectoryError`" msgstr "" "`listdir()` теперь вызывает `WrongResourceTypeError` вместо " "`NotADirectoryError`" #: ../../changelog.rst:414 msgid "**Release 1.1.1 (2017-12-29)**" msgstr "**Release 1.1.1 (2017-12-29)**" #: ../../changelog.rst:416 msgid "" "Fixed argument handling in `upload()`, `download()` and " "`download_public()`. Previously, passing `n_retries` and `retry_interval`" " would raise an exception (`TypeError`)." msgstr "" "Исправлена обработка аргументов в `upload()`, `download()` и " "`download_public()`. До этого использование `n_retries` и " "`retry_interval` вызывало исключение (`TypeError`)." #: ../../changelog.rst:419 msgid "**Release 1.1.0 (2017-12-27)**" msgstr "**Release 1.1.0 (2017-12-27)**" #: ../../changelog.rst:421 msgid "Better exceptions (see the docs)" msgstr "Усовершенствованные исключения (см. документацию)" #: ../../changelog.rst:422 msgid "Added support for `force_async` parameter" msgstr "Добавлена поддержка параметра `force_async`" #: ../../changelog.rst:423 msgid "Minor bug fixes" msgstr "Мелкие исправления багов" #: ../../changelog.rst:425 msgid "**Release 1.0.8 (2017-11-29)**" msgstr "**Release 1.0.8 (2017-11-29)**" #: ../../changelog.rst:427 msgid "Fixed yet another `listdir()` bug" msgstr "Исправлен ещё один баг в `listdir()`" #: ../../changelog.rst:429 msgid "**Release 1.0.7 (2017-11-04)**" msgstr "**Release 1.0.7 (2017-11-04)**" #: ../../changelog.rst:431 msgid "Added `install_requires` argument to `setup.py`" msgstr "Добавлен `install_requires` в `setup.py`" #: ../../changelog.rst:433 msgid "**Release 1.0.6 (2017-11-04)**" msgstr "**Release 1.0.6 (2017-11-04)**" #: ../../changelog.rst:435 msgid "Return `OperationLinkObject` in some functions" msgstr "Некоторые функции теперь возвращают `OperationLinkObject`" #: ../../changelog.rst:437 msgid "**Release 1.0.5 (2017-10-29)**" msgstr "**Release 1.0.5 (2017-10-29)**" #: ../../changelog.rst:439 msgid "Fixed `setup.py` to exclude tests" msgstr "Исправлен `setup.py`, теперь исключает тесты" #: ../../changelog.rst:441 msgid "**Release 1.0.4 (2017-10-23)**" msgstr "**Release 1.0.4 (2017-10-23)**" #: ../../changelog.rst:443 msgid "Fixed bugs in `upload`, `download` and `listdir` functions" msgstr "Исправлены баги в `upload`, `download` и `listdir`" #: ../../changelog.rst:444 msgid "Set default `listdir` `limit` to `10000`" msgstr "Значение по-умолчанию `limit` в `listdir` установлено в `10000`" #: ../../changelog.rst:446 msgid "**Release 1.0.3 (2017-10-22)**" msgstr "**Release 1.0.3 (2017-10-22)**" #: ../../changelog.rst:448 msgid "Added settings" msgstr "Добавлен модуль `settings`" #: ../../changelog.rst:450 msgid "**Release 1.0.2 (2017-10-19)**" msgstr "**Release 1.0.2 (2017-10-19)**" #: ../../changelog.rst:452 msgid "Fixed `get_code_url` function (added missing parameters)" msgstr "Исправлена функция `get_code_url` (добавлены недостающие параметры)" #: ../../changelog.rst:454 msgid "**Release 1.0.1 (2017-10-18)**" msgstr "**Release 1.0.1 (2017-10-18)**" #: ../../changelog.rst:456 msgid "Fixed a major bug in `GetTokenRequest` (added missing parameter)" msgstr "" "Исправлен серьёзный баг в `GetTokenRequest` (добавлен недостающий " "параметр)" #: ../../changelog.rst:458 msgid "**Release 1.0.0 (2017-10-18)**" msgstr "**Release 1.0.0 (2017-10-18)**" #: ../../changelog.rst:460 msgid "Initial release" msgstr "Первый релиз" #~ msgid "" #~ ":any:`Client.upload()` and :any:`Client.upload_by_link()`" #~ " can now accept a function that " #~ "returns an iterator (or a generator)" #~ msgstr "" #~ msgid "Fix a bug where POST request parameters were not encoded correctly" #~ msgstr "" #~ msgid "" #~ "**Release 3.0.1 (2024-07-09)** * Fixed " #~ "broken :code:`pyproject.toml` that did not " #~ "include full package contents" #~ msgstr "" ================================================ FILE: docs/locales/ru/LC_MESSAGES/index.po ================================================ # index.rst translations. # Copyright (C) 2023, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2023. # msgid "" msgstr "" "Project-Id-Version: YaDisk 2.0.0\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2021-12-31 14:42+0500\n" "PO-Revision-Date: 2023-12-12 19:59+0500\n" "Last-Translator: Ivan Konovalov \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" #: ../../index.rst:9 msgid "Contents:" msgstr "Содержание:" #: ../../index.rst:7 msgid "Welcome to YaDisk's documentation!" msgstr "Документация YaDisk" #: ../../index.rst:18 msgid "Indices and tables" msgstr "Индексы и таблицы" #: ../../index.rst:20 msgid ":ref:`genindex`" msgstr ":ref:`genindex`" #: ../../index.rst:21 msgid ":ref:`modindex`" msgstr ":ref:`modindex`" #: ../../index.rst:22 msgid ":ref:`search`" msgstr ":ref:`search`" ================================================ FILE: docs/locales/ru/LC_MESSAGES/intro.po ================================================ # intro.rst translations. # Copyright (C) 2023, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2023. # msgid "" msgstr "" "Project-Id-Version: YaDisk 2.0.0\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2025-07-09 17:39+0500\n" "PO-Revision-Date: 2023-12-12 20:02+0500\n" "Last-Translator: Ivan Konovalov \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.17.0\n" #: ../../intro.rst:2 msgid "Introduction" msgstr "Введение" #: ../../intro.rst:4 msgid "YaDisk is a Yandex.Disk REST API client library." msgstr "YaDisk - это библиотека-клиент REST API Яндекс.Диска." #: ../../intro.rst:7 msgid "Installation" msgstr "Установка" #: ../../intro.rst:9 msgid "" ":code:`yadisk` supports multiple HTTP client libraries and has both " "synchronous and asynchronous API." msgstr "" ":code:`yadisk` поддерживает несколько HTTP библиотек и реализует " "одновременно как синхронный, так и асинхронный API." #: ../../intro.rst:12 msgid "The following HTTP client libraries are currently supported:" msgstr "На данный момент поддерживаются следующие HTTP библиотеки:" #: ../../intro.rst:14 msgid ":code:`requests` (used by default for synchronous API)" msgstr ":code:`requests` (используется по умолчанию для синхронного API)" #: ../../intro.rst:15 msgid "" ":code:`httpx` (both synchronous and asynchronous, used by default for " "asynchronous API)" msgstr "" ":code:`httpx` (синхронный и асинхронный API, используется по умолчанию " "для асинхронного API)" #: ../../intro.rst:16 msgid ":code:`aiohttp` (asynchronous only)" msgstr ":code:`aiohttp` (асинхронный API)" #: ../../intro.rst:17 msgid ":code:`pycurl` (synchronous only)" msgstr ":code:`pycurl` (синхронный API)" #: ../../intro.rst:19 msgid "For synchronous API (installs :code:`requests`):" msgstr "Для синхронного API (устанавливает :code:`requests`):" #: ../../intro.rst:25 msgid "For asynchronous API (installs :code:`aiofiles` and :code:`httpx`):" msgstr "Для асинхронного API (устанавливает :code:`httpx` и :code:`aiofiles`):" #: ../../intro.rst:31 msgid "" "Alternatively, you can manually choose which optional libraries to " "install:" msgstr "Вы можете также вручную установить нужные библиотеки:" #: ../../intro.rst:42 msgid "Links to Official Yandex.Disk REST API Docs" msgstr "Ссылки на официальную документацию REST API Яндекс.Диска" #: ../../intro.rst:44 msgid "`Official Yandex.Disk REST API Docs `__" msgstr "`Официальная документация REST API Яндекс.Диска `__" #: ../../intro.rst:45 msgid "`Polygon `__" msgstr "`Полигон `__" #: ../../intro.rst:48 msgid "Examples" msgstr "Примеры" #: ../../intro.rst:51 msgid "Synchronous API" msgstr "Синхронный API" #: ../../intro.rst:89 ../../intro.rst:264 msgid "Receiving token with confirmation code" msgstr "Получение токена через код подтверждения" #: ../../intro.rst:119 ../../intro.rst:295 msgid "Recursive upload" msgstr "Рекурсивная загрузка файлов" #: ../../intro.rst:153 ../../intro.rst:364 msgid "Setting custom properties of files" msgstr "Задание пользовательских свойств файлов" #: ../../intro.rst:182 ../../intro.rst:394 msgid "Emptying the trash bin" msgstr "Очищение корзины" #: ../../intro.rst:206 ../../intro.rst:419 msgid "Specifying HTTP client library" msgstr "Выбор HTTP библиотеки" #: ../../intro.rst:217 msgid "Asynchronous API" msgstr "Асинхронный API" ================================================ FILE: docs/locales/ru/LC_MESSAGES/known_issues.po ================================================ # known_issues.rst translations. # Copyright (C) 2025, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2025. # msgid "" msgstr "" "Project-Id-Version: YaDisk 3.2.0\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2025-04-29 18:00+0500\n" "PO-Revision-Date: 2023-12-12 20:03+0500\n" "Last-Translator: Ivan Konovalov \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.17.0\n" #: ../../known_issues.rst:2 msgid "Known Issues" msgstr "Известные проблемы" #: ../../known_issues.rst:5 msgid "Very Slow Upload of Certain Types of Files" msgstr "Очень медленная загрузка некоторых типов файлов на Яндекс.Диск" #: ../../known_issues.rst:7 msgid "" "Yandex.Disk's REST API limits upload speeds up to 128 KiB/s for certain " "MIME types of files. More specifically, throttling takes place based on " "value of :code:`media_type` (see :any:`yadisk.Client.get_meta`). It " "appears there are 3 types of media types that are throttled:" msgstr "" "REST API Яндекс.Диск ограничивает скорость загрузки файлов на Диск до 128" " KiB/s для определенных MIME типов файлов. Если быть точнее, троттлинг " "осуществляется в зависимости от значения :code:`media_type` (см. " ":any:`yadisk.Client.get_meta`). Судя по всему ограничение скорости " "действует на 3 типа файлов (media type):" #: ../../known_issues.rst:12 msgid ":code:`data` (.db, .dat, etc.)" msgstr ":code:`data` (.db, .dat, etc.)" #: ../../known_issues.rst:13 msgid ":code:`compressed` (.zip, .gz, .tgz, .rar, .etc)" msgstr ":code:`compressed` (.zip, .gz, .tgz, .rar, .etc)" #: ../../known_issues.rst:14 msgid ":code:`video` (.3gp, .mp4, .avi, etc.)" msgstr ":code:`video` (.3gp, .mp4, .avi, etc.)" #: ../../known_issues.rst:16 msgid "" "This behavior of throttling is predetermined at the moment of requesting " "an upload link (with :any:`yadisk.Client.get_upload_link`). The content " "of the uploaded file does not matter." msgstr "" "Ограничение скорости предопределяется в момент получения ссылки для " "загрузки файла на диск (см. :any:`yadisk.Client.get_upload_link`). " "Содержимое загружаемого файла не имеет значения." #: ../../known_issues.rst:20 msgid "" "The reason why this problem cannot be observed when uploading through the" " official website, is that this throttling does not apply to internal " "services (the Yandex.Disk website uses an intermediate internal API to " "obtain upload links)." msgstr "" "Причина, по которой эта проблема не наблюдается при попытке загрузить " "файл через официальный сайт, заключается в том, что ограничение скорости " "не применяется для внутренних сервисов (сайт Яндекс.Диска использует " "промежуточный внутренний API для получения ссылок)." #: ../../known_issues.rst:24 msgid "" "While it is not clear what the purpose of this throttling is, it is " "certain at this point that this is not a bug." msgstr "Хотя и не понятно, в чем смысл такого ограничения, это точно не баг." #: ../../known_issues.rst:27 msgid "" "One workaround is to upload files with changed filename extensions (or " "without them entirely). For example, if you want to upload a file named " ":code:`\"my_database.db\"`, you can initially upload it under the name " ":code:`\"my_database.some_other_extension\"` and then rename it back to " ":code:`\"my_database.db\"`." msgstr "" "Один из способов обхода данной проблемы - это загрузка " "файлов с измененным расширением (или без расширения). Например, если вы " "хотите загрузить на Диск файл :code:`\"my_database.db\"`, вы можете изначально " "загрузить его под именем :code:`\"my_database.some_other_extension\"` и после " "загрузки переименовать обратно в :code:`\"my_database.db\"`." #: ../../known_issues.rst:32 msgid "" "Another workaround is to spoof user agent (see `PR#57 " "`_). Starting with version " ":code:`3.3.0`, the user agent is spoofed by default (see " ":any:`yadisk.Client.get_upload_link()`'s :code:`spoof_user_agent` " "parameter)." msgstr "Другой способ - это спуфинг строки user-agent (см. `PR#57 " "`_). Начиная с версии :code:`3.3.0`, " "спуфинг строки user-agent включен по умолчанию (см. параметр " ":code:`spoof_user_agent` метода :any:`yadisk.Client.get_upload_link()`)." #: ../../known_issues.rst:37 msgid "Low Upload Speed on Windows When Using requests" msgstr "" "Низкая скорость загрузки файлов на Диск под Windows при использовании " "requests" #: ../../known_issues.rst:42 msgid "" "If you use `requests`_ and experience low upload speeds on Windows, the " "reason might be due to Python's standard library internally using " ":code:`select()` to wait for sockets. The best way around it is to use a " "different HTTP library (e.g. `httpx`_, see " ":doc:`/api_reference/sessions`)" msgstr "" "Если вы используете `requests`_ и столкнулись с низкой скоростью загрузки" " файлов на Диск под Windows, то причиной может быть стандартная " "библиотека Python, которая внутри использует :code:`select()` для " "ожидания сокетов. Наилучшее решение этой проблемы - это использовать " "другую HTTP библиотеку (например, `httpx`_, см. " ":doc:`/api_reference/sessions`)" ================================================ FILE: docs/locales/ru/LC_MESSAGES/migration_guide.po ================================================ # migration_guide.rst translations. # Copyright (C) 2024, Ivan Konovalov # This file is distributed under the same license as the YaDisk package. # Ivan Konovalov , 2024. # msgid "" msgstr "" "Project-Id-Version: YaDisk 3.0.0\n" "Report-Msgid-Bugs-To: ivknv0@gmail.com\n" "POT-Creation-Date: 2024-07-04 22:17+0500\n" "PO-Revision-Date: 2024-07-05 02:01+0500\n" "Last-Translator: Ivan Konovalov \n" "Language: ru\n" "Language-Team: ru \n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.15.0\n" #: ../../migration_guide.rst:2 msgid "Migration Guide" msgstr "Руководство по миграции" #: ../../migration_guide.rst:5 msgid "Migrating From 2.x to 3.x" msgstr "Миграция с 2.x на 3.x" #: ../../migration_guide.rst:8 msgid "Waiting for asynchronous operations to complete" msgstr "Ожидание завершения асинхронной операции" #: ../../migration_guide.rst:10 msgid "" "Starting with the version 3.0.0, the following methods will automatically" " wait for the asynchronous operation to complete:" msgstr "Начиная с версии 3.0.0, следующие методы автоматически ожидают " "завершения асинхронной операции:" #: ../../migration_guide.rst:13 msgid ":any:`Client.copy()`, :any:`AsyncClient.copy()`" msgstr ":any:`Client.copy()`, :any:`AsyncClient.copy()`" #: ../../migration_guide.rst:14 msgid ":any:`Client.move()`, :any:`AsyncClient.move()`" msgstr ":any:`Client.move()`, :any:`AsyncClient.move()`" #: ../../migration_guide.rst:15 msgid ":any:`Client.remove()`, :any:`AsyncClient.remove()`" msgstr ":any:`Client.remove()`, :any:`AsyncClient.remove()`" #: ../../migration_guide.rst:16 msgid ":any:`Client.remove_trash()`, :any:`AsyncClient.remove_trash()`" msgstr ":any:`Client.remove_trash()`, :any:`AsyncClient.remove_trash()`" #: ../../migration_guide.rst:17 msgid ":any:`Client.rename()`, :any:`AsyncClient.rename()`" msgstr ":any:`Client.rename()`, :any:`AsyncClient.rename()`" #: ../../migration_guide.rst:18 msgid ":any:`Client.restore_trash()`, :any:`AsyncClient.restore_trash()`" msgstr ":any:`Client.restore_trash()`, :any:`AsyncClient.restore_trash()`" #: ../../migration_guide.rst:19 msgid ":any:`Client.save_to_disk()`, :any:`AsyncClient.save_to_disk()`" msgstr ":any:`Client.save_to_disk()`, :any:`AsyncClient.save_to_disk()`" #: ../../migration_guide.rst:20 msgid ":any:`Client.upload_url()`, :any:`AsyncClient.upload_url()`." msgstr ":any:`Client.upload_url()`, :any:`AsyncClient.upload_url()`." #: ../../migration_guide.rst:22 msgid "" "This new behavior is controlled by the :code:`wait` parameter, which " "defaults to :code:`True`. Waiting is performed by repeatedly checking the" " operation status (see :any:`Client.get_operation_status()` and " ":any:`Client.wait_for_operation()`) and calling :any:`time.sleep` / " ":any:`asyncio.sleep`. If this parameter is explicitly set to " ":code:`False`, no additional waiting is performed, this matches the old " "behavior." msgstr "Новое поведение контролируется параметром :code:`wait`, который по " "умолчанию задан как :code:`True`. Ожидание осуществляется за счёт периодической " "проверки статуса операции (см. :any:`Client.get_operation_status()` и " ":any:`Client.wait_for_operation()`) и вызова :any:`time.sleep` / " ":any:`asyncio.sleep`. Если этот параметр установлен в значение :code:`False`, " "ожидание операции не будет выполнено, это соответствует старому поведению." #: ../../migration_guide.rst:31 msgid "" "If :code:`wait=True` is set, there is a possibility of getting an " ":any:`AsyncOperationFailedError`, though this is very unlikely in " "practice." msgstr "Если :code:`wait=True`, то существует вероятность получить " ":any:`AsyncOperationFailedError`, хотя это маловероятно на практике." #: ../../migration_guide.rst:34 msgid "" "For more details, see documentation for any of the above-mentioned " "methods." msgstr "См. документацию для вышеупомянутых методов для дополнительных " "подробностей." #: ../../migration_guide.rst:37 msgid "Iterating over AsyncClient.listdir()" msgstr "Итерация по AsyncClient.listdir()" #: ../../migration_guide.rst:39 msgid "" "Iterating over the result of :any:`AsyncClient.listdir()` no longer " "requires the additional :code:`await` keyword:" msgstr "Итерация по результату :any:`AsyncClient.listdir()` больше не требует " "дополнительного ключевого слова :code:`await`:" #: ../../migration_guide.rst:54 msgid "Changes with get_files()" msgstr "Изменения, касающиеся get_files()" #: ../../migration_guide.rst:56 msgid "" "Before the version 3.0.0, :any:`Client.get_files()` / " ":any:`AsyncClient.get_files()` would return up to :code:`limit` files, " "unless it was set to :code:`None`, in which case it would return all of " "them." msgstr "До версии 3.0.0., :any:`Client.get_files()` / " ":any:`AsyncClient.get_files()` возвращал не более :code:`limit` файлов, " "если :code:`limit != None`, иначе метод возвращал все файлы." #: ../../migration_guide.rst:60 msgid "" "Starting with the version 3.0.0, to control the number of returned files," " a new parameter :code:`max_items` is introduced. :code:`limit` only " "affects the number of files queried by a single request (requests are " "sent until :code:`max_items` files are obtained or end of the list is " "reached). This new behavior is consistent with :any:`Client.listdir()` / " ":any:`AsyncClient.listdir()`." msgstr "Начиная с версии 3.0.0, для контроля числа возвращённых файлов " "доступен новый параметр :code:`max_items`. :code:`limit` влияет только на " "количество файлов, запрашиваемых одним запросом (запросы отправляются до тех " "пор, пока не получено :code:`max_items` файлов или достигнут конец списка). " "Новое поведение соответствует :any:`Client.listdir()` / " ":any:`AsyncClient.listdir()`." #: ../../migration_guide.rst:68 msgid "get_last_uploaded() returns a list instead of a generator" msgstr "get_last_uploaded() возвращает список вместо генератора" #: ../../migration_guide.rst:70 msgid "" "Starting with the version 3.0.0, :any:`Client.get_last_uploaded()` / " ":any:`AsyncClient.get_last_uploaded()` return a list of files instead of " "a generator." msgstr "Начиная с версии 3.0.0, :any:`Client.get_last_uploaded()` / " ":any:`AsyncClient.get_last_uploaded()` возвращает список файлов вместо " "генератора." #: ../../migration_guide.rst:75 msgid "Changes with the Session interface" msgstr "Изменения интерфейса Session" #: ../../migration_guide.rst:77 msgid "In version 3.0.0, the following methods were removed:" msgstr "В версии 3.0.0 были удалены следующие методы:" #: ../../migration_guide.rst:79 msgid ":code:`Session.set_token()`, :code:`AsyncSession.set_token()`" msgstr ":code:`Session.set_token()`, :code:`AsyncSession.set_token()`" #: ../../migration_guide.rst:80 msgid ":code:`Session.set_headers()`, :code:`AsyncSession.set_headers()`." msgstr ":code:`Session.set_headers()`, :code:`AsyncSession.set_headers()`." #: ../../migration_guide.rst:82 msgid "" "Starting with the version 3.0.0, all HTTP headers (including the " ":code:`Authorization` header) are explicitly passed to " ":any:`Session.send_request()` / :any:`AsyncSession.send_request()`." msgstr "Начиная с версии 3.0.0, все заголовки HTTP запросов (включая заголовок " ":code:`Authorization`) передаются явным образом напрямую в " ":any:`Session.send_request()` / :any:`AsyncSession.send_request()`." #: ../../migration_guide.rst:87 msgid "Some methods no longer accept the fields parameter" msgstr "Некоторые методы больше не принимают параметр fields" #: ../../migration_guide.rst:89 msgid "" "Prior to version 3.0.0, the following methods used to accept the optional" " :code:`fields` parameter:" msgstr "До версии 3.0.0, следующие методы принимали опциональный параметр " ":code:`fields`:" #: ../../migration_guide.rst:92 msgid "" ":any:`Client.get_operation_status()`, " ":any:`AsyncClient.get_operation_status()`" msgstr "" ":any:`Client.get_operation_status()`, " ":any:`AsyncClient.get_operation_status()`" #: ../../migration_guide.rst:93 msgid ":any:`Client.get_download_link()`, :any:`AsyncClient.get_download_link()`" msgstr ":any:`Client.get_download_link()`, :any:`AsyncClient.get_download_link()`" #: ../../migration_guide.rst:94 msgid "" ":any:`Client.get_public_download_link()`, " ":any:`AsyncClient.get_public_download_link()`" msgstr "" ":any:`Client.get_public_download_link()`, " ":any:`AsyncClient.get_public_download_link()`" #: ../../migration_guide.rst:95 msgid ":any:`Client.get_upload_link()`, :any:`AsyncClient.get_upload_link()`." msgstr ":any:`Client.get_upload_link()`, :any:`AsyncClient.get_upload_link()`." #: ../../migration_guide.rst:98 msgid "Migrating From 1.x to 2.x" msgstr "Миграция с 1.x на 2.x" #: ../../migration_guide.rst:101 msgid "Merge with yadisk-async" msgstr "Слияние с yadisk-async" #: ../../migration_guide.rst:103 msgid "" "Starting with version 2.0.0, the library provides both synchronous and " "asynchronous APIs." msgstr "Начиная с версии 2.0.0, библиотека предоставляет как синхронный, так и " "асинхронный интерфейсы." #: ../../migration_guide.rst:107 msgid "Changes to exception handling" msgstr "Изменения в обработке исключений" #: ../../migration_guide.rst:109 msgid "" "Starting with version 2.0.0, all exceptions raised by :any:`Client` and " ":any:`AsyncClient` are derived from :any:`YaDiskError`. Exceptions from " "underlying dependencies (e.g. :code:`requests` or :code:`aiohttp`) are " "converted to :any:`RequestError`. A non-exhaustive list of possible " "exceptions is provided by the documentation for :any:`Client` and " ":any:`AsyncClient`. More details about exceptions are available in " "documentation for each specific API method." msgstr "Начиная с версии 2.0.0, все исключения, вызванные :any:`Client` и " ":any:`AsyncClient` наследуются от :any:`YaDiskError`. Исключения от " "нижележащих зависимостей (например, :code:`requests` или :code:`aiohttp`) " "преобразуются в :any:`RequestError`. Частичный список возможных исключений " "приведён в документации для :any:`Client` и :any:`AsyncClient`. Дополнительные " "подробности доступны для каждого отдельного метода API." #: ../../migration_guide.rst:118 msgid "requests and aiohttp are optional dependencies" msgstr "requests и aiohttp - теперь опциональные зависимости" #: ../../migration_guide.rst:120 msgid "" "Prior to version 2.0.0, :code:`requests` was listed as a dependency (and " ":code:`aiohttp` was listed as a dependency for :code:`yadisk-async`). " ":code:`requests` is still used by default but must be explicitly " "installed. As for the asynchronous API, :code:`httpx` is used by default," " instead of :code:`aiohttp`. There are now multiple supported HTTP client" " libraries." msgstr "До версии 2.0.0, :code:`requests` была указана в качестве обязательной " "зависимости (и :code:`aiohttp` была указана как зависимость для " ":code:`yadisk-async`). Библиотека :code:`requests` всё ещё используется по " "умолчанию, но должна быть явным образом установлена. Что касается асинхронного " "API, по умолчанию теперь используется :code:`httpx`, вместо :code:`aiohttp`. " "Поддерживается несколько библиотек HTTP." #: ../../migration_guide.rst:126 msgid "" "See :doc:`/api_reference/sessions` for a full list of supported HTTP " "client libraries and :doc:`/intro` for installation instructions." msgstr "См. :doc:`/api_reference/sessions` для полного списка поддерживаемых " "библиотек HTTP и :doc:`/intro` для инструкции по установке." ================================================ FILE: docs/make.bat ================================================ @ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=python -msphinx ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=YaDisk if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The Sphinx module was not found. Make sure you have Sphinx installed, echo.then set the SPHINXBUILD environment variable to point to the full echo.path of the 'sphinx-build' executable. Alternatively you may add the echo.Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd ================================================ FILE: docs/migration_guide.rst ================================================ Migration Guide =============== Migrating From 2.x to 3.x ######################### Waiting for asynchronous operations to complete ----------------------------------------------- Starting with the version 3.0.0, the following methods will automatically wait for the asynchronous operation to complete: * :any:`Client.copy()`, :any:`AsyncClient.copy()` * :any:`Client.move()`, :any:`AsyncClient.move()` * :any:`Client.remove()`, :any:`AsyncClient.remove()` * :any:`Client.remove_trash()`, :any:`AsyncClient.remove_trash()` * :any:`Client.rename()`, :any:`AsyncClient.rename()` * :any:`Client.restore_trash()`, :any:`AsyncClient.restore_trash()` * :any:`Client.save_to_disk()`, :any:`AsyncClient.save_to_disk()` * :any:`Client.upload_url()`, :any:`AsyncClient.upload_url()`. This new behavior is controlled by the :code:`wait` parameter, which defaults to :code:`True`. Waiting is performed by repeatedly checking the operation status (see :any:`Client.get_operation_status()` and :any:`Client.wait_for_operation()`) and calling :any:`time.sleep` / :any:`asyncio.sleep`. If this parameter is explicitly set to :code:`False`, no additional waiting is performed, this matches the old behavior. .. note:: If :code:`wait=True` is set, there is a possibility of getting an :any:`AsyncOperationFailedError`, though this is very unlikely in practice. For more details, see documentation for any of the above-mentioned methods. Iterating over AsyncClient.listdir() ------------------------------------ Iterating over the result of :any:`AsyncClient.listdir()` no longer requires the additional :code:`await` keyword: .. code:: python async with yadisk.AsyncClient(token=...) as client: # yadisk 3.x async for resource in client.listdir(): do_something(resource) # yadisk 2.x, no longer valid, will not work async for resource in await client.listdir(): do_something(resource) Changes with get_files() ------------------------ Before the version 3.0.0, :any:`Client.get_files()` / :any:`AsyncClient.get_files()` would return up to :code:`limit` files, unless it was set to :code:`None`, in which case it would return all of them. Starting with the version 3.0.0, to control the number of returned files, a new parameter :code:`max_items` is introduced. :code:`limit` only affects the number of files queried by a single request (requests are sent until :code:`max_items` files are obtained or end of the list is reached). This new behavior is consistent with :any:`Client.listdir()` / :any:`AsyncClient.listdir()`. get_last_uploaded() returns a list instead of a generator --------------------------------------------------------- Starting with the version 3.0.0, :any:`Client.get_last_uploaded()` / :any:`AsyncClient.get_last_uploaded()` return a list of files instead of a generator. Changes with the Session interface ---------------------------------- In version 3.0.0, the following methods were removed: * :code:`Session.set_token()`, :code:`AsyncSession.set_token()` * :code:`Session.set_headers()`, :code:`AsyncSession.set_headers()`. Starting with the version 3.0.0, all HTTP headers (including the :code:`Authorization` header) are explicitly passed to :any:`Session.send_request()` / :any:`AsyncSession.send_request()`. Some methods no longer accept the fields parameter -------------------------------------------------- Prior to version 3.0.0, the following methods used to accept the optional :code:`fields` parameter: * :any:`Client.get_operation_status()`, :any:`AsyncClient.get_operation_status()` * :any:`Client.get_download_link()`, :any:`AsyncClient.get_download_link()` * :any:`Client.get_public_download_link()`, :any:`AsyncClient.get_public_download_link()` * :any:`Client.get_upload_link()`, :any:`AsyncClient.get_upload_link()`. Migrating From 1.x to 2.x ######################### Merge with yadisk-async ----------------------- Starting with version 2.0.0, the library provides both synchronous and asynchronous APIs. Changes to exception handling ----------------------------- Starting with version 2.0.0, all exceptions raised by :any:`Client` and :any:`AsyncClient` are derived from :any:`YaDiskError`. Exceptions from underlying dependencies (e.g. :code:`requests` or :code:`aiohttp`) are converted to :any:`RequestError`. A non-exhaustive list of possible exceptions is provided by the documentation for :any:`Client` and :any:`AsyncClient`. More details about exceptions are available in documentation for each specific API method. requests and aiohttp are optional dependencies ---------------------------------------------- Prior to version 2.0.0, :code:`requests` was listed as a dependency (and :code:`aiohttp` was listed as a dependency for :code:`yadisk-async`). :code:`requests` is still used by default but must be explicitly installed. As for the asynchronous API, :code:`httpx` is used by default, instead of :code:`aiohttp`. There are now multiple supported HTTP client libraries. See :doc:`/api_reference/sessions` for a full list of supported HTTP client libraries and :doc:`/intro` for installation instructions. ================================================ FILE: docs/requirements.in ================================================ # It is expected that the install command is running from the parent directory -e .[async_files,aiohttp,httpx,pycurl,requests] sphinx==7.4.7 sphinx-intl==2.3.2 sphinx_rtd_theme==3.1.0 ================================================ FILE: docs/requirements.txt ================================================ # # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile --output-file=docs/requirements.txt docs/requirements.in # -e .[async_files,aiohttp,httpx,pycurl,requests] # via -[async-files,aiohttp,httpx,pycurl,requests] aiofiles==25.1.0 # via yadisk aiohappyeyeballs==2.6.1 # via aiohttp aiohttp==3.13.5 # via yadisk aiosignal==1.4.0 # via aiohttp alabaster==0.7.16 # via sphinx anyio==4.12.1 # via httpx async-timeout==5.0.1 # via aiohttp attrs==26.1.0 # via aiohttp babel==2.18.0 # via # sphinx # sphinx-intl certifi==2026.2.25 # via # httpcore # httpx # requests charset-normalizer==3.4.7 # via requests click==8.1.8 # via sphinx-intl docutils==0.21.2 # via # sphinx # sphinx-rtd-theme exceptiongroup==1.3.1 # via anyio frozenlist==1.8.0 # via # aiohttp # aiosignal h11==0.16.0 # via httpcore httpcore==1.0.9 # via httpx httpx==0.28.1 # via yadisk idna==3.11 # via # anyio # httpx # requests # yarl imagesize==1.5.0 # via sphinx importlib-metadata==8.7.1 # via sphinx jinja2==3.1.6 # via sphinx markupsafe==3.0.3 # via jinja2 multidict==6.7.1 # via # aiohttp # yarl packaging==26.1 # via sphinx propcache==0.4.1 # via # aiohttp # yarl pycurl==7.45.7 # via yadisk pygments==2.20.0 # via sphinx requests==2.32.5 # via # sphinx # yadisk snowballstemmer==3.0.1 # via sphinx sphinx==7.4.7 # via # -r docs/requirements.in # sphinx-intl # sphinx-rtd-theme # sphinxcontrib-jquery sphinx-intl==2.3.2 # via -r docs/requirements.in sphinx-rtd-theme==3.1.0 # via -r docs/requirements.in sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-devhelp==2.0.0 # via sphinx sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jquery==4.1 # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==2.0.0 # via sphinx sphinxcontrib-serializinghtml==2.0.0 # via sphinx tomli==2.4.1 # via sphinx typing-extensions==4.15.0 # via # aiosignal # anyio # exceptiongroup # multidict # yadisk urllib3==2.6.3 # via requests yarl==1.22.0 # via aiohttp zipp==3.23.1 # via importlib-metadata ================================================ FILE: pyproject.toml ================================================ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.setuptools] package-dir = {"" = "src"} [project] name = "yadisk" dynamic = ["version"] description = "Библиотека-клиент REST API Яндекс.Диска / Yandex.Disk REST API client library" readme = "README.rst" requires-python = ">=3.8" license = "LGPL-3.0-or-later" keywords = ["yandex.disk", "yandex", "rest"] authors = [ {name = "Ivan Konovalov", email = "ivknv0@gmail.com"} ] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ] dependencies = ["typing_extensions; python_version<'3.10'"] [tool.setuptools.dynamic] version = {attr = "yadisk.__version__"} [project.optional-dependencies] sync_defaults = ["requests"] async_defaults = ["aiofiles", "httpx"] async_files = ["aiofiles"] aiohttp = ["aiohttp"] httpx = ["httpx"] pycurl = ["pycurl"] requests = ["requests"] [project.urls] "Source code" = "https://github.com/ivknv/yadisk" "Documentation (EN)" = "https://yadisk.readthedocs.io/en/latest" "Documentation (RU)" = "https://yadisk.readthedocs.io/ru/latest" "Bug tracker" = "https://github.com/ivknv/yadisk/issues" [tool.mypy] packages = ["yadisk", "tests"] [tool.pyright] reportInvalidTypeForm = "none" [tool.ruff] line-length = 120 indent-width = 4 target-version = "py38" [tool.ruff.lint] select = ["E", "F", "I", "W", "B", "PIE", "RUF"] ignore = ["F403", "F405", "RUF010", "I001", "PIE790", "RUF012"] [tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] ================================================ FILE: requirements-dev.in ================================================ -e .[async-files,aiohttp,httpx,pycurl,requests] # Stub packages types-aiofiles types-requests types-pycurl # Tests pytest==8.4.2 pytest-mock==3.15.1 pytest-cov==7.1.0 anyio==4.5.2 starlette==0.49.3 uvicorn==0.39.0 # Linting mypy==1.19.1 ruff==0.15.10 # Packaging build==1.4.3 twine==6.2.0 # For compiling requirements-dev.txt pip-tools==7.5.3 # Documentation requirements are listed in docs/requirements.in -r docs/requirements.in ================================================ FILE: requirements-dev.txt ================================================ # # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile --output-file=requirements-dev.txt requirements-dev.in # -e .[async-files,aiohttp,httpx,pycurl,requests] # via -[async-files,aiohttp,httpx,pycurl,requests] aiofiles==25.1.0 # via yadisk aiohappyeyeballs==2.6.1 # via aiohttp aiohttp==3.13.5 # via yadisk aiosignal==1.4.0 # via aiohttp alabaster==0.7.16 # via sphinx anyio==4.5.2 # via # -r requirements-dev.in # httpx # starlette async-timeout==5.0.1 # via aiohttp attrs==26.1.0 # via aiohttp babel==2.18.0 # via # sphinx # sphinx-intl backports-tarfile==1.2.0 # via jaraco-context build==1.4.3 # via # -r requirements-dev.in # pip-tools certifi==2026.2.25 # via # httpcore # httpx # requests cffi==2.0.0 # via cryptography charset-normalizer==3.4.7 # via requests click==8.1.8 # via # pip-tools # sphinx-intl # uvicorn coverage[toml]==7.10.7 # via pytest-cov cryptography==46.0.7 # via secretstorage docutils==0.21.2 # via # readme-renderer # sphinx # sphinx-rtd-theme exceptiongroup==1.3.1 # via # anyio # pytest frozenlist==1.8.0 # via # aiohttp # aiosignal h11==0.16.0 # via # httpcore # uvicorn httpcore==1.0.9 # via httpx httpx==0.28.1 # via yadisk id==1.6.1 # via twine idna==3.11 # via # anyio # httpx # requests # yarl imagesize==1.5.0 # via sphinx importlib-metadata==8.7.1 # via # build # keyring # sphinx # twine iniconfig==2.1.0 # via pytest jaraco-classes==3.4.0 # via keyring jaraco-context==6.1.1 # via keyring jaraco-functools==4.4.0 # via keyring jeepney==0.9.0 # via # keyring # secretstorage jinja2==3.1.6 # via sphinx keyring==25.7.0 # via twine librt==0.9.0 # via mypy markdown-it-py==3.0.0 # via rich markupsafe==3.0.3 # via jinja2 mdurl==0.1.2 # via markdown-it-py more-itertools==10.8.0 # via # jaraco-classes # jaraco-functools multidict==6.7.1 # via # aiohttp # yarl mypy==1.19.1 # via -r requirements-dev.in mypy-extensions==1.1.0 # via mypy nh3==0.3.4 # via readme-renderer packaging==26.1 # via # build # pytest # sphinx # twine # wheel pathspec==1.0.4 # via mypy pip-tools==7.5.3 # via -r requirements-dev.in pluggy==1.6.0 # via # pytest # pytest-cov propcache==0.4.1 # via # aiohttp # yarl pycparser==2.23 # via cffi pycurl==7.45.7 # via yadisk pygments==2.20.0 # via # pytest # readme-renderer # rich # sphinx pyproject-hooks==1.2.0 # via # build # pip-tools pytest==8.4.2 # via # -r requirements-dev.in # pytest-cov # pytest-mock pytest-cov==7.1.0 # via -r requirements-dev.in pytest-mock==3.15.1 # via -r requirements-dev.in readme-renderer==44.0 # via twine requests==2.32.5 # via # requests-toolbelt # sphinx # twine # yadisk requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine rich==15.0.0 # via twine ruff==0.15.10 # via -r requirements-dev.in secretstorage==3.3.3 # via keyring sniffio==1.3.1 # via anyio snowballstemmer==3.0.1 # via sphinx sphinx==7.4.7 # via # -r docs/requirements.in # sphinx-intl # sphinx-rtd-theme # sphinxcontrib-jquery sphinx-intl==2.3.2 # via -r docs/requirements.in sphinx-rtd-theme==3.1.0 # via -r docs/requirements.in sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-devhelp==2.0.0 # via sphinx sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jquery==4.1 # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==2.0.0 # via sphinx sphinxcontrib-serializinghtml==2.0.0 # via sphinx starlette==0.49.3 # via -r requirements-dev.in tomli==2.4.1 # via # build # coverage # mypy # pip-tools # pytest # sphinx twine==6.2.0 # via -r requirements-dev.in types-aiofiles==25.1.0.20251011 # via -r requirements-dev.in types-pycurl==7.45.7.20251101 # via -r requirements-dev.in types-requests==2.32.4.20260107 # via -r requirements-dev.in typing-extensions==4.15.0 # via # aiosignal # anyio # cryptography # exceptiongroup # multidict # mypy # starlette # uvicorn # yadisk urllib3==2.6.3 # via # id # requests # twine # types-requests uvicorn==0.39.0 # via -r requirements-dev.in wheel==0.46.3 # via pip-tools yarl==1.22.0 # via aiohttp zipp==3.23.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip # setuptools ================================================ FILE: src/yadisk/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from . import objects, exceptions, utils, types from ._client import Client from ._async_client import AsyncClient from ._session import Session, Response from ._async_session import AsyncSession, AsyncResponse from ._import_session import import_session, import_async_session __version__ = "3.4.1" YaDisk = Client AsyncYaDisk = AsyncClient __all__ = [ "AsyncClient", "AsyncResponse", "AsyncSession", "AsyncYaDisk", "Client", "Response", "Session", "YaDisk", "import_async_session", "import_session" ] ================================================ FILE: src/yadisk/_api/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from .api_request import * from .disk import * from .resources import * from .operations import * from .auth import * ================================================ FILE: src/yadisk/_api/api_request.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import inspect from ..exceptions import InvalidResponseError from ..utils import auto_retry, async_auto_retry, CaseInsensitiveDict from .. import settings from .._common import is_default_timeout from typing import Any, Optional, Union, Type, TypeVar, TYPE_CHECKING from .._typing_compat import Set, Dict, Tuple, Callable, Awaitable import json if TYPE_CHECKING: # pragma: no cover from .._session import Session from .._async_session import AsyncSession from ..types import AnySession, HTTPMethod, JSON, TimeoutParameter from .._client import Client from .._async_client import AsyncClient __all__ = ["APIRequest"] class APIRequest(object): """ Base class for all API requests. :param session: an instance of :any:`Session` :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param kwargs: other arguments for :any:`Session.send_request` :ivar base_url: `str`, base URL for sending the request :ivar url: `str`, request URL :ivar path: `str`, URL path for the request :ivar method: `str`, request method :ivar content_type: `str`, Content-Type header ("application/x-www-form-urlencoded" by default) :ivar timeout: `float` or `tuple`, request timeout :ivar n_retries: `int`, maximum number of retries :ivar success_codes: `list`-like, list of response codes that indicate request's success :ivar retry_interval: `float`, delay between retries in seconds :ivar retry_on: `tuple`, additional exception classes to retry on """ base_url: str = "" url: str = "" path: str = "" method: Optional["HTTPMethod"] = None content_type: str = "application/x-www-form-urlencoded" timeout: "TimeoutParameter" n_retries: Optional[int] = None success_codes: Set[int] = {200} retry_interval: Optional[Union[int, float]] = None data: Union[Dict, bytes] params: Dict[str, Any] send_kwargs: Dict[str, Any] retry_on: Tuple[Type[Exception], ...] = tuple() session: Any T = TypeVar("T") def __init__(self, session: "AnySession", **kwargs): base_url = self.base_url or settings.BASE_API_URL n_retries = kwargs.pop("n_retries", None) retry_interval = kwargs.pop("retry_interval", None) headers = kwargs.pop("headers", {}) retry_on = kwargs.pop("retry_on", self.retry_on) if headers is None: headers = {} timeout = kwargs.get("timeout", ...) if is_default_timeout(timeout): timeout = settings.DEFAULT_TIMEOUT kwargs["timeout"] = timeout if n_retries is None: n_retries = self.n_retries if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES if retry_interval is None: retry_interval = self.retry_interval if retry_interval is None: retry_interval = settings.DEFAULT_RETRY_INTERVAL self.session = session self.send_kwargs = kwargs self.base_url = base_url self.timeout = timeout self.n_retries = n_retries self.retry_interval = retry_interval self.headers = headers self.data = {} self.content = None self.params = {} self.retry_on = retry_on if not self.url: self.url = f"{self.base_url}/{self.path.lstrip('/')}" def _prepare_send_args(self) -> Dict[str, Any]: headers = CaseInsensitiveDict() headers["Content-Type"] = self.content_type headers.update(self.headers) if self.data: if isinstance(self.data, Dict): data = json.dumps(self.data).encode("utf8") else: data = self.data else: data = None kwargs = dict(self.send_kwargs) kwargs.update({"headers": headers, "data": data, "params": self.params}) return kwargs def _attempt( self, yadisk: Optional["Client"], then: Callable[[Any], Any] ) -> Any: assert self.method is not None assert self.url kwargs = self._prepare_send_args() session: "Session" = self.session response = session.send_request(self.method, self.url, **kwargs) json: JSON = None if response.status == 0: # Request has not been sent yet # This can happen with pycurl with stream=True try: json = response.json() except ValueError: pass json_already_parsed = True else: json_already_parsed = False success = response.status in self.success_codes if not success: raise response.get_exception() if not json_already_parsed: try: json = response.json() except ValueError: pass try: result = self.process_json(json, yadisk=yadisk) except ValueError as e: raise InvalidResponseError(f"Server returned invalid response: {e}") from e return then(result) async def _async_attempt( self, yadisk: Optional["AsyncClient"], then: Union[Callable[[Any], Any], Callable[[Any], Awaitable[Any]]] ) -> Any: assert self.method is not None assert self.url kwargs = self._prepare_send_args() session: "AsyncSession" = self.session response = await session.send_request(self.method, self.url, **kwargs) success = response.status in self.success_codes if not success: raise await response.get_exception() try: json = await response.json() except ValueError: json = None try: result = self.process_json(json, yadisk=yadisk) except ValueError as e: raise InvalidResponseError(f"Server returned invalid response: {e}") from e if inspect.iscoroutinefunction(then): return await then(result) else: return then(result) def send( self, yadisk: Optional["Client"], then: Optional[Callable[[Any], Any]] = None ) -> Any: """ Actually send the request :param yadisk: :any:`Client` instance that will be passed to :any:`process_json()` :param then: function that will be called at the end of the attempt :returns: :any:`Response` (`self.response`) """ settings.logger.info(f"sending APIRequest {self.__class__.__name__}, {self.method} {self.url}") return auto_retry( self._attempt, self.n_retries, self.retry_interval, args=(yadisk, then or (lambda x: x)), retry_on=self.retry_on ) async def asend( self, yadisk: Optional["AsyncClient"], then: Optional[Union[Callable[[Any], Any], Callable[[Any], Awaitable[Any]]]] = None ) -> Any: """ Actually send the request :param yadisk: :any:`AsyncClient` instance that will be passed to :any:`process_json()` :param then: function that will be called at the end of the attempt :returns: :any:`AsyncResponse` (`self.response`) """ settings.logger.info(f"sending APIRequest {self.__class__.__name__}, {self.method} {self.url}") return await async_auto_retry( self._async_attempt, self.n_retries, self.retry_interval, args=(yadisk, then or (lambda x: x)), retry_on=self.retry_on ) def process_json(self, js: "JSON", **kwargs) -> Any: """ Process the JSON response. :param js: `dict` or `None`, JSON response :param kwargs: extra arguments (optional) :returns: processed response, can be anything """ raise NotImplementedError ================================================ FILE: src/yadisk/_api/auth.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from .api_request import APIRequest from ..objects import TokenObject, TokenRevokeStatusObject, DeviceCodeObject from ..exceptions import InvalidResponseError from ..types import JSON from .. import settings from typing import Optional, Union, Literal, TYPE_CHECKING from urllib.parse import urlencode if TYPE_CHECKING: # pragma: no cover from ..types import AnySession __all__ = [ "GetDeviceCodeRequest", "GetTokenRequest", "RefreshTokenRequest", "RevokeTokenRequest" ] class RefreshTokenRequest(APIRequest): """ A request to refresh an existing token. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param refresh_token: the refresh token that was received with the original token :param client_id: application ID :param client_secret: application secret password :returns: :any:`TokenObject` """ method = "POST" base_url = settings.BASE_OAUTH_API_URL path = "/token" def __init__( self, session: "AnySession", refresh_token: str, client_id: str, client_secret: str, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.data = urlencode({ "grant_type": "refresh_token", "refresh_token": refresh_token, "client_id": client_id, "client_secret": client_secret, }).encode("utf8") def process_json(self, js: JSON, **kwargs) -> TokenObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk did not return valid JSON") return TokenObject(js) class RevokeTokenRequest(APIRequest): """ A request to revoke the token. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param token: the token to be revoked :param client_id: application ID :param client_secret: application secret password :returns: :any:`TokenRevokeStatusObject` """ method = "POST" base_url = settings.BASE_OAUTH_API_URL path = "/revoke_token" def __init__( self, session: "AnySession", token: str, client_id: str, client_secret: str, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.data = urlencode({ "access_token": token, "client_id": client_id, "client_secret": client_secret }).encode("utf8") def process_json(self, js: JSON, **kwargs) -> TokenRevokeStatusObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk did not return valid JSON") return TokenRevokeStatusObject(js) class GetTokenRequest(APIRequest): """ A request to get the token. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param code: confirmation code :param client_id: application ID :param client_secret: application secret password :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param code_verifier: `str`, verifier code, used with the PKCE authorization flow :returns: :any:`TokenObject` """ method = "POST" base_url = settings.BASE_OAUTH_API_URL path = "/token" def __init__( self, session: "AnySession", grant_type: Union[ Literal["authorization_code"], Literal["device_code"], Literal["refresh_token"] ], client_id: str, code: Optional[str] = None, token: Optional[str] = None, client_secret: Optional[str] = None, device_id: Optional[str] = None, device_name: Optional[str] = None, code_verifier: Optional[str] = None, **kwargs ): APIRequest.__init__(self, session, **kwargs) data = { "grant_type": grant_type, "client_id": client_id } if code: data["code"] = code if token: data["token"] = token if client_secret: data["client_secret"] = client_secret if device_id: data["device_id"] = device_id if device_name: data["device_name"] = device_name if code_verifier: data["code_verifier"] = code_verifier self.data = urlencode(data).encode("utf8") def process_json(self, js: JSON, **kwargs) -> TokenObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk did not return valid JSON") return TokenObject(js) class GetDeviceCodeRequest(APIRequest): """ This request is used for authorization using the Yandex OAuth page. In this case the user must enter the verification code (:code:`user_code`) in the browser on the Yandex OAuth page. After the user has entered the code on the OAuth page, the application can exchange the :code:`device_code` for the token. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param client_id: application ID :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application """ method = "POST" base_url = settings.BASE_OAUTH_API_URL path = "/device/code" def __init__( self, session: "AnySession", client_id: str, device_id: Optional[str] = None, device_name: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, **kwargs ): APIRequest.__init__(self, session, **kwargs) data = {"client_id": client_id} if device_id: data["device_id"] = device_id if device_name: data["device_name"] = device_name if scope: data["scope"] = scope if optional_scope: data["optional_scope"] = optional_scope self.data = urlencode(data).encode("utf8") def process_json(self, js: JSON, **kwargs) -> DeviceCodeObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk did not return valid JSON") return DeviceCodeObject(js) ================================================ FILE: src/yadisk/_api/disk.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from .api_request import APIRequest from ..objects import DiskInfoObject from ..exceptions import InvalidResponseError from typing import Optional, TYPE_CHECKING from .._typing_compat import Iterable if TYPE_CHECKING: # pragma: no cover from ..types import AnySession, JSON __all__ = ["DiskInfoRequest"] class DiskInfoRequest(APIRequest): """ A request to get disk information. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param extra_fields: list of additional keys to be included in the response :param fields: list of keys to be included in the response :returns: :any:`DiskInfoObject` """ method = "GET" path = "/v1/disk" def __init__( self, session: "AnySession", extra_fields: Optional[Iterable[str]] = None, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) if extra_fields is not None: self.params["extra_fields"] = ",".join(extra_fields) if fields is not None: self.params["fields"] = ",".join(fields) def process_json(self, js: "JSON", **kwargs) -> DiskInfoObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return DiskInfoObject(js) ================================================ FILE: src/yadisk/_api/operations.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from urllib.parse import urlparse, parse_qs, quote from .api_request import APIRequest from ..objects import OperationStatusObject from .._common import is_operation_link from ..exceptions import InvalidResponseError from typing import Optional, TYPE_CHECKING from .._typing_compat import Iterable if TYPE_CHECKING: # pragma: no cover from ..types import AnySession, JSON __all__ = ["GetOperationStatusRequest"] class GetOperationStatusRequest(APIRequest): """ A request to get operation status. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param operation_id: operation ID or link :param fields: list of keys to be included in the response :returns: :any:`OperationStatusObject` """ method = "GET" def __init__( self, session: "AnySession", operation_id: str, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: if is_operation_link(operation_id): parsed_url = urlparse(operation_id) operation_id = parsed_url.path.rpartition("/")[2] params = parse_qs(parsed_url.query) if fields is None: fields = params.get("fields", [None])[0] else: operation_id = quote(operation_id) self.path = f"/v1/disk/operations/{operation_id}" APIRequest.__init__(self, session, **kwargs) if fields is not None: self.params["fields"] = ",".join(fields) def process_json(self, js: "JSON", **kwargs) -> OperationStatusObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if js.get("status") not in ("in-progress", "success", "failed"): raise InvalidResponseError(f"Yandex.Disk returned invalid operation status object: {js}") return OperationStatusObject(js) ================================================ FILE: src/yadisk/_api/resources.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import typing from ..types import PublicSettings from .api_request import APIRequest from ..objects import ( PublicResourcesListObject, SyncPublicResourcesListObject, AsyncPublicResourcesListObject, TrashResourceObject, SyncTrashResourceObject, AsyncTrashResourceObject, FilesResourceListObject, SyncFilesResourceListObject, AsyncFilesResourceListObject, LastUploadedResourceListObject, SyncLastUploadedResourceListObject, AsyncLastUploadedResourceListObject, ResourceObject, SyncResourceObject, AsyncResourceObject, ResourceUploadLinkObject, PublicResourceObject, SyncPublicResourceObject, AsyncPublicResourceObject, OperationLinkObject, SyncOperationLinkObject, AsyncOperationLinkObject, ResourceLinkObject, SyncResourceLinkObject, AsyncResourceLinkObject, ResourceDownloadLinkObject, PublicSettingsObject, PublicAvailableSettingsObject ) from .._common import is_operation_link, ensure_path_has_scheme from ..exceptions import InvalidResponseError from .._typing_compat import Iterable, Dict, List from typing import Optional, Union, TYPE_CHECKING if TYPE_CHECKING: # pragma: no cover from ..types import AnySession, AnyClient, JSON __all__ = [ "CopyRequest", "DeleteRequest", "DeleteTrashRequest", "FilesRequest", "GetDownloadLinkRequest", "GetMetaRequest", "GetPublicAvailableSettingsRequest", "GetPublicDownloadLinkRequest", "GetPublicMetaRequest", "GetPublicResourcesRequest", "GetPublicSettingsRequest", "GetTrashRequest", "GetUploadLinkRequest", "LastUploadedRequest", "MkdirRequest", "MoveRequest", "PatchRequest", "PublishRequest", "RestoreTrashRequest", "SaveToDiskRequest", "UnpublishRequest", "UpdatePublicSettingsRequest", "UploadURLRequest", ] Fields = Iterable[str] def _substitute_keys(keys: Iterable[str], sub_map: Dict[str, str]) -> List[str]: return [".".join(sub_map.get(f, f) for f in k.split(".")) for k in keys] class GetPublicResourcesRequest(APIRequest): """ A request to get a list of public resources. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param offset: offset from the beginning of the list :param limit: maximum number of elements in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param type: filter based on type of resources ("file" or "dir") :param fields: list of keys to be included in the response :returns: :any:`PublicResourcesListObject` """ method = "GET" path = "/v1/disk/resources/public" def __init__( self, session: "AnySession", offset: int = 0, limit: int = 20, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, type: Optional[str] = None, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["offset"] = offset self.params["limit"] = limit if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if type is not None: self.params["type"] = type if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> PublicResourcesListObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncPublicResourcesListObject(js, yadisk) else: return AsyncPublicResourcesListObject(js, yadisk) class UnpublishRequest(APIRequest): """ A request to make a public resource private. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource to be unpublished :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` """ method = "PUT" path = "/v1/disk/resources/unpublish" def __init__( self, session: "AnySession", path: str, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class GetDownloadLinkRequest(APIRequest): """ A request to get a download link to a resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource to be downloaded :param fields: list of keys to be included in the response :returns: :any:`ResourceDownloadLinkObject` """ method = "GET" path = "/v1/disk/resources/download" def __init__( self, session: "AnySession", path: str, fields: Optional[Iterable[str]] = None, **kwargs ): APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceDownloadLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return ResourceDownloadLinkObject(js, yadisk) class GetTrashRequest(APIRequest): """ A request to get meta-information about a trash resource. :param path: path to the trash resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :returns: :any:`TrashResourceObject` """ method = "GET" path = "/v1/disk/trash/resources" def __init__( self, session: "AnySession", path: str, offset: int = 0, limit: int = 20, sort: Optional[str] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path, "trash") self.params["offset"] = offset self.params["limit"] = limit if sort is not None: self.params["sort"] = sort if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if fields is not None: sub_map = {"embedded": "_embedded"} self.params["fields"] = ",".join(_substitute_keys(fields, sub_map)) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> TrashResourceObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncTrashResourceObject(js, yadisk) else: return AsyncTrashResourceObject(js, yadisk) class RestoreTrashRequest(APIRequest): """ A request to restore trash. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the trash resource to be restored :param dst_path: destination path :param force_async: forces the operation to be executed asynchronously :param overwrite: `bool`, determines whether the destination can be overwritten :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` or :any:`OperationLinkObject` """ method = "PUT" path = "/v1/disk/trash/resources/restore" success_codes = {201, 202} def __init__( self, session: "AnySession", path: str, dst_path: Optional[str] = None, force_async: bool = False, overwrite: bool = False, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path, "trash") self.params["overwrite"] = "true" if overwrite else "false" self.params["force_async"] = "true" if force_async else "false" if dst_path is not None: self.params["name"] = dst_path if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Union[OperationLinkObject, ResourceLinkObject]: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if is_operation_link(js.get("href", "")): if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class DeleteTrashRequest(APIRequest): """ A request to delete a trash resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the trash resource to be deleted :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :returns: :any:`OperationLinkObject` or `None` """ method = "DELETE" path = "/v1/disk/trash/resources" success_codes = {202, 204} def __init__( self, session: "AnySession", path: Optional[str] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) if path is not None: self.params["path"] = ensure_path_has_scheme(path, "trash") self.params["force_async"] = "true" if force_async else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Optional[OperationLinkObject]: if js is not None: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) return None class LastUploadedRequest(APIRequest): """ A request to get the list of latest uploaded files sorted by upload date. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param limit: maximum number of elements in the list :param media_type: type of files to include in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :returns: :any:`LastUploadedResourceListObject` """ method = "GET" path = "/v1/disk/resources/last-uploaded" def __init__( self, session: "AnySession", limit: int = 20, media_type: Optional[Union[str, Iterable[str]]] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["limit"] = limit if media_type is not None: if not isinstance(media_type, Iterable): raise TypeError("media_type should be a string or an iterable") if isinstance(media_type, str): self.params["media_type"] = media_type else: self.params["media_type"] = ",".join(media_type) if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> LastUploadedResourceListObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncLastUploadedResourceListObject(js, yadisk) else: return AsyncLastUploadedResourceListObject(js, yadisk) class CopyRequest(APIRequest): """ A request to copy a file or a directory. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param src_path: source path :param dst_path: destination path :param overwrite: if `True` the destination path can be overwritten, otherwise, an error will be raised :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` or :any:`OperationLinkObject` """ method = "POST" path = "/v1/disk/resources/copy" success_codes = {201, 202} def __init__( self, session: "AnySession", src_path: str, dst_path: str, overwrite: bool = False, force_async: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["from"] = ensure_path_has_scheme(src_path) self.params["path"] = ensure_path_has_scheme(dst_path) self.params["overwrite"] = "true" if overwrite else "false" self.params["force_async"] = "true" if force_async else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Union[OperationLinkObject, ResourceLinkObject]: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if is_operation_link(js.get("href", "")): if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class GetMetaRequest(APIRequest): """ A request to get meta-information about a resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :returns: :any:`ResourceObject` """ method = "GET" path = "/v1/disk/resources" def __init__( self, session: "AnySession", path: str, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) if limit is not None: self.params["limit"] = limit if offset is not None: self.params["offset"] = offset if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if sort is not None: self.params["sort"] = sort if fields is not None: sub_map = {"embedded": "_embedded"} self.params["fields"] = ",".join(_substitute_keys(fields, sub_map)) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncResourceObject(js, yadisk) else: return AsyncResourceObject(js, yadisk) class GetUploadLinkRequest(APIRequest): """ A request to get an upload link. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to be uploaded at :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :returns: :any:`ResourceUploadLinkObject` """ method = "GET" path = "/v1/disk/resources/upload" def __init__( self, session: "AnySession", path: str, overwrite: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.params["overwrite"] = "true" if overwrite else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceUploadLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return ResourceUploadLinkObject(js, yadisk) class MkdirRequest(APIRequest): """ A request to create a new directory. :param path: path to the directory to be created :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` """ method = "PUT" path = "/v1/disk/resources" success_codes = {201} def __init__( self, session: "AnySession", path: str, fields: Optional[Fields] = None, **kwargs ): APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class PublishRequest(APIRequest): """ A request to make a resource public. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param public_settings: :any:`PublicSettings`, public access settings for the resource :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` """ method = "PUT" path = "/v1/disk/resources/publish" content_type = "application/json" def __init__( self, session: "AnySession", path: str, allow_address_access: bool = False, public_settings: Optional[PublicSettings] = None, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.params["allow_address_access"] = "true" if allow_address_access else "false" self.data = {"public_settings": public_settings or {}} if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class GetPublicSettingsRequest(APIRequest): """ A request to get public settings of a resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param fields: list of keys to be included in the response :returns: :any:`PublicSettingsObject` """ method = "GET" path = "/v1/disk/public/resources/public-settings" def __init__( self, session: "AnySession", path: str, allow_address_access: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.params["allow_address_access"] = "true" if allow_address_access else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> PublicSettingsObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return PublicSettingsObject(js) class GetPublicAvailableSettingsRequest(APIRequest): """ A request to get public settings of a shared resource for the current OAuth token owner. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource :returns: :any:`PublicAvailableSettingsObject` """ method = "GET" path = "/v1/disk/public/resources/public-settings/available-settings" def __init__( self, session: "AnySession", path: str, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> PublicAvailableSettingsObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return PublicAvailableSettingsObject(js) class UpdatePublicSettingsRequest(APIRequest): """ A request to update public settings of a shared resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource :param public_settings: :any:`PublicSettings`, public access settings for the resource :returns: `None` """ method = "PATCH" path = "/v1/disk/public/resources/public-settings" content_type = "application/json" def __init__( self, session: "AnySession", path: str, public_settings: PublicSettings, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.data = typing.cast(Dict, public_settings) def process_json(self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs) -> None: return class UploadURLRequest(APIRequest): """ A request to upload a file from URL. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param url: source URL :param path: destination path :param disable_redirects: `bool`, forbid redirects :param fields: list of keys to be included in the response :returns: :any:`OperationLinkObject` """ method = "POST" path = "/v1/disk/resources/upload" success_codes = {202} def __init__( self, session: "AnySession", url: str, path: str, disable_redirects: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["url"] = url self.params["path"] = ensure_path_has_scheme(path) self.params["disable_redirects"] = "true" if disable_redirects else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> OperationLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) class DeleteRequest(APIRequest): """ A request to delete a file or a directory. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource to be removed :param permanently: if `True`, the resource will be removed permanently, otherwise, it will be just moved to the trash :param force_async: forces the operation to be executed asynchronously :param md5: `str`, MD5 hash of the file to remove :param fields: list of keys to be included in the response :returns: :any:`OperationLinkObject` or `None` """ method = "DELETE" path = "/v1/disk/resources" success_codes = {202, 204} def __init__( self, session: "AnySession", path: str, permanently: bool = False, md5: Optional[str] = None, force_async: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.params["permanently"] = "true" if permanently else "false" self.params["force_async"] = "true" if force_async else "false" if md5 is not None: self.params["md5"] = md5 if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Optional[OperationLinkObject]: if isinstance(js, dict): if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif js is not None: raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) return None class SaveToDiskRequest(APIRequest): """ A request to save a public resource to the disk. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param public_key: public key or public URL of the resource :param name: filename of the saved resource :param path: path to the copied resource in the public folder :param save_path: path to the destination directory (downloads directory by default) :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :returns: :any:`ResourceLinkObject` or :any:`OperationLinkObject` """ method = "POST" path = "/v1/disk/public/resources/save-to-disk" success_codes = {201, 202} def __init__( self, session: "AnySession", public_key: str, name: Optional[str] = None, path: Optional[str] = None, save_path: Optional[str] = None, force_async: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["public_key"] = public_key if name is not None: self.params["name"] = name if path is not None: self.params["path"] = path if save_path is not None: self.params["save_path"] = ensure_path_has_scheme(save_path) self.params["force_async"] = "true" if force_async else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Union[OperationLinkObject, ResourceLinkObject]: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if is_operation_link(js.get("href", "")): if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class GetPublicMetaRequest(APIRequest): """ A request to get meta-information about a public resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param public_key: public key or public URL of the resource :param path: relative path to a resource in a public folder. By specifying the key of the published folder in `public_key`, you can request metainformation for any resource in the folder. :param offset: offset from the beginning of the list of nested resources :param limit: maximum number of nested elements to be included in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: file preview size :param preview_crop: `bool`, allow preview crop :param fields: list of keys to be included in the response :returns: :any:`PublicResourceObject` """ method = "GET" path = "/v1/disk/public/resources" def __init__( self, session: "AnySession", public_key: str, offset: int = 0, limit: int = 20, path: Optional[str] = None, sort: Optional[str] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["public_key"] = public_key self.params["offset"] = offset self.params["limit"] = limit if path is not None: self.params["path"] = path if sort is not None: self.params["sort"] = sort if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if fields is not None: sub_map = {"embedded": "_embedded", "view_count": "views_count"} self.params["fields"] = ",".join(_substitute_keys(fields, sub_map)) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> PublicResourceObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncPublicResourceObject(js, yadisk) else: return AsyncPublicResourceObject(js, yadisk) class GetPublicDownloadLinkRequest(APIRequest): """ A request to get a download link for a public resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param fields: list of keys to be included in the response :returns: :any:`ResourceDownloadLinkObject` """ method = "GET" path = "/v1/disk/public/resources/download" def __init__( self, session: "AnySession", public_key: str, path: Optional[str] = None, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["public_key"] = public_key if path is not None: self.params["path"] = path if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceDownloadLinkObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") return ResourceDownloadLinkObject(js, yadisk) class MoveRequest(APIRequest): """ A request to move a resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param src_path: source path to be moved :param dst_path: destination path :param force_async: forces the operation to be executed asynchronously :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :returns: :any:`OperationLinkObject` or :any:`ResourceLinkObject` """ method = "POST" path = "/v1/disk/resources/move" success_codes = {201, 202} def __init__( self, session: "AnySession", src_path: str, dst_path: str, force_async: bool = False, overwrite: bool = False, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["from"] = ensure_path_has_scheme(src_path) self.params["path"] = ensure_path_has_scheme(dst_path) self.params["overwrite"] = "true" if overwrite else "false" self.params["force_async"] = "true" if force_async else "false" if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> Union[OperationLinkObject, ResourceLinkObject]: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON", disable_retry=True) if is_operation_link(js.get("href", "")): if yadisk is None or yadisk.synchronous: return SyncOperationLinkObject(js, yadisk) else: return AsyncOperationLinkObject(js, yadisk) elif self.params.get("force_async") == "true": raise InvalidResponseError( "Yandex.Disk did not return an operation link, despite force_async=true", disable_retry=True ) if yadisk is None or yadisk.synchronous: return SyncResourceLinkObject(js, yadisk) else: return AsyncResourceLinkObject(js, yadisk) class FilesRequest(APIRequest): """ A request to get a flat list of all files (that doesn't include directories). :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param offset: offset from the beginning of the list :param limit: number of list elements to be included :param media_type: type of files to include in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :returns: :any:`FilesResourceListObject` """ method = "GET" path = "/v1/disk/resources/files" def __init__( self, session: "AnySession", offset: int = 0, limit: int = 20, media_type: Optional[Union[str, Iterable[str]]] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["offset"] = offset self.params["limit"] = limit if media_type is not None: if not isinstance(media_type, Iterable): raise TypeError("media_type should be a string or an iterable") if isinstance(media_type, str): self.params["media_type"] = media_type else: self.params["media_type"] = ",".join(media_type) if preview_size is not None: self.params["preview_size"] = preview_size if preview_crop is not None: self.params["preview_crop"] = "true" if preview_crop else "false" if sort is not None: self.params["sort"] = sort if fields is not None: self.params["fields"] = ",".join(fields) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> FilesResourceListObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncFilesResourceListObject(js, yadisk) else: return AsyncFilesResourceListObject(js, yadisk) class PatchRequest(APIRequest): """ A request to update custom properties of a resource. :param session: an instance of :any:`Session` or :any:`AsyncSession` with prepared headers :param path: path to the resource :param properties: `dict`, custom properties to update :param fields: list of keys to be included in the response :returns: :any:`ResourceObject` """ method = "PATCH" path = "/v1/disk/resources" content_type = "application/json" def __init__( self, session: "AnySession", path: str, properties: dict, fields: Optional[Fields] = None, **kwargs ) -> None: APIRequest.__init__(self, session, **kwargs) self.params["path"] = ensure_path_has_scheme(path) self.data = {"custom_properties": properties} if fields is not None: sub_map = {"embedded": "_embedded"} self.params["fields"] = ",".join(_substitute_keys(fields, sub_map)) def process_json( self, js: "JSON", yadisk: Optional["AnyClient"] = None, **kwargs ) -> ResourceObject: if not isinstance(js, dict): raise InvalidResponseError("Yandex.Disk returned invalid JSON") if yadisk is None or yadisk.synchronous: return SyncResourceObject(js, yadisk) else: return AsyncResourceObject(js, yadisk) ================================================ FILE: src/yadisk/_async_client.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import asyncio import inspect from pathlib import PurePosixPath import posixpath from urllib.parse import urlencode from .types import ( AsyncFileOrPath, AsyncFileOrPathDestination, AsyncOpenFileCallback, AsyncSessionFactory, FileOpenMode, BinaryAsyncFileLike, AsyncSessionName, OperationStatus, PublicSettings ) from . import settings from ._api import * from .exceptions import ( AsyncOperationFailedError, AsyncOperationPollingTimeoutError, InvalidResponseError, ParentNotFoundError, RetriableYaDiskError, UnauthorizedError, OperationNotFoundError, PathNotFoundError, WrongResourceTypeError ) from .utils import auto_retry, CaseInsensitiveDict from .objects import ( AsyncResourceLinkObject, AsyncPublicResourceLinkObject, TokenObject, TokenRevokeStatusObject, DiskInfoObject, AsyncResourceObject, AsyncOperationLinkObject, AsyncTrashResourceObject, AsyncPublicResourceObject, AsyncPublicResourcesListObject, AsyncFilesResourceListObject, AsyncLastUploadedResourceListObject, DeviceCodeObject, ResourceUploadLinkObject, PublicSettingsObject, PublicAvailableSettingsObject ) from typing import Any, Optional, Union, IO, BinaryIO, Literal from ._typing_compat import Callable, AsyncGenerator, Awaitable, Dict, List, Type from ._async_session import AsyncSession from ._import_session import import_async_session from ._client_common import ( _add_spoof_user_agent_header, _apply_default_args, _filter_request_kwargs, _set_authorization_header, _add_authorization_header, _validate_listdir_response, _validate_link_response, _validate_get_type_response ) from ._common import remove_path_scheme, is_async_func _default_open_file: AsyncOpenFileCallback try: import aiofiles async def _open_file_with_aiofiles(path: Union[str, bytes], mode: FileOpenMode) -> BinaryAsyncFileLike: return await aiofiles.open(path, mode) _default_open_file = _open_file_with_aiofiles except ImportError: async def _open_file(path: Union[str, bytes], mode: FileOpenMode) -> BinaryIO: return open(path, mode) _default_open_file = _open_file __all__ = ["AsyncClient"] async def _exists(get_meta_function: Callable[..., Awaitable], /, *args, **kwargs) -> bool: try: # We want to query the bare minimum number of fields, that's what # the fields parameter is for await get_meta_function(*args, fields=["type"], **kwargs) return True except PathNotFoundError: return False ResourceType = Union["AsyncResourceObject", "AsyncPublicResourceObject", "AsyncTrashResourceObject"] async def _get_type( get_meta_function: Callable[..., Awaitable[ResourceType]], /, *args, **kwargs ) -> str: return ( await get_meta_function( *args, _then=_validate_get_type_response, fields=["type"], **kwargs ) ).type # type: ignore[return-value] async def _listdir( get_meta_function: Callable[..., Awaitable[ResourceType]], path: str, /, *, max_items: Optional[int] = None, **kwargs ) -> AsyncGenerator: if kwargs.get("limit") is None: kwargs["limit"] = 500 if kwargs.get("fields") is None: kwargs["fields"] = [] kwargs["fields"] = ["embedded.items.%s" % (k,) for k in kwargs["fields"]] # Fields that are absolutely necessary NECESSARY_FIELDS = ["type", "embedded", "embedded.offset", "embedded.limit", "embedded.total", "embedded.items"] kwargs["fields"].extend(NECESSARY_FIELDS) remaining_items = max_items if remaining_items is not None: # Do not query more items than necessary kwargs["limit"] = min(remaining_items, kwargs["limit"]) result = await get_meta_function(path, _then=_validate_listdir_response, **kwargs) if result.type == "file": raise WrongResourceTypeError("%r is a file" % (path,)) for child in result.embedded.items[:remaining_items]: # type: ignore[union-attr,index] yield child limit: int = result.embedded.limit # type: ignore[assignment,union-attr] offset: int = result.embedded.offset # type: ignore[assignment,union-attr] total: int = result.embedded.total # type: ignore[assignment,union-attr] while offset + limit < total: if remaining_items is not None: remaining_items -= len(result.embedded.items) # type: ignore[union-attr,arg-type] if remaining_items <= 0: break # Do not query more items than necessary kwargs["limit"] = min(remaining_items, kwargs["limit"]) else: remaining_items = None offset += limit kwargs["offset"] = offset result = await get_meta_function(path, _then=_validate_listdir_response, **kwargs) if result.type == "file": raise WrongResourceTypeError("%r is a file" % (path,)) for child in result.embedded.items[:remaining_items]: # type: ignore[union-attr,index] yield child limit = result.embedded.limit # type: ignore[assignment,union-attr] total = result.embedded.total # type: ignore[assignment,union-attr] async def read_in_chunks(file: IO, chunk_size: int = 64 * 1024) -> Union[AsyncGenerator[str, None], AsyncGenerator[bytes, None]]: while chunk := await file.read(chunk_size): yield chunk async def read_in_chunks_sync(file: IO, chunk_size: int = 64 * 1024) -> Union[AsyncGenerator[str, None], AsyncGenerator[bytes, None]]: while chunk := file.read(chunk_size): yield chunk async def _file_tell(file: Any) -> int: if is_async_func(file.tell): return await file.tell() else: return file.tell() async def _file_seek(file: Any, offset: int, whence: int = 0) -> int: if is_async_func(file.seek): return await file.seek(offset, whence) else: return file.seek(offset, whence) async def _is_file_seekable(file: Any) -> bool: if not hasattr(file, "seekable"): # Assume the file is seekable if there's no way to check return True if is_async_func(file.seekable): return await file.seekable() return file.seekable() class AsyncClient: """ Implements access to Yandex.Disk REST API (provides asynchronous API). HTTP client implementation can be specified using the :code:`session` parameter. :any:`AsyncHTTPXSession` is used by default. For other options, see :doc:`/api_reference/sessions`. Almost all methods of :any:`AsyncClient` (the ones that accept `**kwargs`) accept some additional arguments: * **n_retries** - `int`, maximum number of retries for a request * **retry_interval** - `float`, delay between retries (in seconds) * **headers** - `dict` or `None`, additional request headers * **timeout** - `tuple` (:code:`(, )`) or `float` (specifies both connect and read timeout), request timeout (in seconds) Additional parameters, specific to a given HTTP client library can also be passed, see documentation for specific :any:`AsyncSession` subclasses (:doc:`/api_reference/sessions`). .. note:: Do not forget to call :any:`AsyncClient.close` or use the `async with` statement to close all the connections. Otherwise, you may get a warning. In :any:`Client` this is handled in the destructor, but since :any:`AsyncClient.close` is a coroutine function the same cannot be done here, so you have to do it explicitly. :param id: application ID :param secret: application secret password :param token: application token :param default_args: `dict` or `None`, default arguments for methods. Can be used to set the default timeout, headers, etc. :param session: `None`, `str` or an instance of :any:`AsyncSession`. If :code:`session` is a string, the appropriate session class will be imported, it must be one of the following values: * :code:`"aiohttp"` - :any:`AIOHTTPSession` * :code:`"httpx"` - :any:`AsyncHTTPXSession` :param open_file: `None` or an async function that opens a file for reading or writing (:code:`aiofiles.open()` by default) :param session_factory: kept for compatibility, callable that returns an instance of :any:`AsyncSession` :ivar id: `str`, application ID :ivar secret: `str`, application secret password :ivar token: `str`, application token :ivar default_args: `dict`, default arguments for methods. Can be used to set the default timeout, headers, etc. :ivar session: current session (:any:`AsyncSession` instance) :ivar open_file: async function that opens a file for reading or writing (:code:`aiofiles.open()` by default) The following exceptions may be raised by most API requests: :raises RequestError: HTTP client raised an exception while making a request :raises BadRequestError: server returned HTTP code 400 :raises FieldValidationError: request contains fields with invalid data :raises UnauthorizedError: server returned HTTP code 401 :raises ForbiddenError: server returned HTTP code 403 :raises NotAcceptableError: server returned HTTP code 406 :raises ConflictError: server returned HTTP code 409 :raises PayloadTooLargeError: server returned code 413 :raises UnsupportedMediaError: server returned HTTP code 415 :raises LockedError: server returned HTTP code 423 :raises TooManyRequestsError: server returned HTTP code 429 :raises InternalServerError: server returned HTTP code 500 :raises BadGatewayError: server returned HTTP code 502 :raises UnavailableError: server returned HTTP code 503 :raises GatewayTimeoutError: server returned HTTP code 504 :raises InsufficientStorageError: server returned HTTP code 509 :raises UnknownYaDiskError: other unknown error """ id: str secret: str token: str default_args: Dict[str, Any] session: AsyncSession open_file: AsyncOpenFileCallback synchronous = False def __init__( self, id: str = "", secret: str = "", token: str = "", *, default_args: Optional[Dict[str, Any]] = None, session: Optional[Union[AsyncSession, AsyncSessionName]] = None, open_file: Optional[AsyncOpenFileCallback] = None, session_factory: Optional[AsyncSessionFactory] = None ) -> None: self.id = id self.secret = secret self.token = "" self.default_args = {} if default_args is None else default_args if session is None: if session_factory is not None: session = session_factory() else: try: session = import_async_session("httpx")() except ModuleNotFoundError as e: if e.name == "httpx": raise ModuleNotFoundError( "httpx is not installed. Either install httpx or provide a custom session", name=e.name, path=e.path) from e else: raise elif isinstance(session, str): session = import_async_session(session)() self.session = session if open_file is None: open_file = _default_open_file self.open_file = open_file self.token = token async def __aenter__(self): return self async def __aexit__(self, *args, **kwargs) -> None: await self.close() async def close(self) -> None: """ Closes the session. Do not call this method while there are other active threads using this object. This method can also be called implicitly by using the `async with` statement. """ await self.session.close() async def _maybe_wait( self, request_class: Type[APIRequest], /, *args, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, **kwargs ) -> Any: request = request_class(self.session, *args, **kwargs) if wait: args_to_filter = ( "permanently", "md5", "overwrite", "force_async", "fields" ) for arg in args_to_filter: kwargs.pop(arg, None) async def then(response: Optional[AsyncOperationLinkObject]) -> Optional[AsyncOperationLinkObject]: if not isinstance(response, AsyncOperationLinkObject): return response try: await response.wait( poll_interval=poll_interval, poll_timeout=poll_timeout, **kwargs ) except RetriableYaDiskError as e: # We want to trigger a full retry (including the operation iteslf) # only if the asynchronous operation failed if not isinstance(e, AsyncOperationFailedError): e.disable_retry = True else: settings.logger.info("asynchronous operation failed, attempting to restart it") raise e from None return response return await request.asend(yadisk=self, then=then) else: return await request.asend(yadisk=self) def get_auth_url( self, type: Union[Literal["code"], Literal["token"]], device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None, ) -> str: """ Get authentication URL for the user to go to. This method doesn't send any HTTP requests and merely constructs the URL. :param type: response type ("code" to get the confirmation code or "token" to get the token automatically) :param device_id: unique device ID, must be between 6 and 50 characters :param device_name: device name, should not be longer than 100 characters :param redirect_uri: the URL to redirect the user to after they allow access to the app, by default, the first redirect URI specified in the app settings is used :param display: doesn't do anything, kept for compatibility :param login_hint: username or email for the account the token is being requested for :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param force_confirm: if True, user will be required to confirm access to the account even if the user has already granted access for the application :param state: The state string, which Yandex.OAuth returns without any changes (<= 1024 characters) :param code_challenge: string derived from the generated :code:`code_verifier` value using one of the two possible transformations (plain or S256) :param code_challenge_method: specifies what function was used to transform the :code:`code_verifier` value to :code:`code_challenge`, allowed values are :code:`"plain"` and :code:`"S256"` (recommended). If :code:`"S256"` is used, :code:`code_challenge` must be produced by hashing the :code:`code_verifier` value and encoding it to base64 :raises ValueError: invalid arguments were passed :returns: authentication URL """ if type not in ("code", "token"): raise ValueError("type must be either 'code' or 'token'") if code_challenge_method not in (None, "plain", "S256"): raise ValueError("code_challenge_method must be either 'plain' or 'S256'") params = {"response_type": type, "client_id": self.id, "force_confirm": "yes" if force_confirm else "no"} if device_id is not None: params["device_id"] = device_id if device_name is not None: params["device_name"] = device_name if redirect_uri is not None: params["redirect_uri"] = redirect_uri if login_hint is not None: params["login_hint"] = login_hint if scope is not None: params["scope"] = " ".join(scope) if optional_scope is not None: params["optional_scope"] = " ".join(optional_scope) if state is not None: params["state"] = state if code_challenge is not None: params["code_challenge"] = code_challenge if code_challenge_method is not None: params["code_challenge_method"] = code_challenge_method return "https://oauth.yandex.ru/authorize?" + urlencode(params) def get_code_url( self, device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: """ Get the URL for the user to get the confirmation code. The confirmation code can later be used to get the token. This method doesn't send any HTTP requests and merely constructs the URL. :param device_id: unique device ID, must be between 6 and 50 characters :param device_name: device name, should not be longer than 100 characters :param redirect_uri: the URL to redirect the user to after they allow access to the app, by default, the first redirect URI specified in the app settings is used :param display: doesn't do anything, kept for compatibility :param login_hint: username or email for the account the token is being requested for :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param force_confirm: if True, user will be required to confirm access to the account even if the user has already granted access for the application :param state: The state string, which Yandex.OAuth returns without any changes (<= 1024 characters) :param code_challenge: string derived from the generated :code:`code_verifier` value using one of the two possible transformations (plain or S256) :param code_challenge_method: specifies what function was used to transform the :code:`code_verifier` value to :code:`code_challenge`, allowed values are :code:`"plain"` and :code:`"S256"` (recommended). If :code:`"S256"` is used, :code:`code_challenge` must be produced by hashing the :code:`code_verifier` value and encoding it to base64 :raises ValueError: invalid arguments were passed :returns: authentication URL """ return self.get_auth_url( "code", device_id=device_id, device_name=device_name, redirect_uri=redirect_uri, display=display, login_hint=login_hint, scope=scope, optional_scope=optional_scope, force_confirm=force_confirm, state=state, code_challenge=code_challenge, code_challenge_method=code_challenge_method ) async def get_device_code(self, **kwargs) -> "DeviceCodeObject": """ This request is used for authorization using the Yandex OAuth page. In this case the user must enter the verification code (:code:`user_code`) in the browser on the Yandex OAuth page. After the user has entered the code on the OAuth page, the application can exchange the :code:`device_code` for the token using the :any:`AsyncClient.get_token_from_device_code()`. :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`DeviceCodeObject` containing :code:`user_code` and :code:`device_code` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return await GetDeviceCodeRequest(self.session, self.id, **kwargs).asend(yadisk=self) async def get_token(self, code: str, /, **kwargs) -> "TokenObject": """ Get a new token. :param code: confirmation code :param device_id: unique device ID (between 6 and 50 characters) :param code_verifier: `str`, verifier code, used with the PKCE authorization flow :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises BadVerificationCodeError: confirmation code has invalid format :raises InvalidGrantError: invalid or expired confirmation code :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return await GetTokenRequest( self.session, "authorization_code", self.id, code=code, client_secret=self.secret, **kwargs ).asend(yadisk=self) async def get_token_from_device_code(self, device_code: str, /, **kwargs) -> "TokenObject": """ Get a new token from a device code, previously obtained with :any:`AsyncClient.get_device_code()`. :param device_code: device code, obtained from :any:`AsyncClient.get_device_code()` :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param code_verifier: `str`, verifier code, used with the PKCE authorization flow :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises AuthorizationPendingError: user has not authorized the application yet :raises BadVerificationCodeError: :code:`device_code` has invalid format :raises InvalidGrantError: invalid or expired :code:`device_code` :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return await GetTokenRequest( self.session, "device_code", client_id=self.id, code=device_code, client_secret=self.secret, **kwargs ).asend(yadisk=self) async def refresh_token(self, refresh_token: str, /, **kwargs) -> "TokenObject": """ Refresh an existing token. :param refresh_token: the refresh token that was received with the token :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidGrantError: invalid or expired refresh token or it doesn't belong to this application :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return await RefreshTokenRequest( self.session, refresh_token, self.id, self.secret, **kwargs ).asend(yadisk=self) async def revoke_token( self, token: Optional[str] = None, /, **kwargs ) -> "TokenRevokeStatusObject": """ Revoke the token. :param token: token to revoke, equivalent to `self.token` if `None` :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidGrantError: specified token doesn't belong to this application :raises InvalidClientError: invalid client ID or client secret :raises UnsupportedTokenTypeError: token could not be revoked because it doesn't have a :code:`device_id` :raises BadRequestError: invalid request parameters :returns: :any:`TokenRevokeStatusObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") if token is None: token = self.token return await RevokeTokenRequest( self.session, token, self.id, self.secret, **kwargs ).asend(yadisk=self) async def get_disk_info(self, **kwargs) -> "DiskInfoObject": """ Get disk information. :param extra_fields: list of additional keys to be included in the response :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`DiskInfoObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await DiskInfoRequest(self.session, **kwargs).asend(yadisk=self) async def get_meta(self, path: str, /, **kwargs) -> "AsyncResourceObject": """ Get meta information about a file/directory. :param path: path to the resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return await GetMetaRequest(self.session, path, **kwargs).asend(yadisk=self, then=_then) async def exists(self, path: str, /, **kwargs) -> bool: """ Check whether `path` exists. :param path: path to the resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return await _exists(self.get_meta, path, **kwargs) async def get_type(self, path: str, /, **kwargs) -> str: """ Get resource type. :param path: path to the resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return await _get_type(self.get_meta, path, **kwargs) async def is_file(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a file. :param path: path to the resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_type(path, **kwargs)) == "file" except PathNotFoundError: return False async def is_dir(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a directory. :param path: path to the resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_type(path, **kwargs)) == "dir" except PathNotFoundError: return False async def listdir( self, path: str, /, **kwargs ) -> AsyncGenerator["AsyncResourceObject", None]: """ Get contents of `path`. :param path: path to the directory :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: async generator of :any:`AsyncResourceObject` """ async for file in _listdir(self.get_meta, path, **kwargs): yield file async def get_upload_link( self, path: str, /, spoof_user_agent: bool = True, **kwargs ) -> str: """ Get a link to upload the file using the PUT request. :param path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is used to bypass Yandex.Disk's upload speed limit for some file types if spoof_user_agent: _add_spoof_user_agent_header(kwargs) return ( await GetUploadLinkRequest( self.session, path, fields=["href"], **kwargs ).asend(yadisk=self, then=_validate_link_response) ).href async def get_upload_link_object( self, path: str, /, spoof_user_agent: bool = True, **kwargs ) -> ResourceUploadLinkObject: """ Get a link to upload the file using the PUT request. This is similar to :any:`AsyncClient.get_upload_link()`, except it returns an instance of :any:`ResourceUploadLinkObject` which also contains an asynchronous operation ID. :param path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`ResourceUploadLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is used to bypass Yandex.Disk's upload speed limit for some file types if spoof_user_agent: _add_spoof_user_agent_header(kwargs) return await GetUploadLinkRequest( self.session, path, **kwargs ).asend(yadisk=self) async def _upload(self, get_upload_link_function: Callable[..., Awaitable[str]], file_or_path: AsyncFileOrPath, dst_path: str, /, **kwargs) -> None: timeout = kwargs.get("timeout", ...) if timeout is ...: timeout = settings.DEFAULT_UPLOAD_TIMEOUT retry_interval = kwargs.get("retry_interval") if retry_interval is None: retry_interval = settings.DEFAULT_UPLOAD_RETRY_INTERVAL n_retries = kwargs.get("n_retries") if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES # Number of retries for getting the upload link. # It is set to 0, unless the file is not seekable, in which case # we have to use a different retry scheme n_retries_for_upload_link = 0 kwargs["timeout"] = timeout # Make sure we don't get any inconsistent behavior with header names kwargs["headers"] = CaseInsensitiveDict(kwargs.get("headers") or {}) file: Any = None close_file = False generator_factory: Optional[Callable[[], AsyncGenerator]] = None file_position = 0 session = self.session try: if isinstance(file_or_path, (str, bytes)): close_file = True file = await self.open_file(file_or_path, "rb") elif inspect.isasyncgenfunction(file_or_path): generator_factory = file_or_path else: close_file = False file = file_or_path if generator_factory is None: if await _is_file_seekable(file): file_position = await _file_tell(file) else: n_retries, n_retries_for_upload_link = 0, n_retries async def attempt() -> None: temp_kwargs = dict(kwargs) temp_kwargs["n_retries"] = n_retries_for_upload_link temp_kwargs["retry_interval"] = 0.0 link = await get_upload_link_function(dst_path, **temp_kwargs) # session.get() doesn't accept some of the passed parameters _filter_request_kwargs(temp_kwargs) # Disable keep-alive by default, since the upload server is random temp_kwargs["headers"].setdefault("Connection", "close") # This is generally not necessary, libraries like aiohttp # will generally always set this header while others might not # We're setting content-type here just to fix this inconsistency, # this makes testing easier temp_kwargs["headers"].setdefault("Content-Type", "application/octet-stream") data: Any = None if generator_factory is None: if await _is_file_seekable(file): await _file_seek(file, file_position) if is_async_func(file.read): data = read_in_chunks(file) else: data = read_in_chunks_sync(file) else: data = generator_factory() settings.logger.info(f"uploading file to {dst_path} at {link}") async with await session.send_request("PUT", link, data=data, **temp_kwargs) as response: if response.status != 201: raise await response.get_exception() await auto_retry(attempt, n_retries, retry_interval) finally: if close_file and file is not None: if is_async_func(file.close): await file.close() else: file.close() async def upload( self, path_or_file: AsyncFileOrPath, dst_path: str, /, **kwargs ) -> AsyncResourceLinkObject: """ Upload a file to disk. :param path_or_file: path, file-like object or an async generator function to be uploaded :param dst_path: destination path :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`AsyncResourceLinkObject`, link to the destination resource """ _apply_default_args(kwargs, self.default_args) await self._upload(self.get_upload_link, path_or_file, dst_path, **kwargs) return AsyncResourceLinkObject.from_path(dst_path, yadisk=self) async def upload_by_link(self, file_or_path: AsyncFileOrPath, link: str, /, **kwargs) -> None: """ Upload a file to disk using an upload link. :param file_or_path: path, file-like object or an async generator function to be uploaded :param link: upload link :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InsufficientStorageError: cannot upload file due to lack of storage space """ _apply_default_args(kwargs, self.default_args) async def get_link(*args, **kwargs) -> str: return link await self._upload(get_link, file_or_path, "", **kwargs) async def get_download_link(self, path: str, /, **kwargs) -> str: """ Get a download link for a file (or a directory). :param path: path to the resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return ( await GetDownloadLinkRequest( self.session, path, fields=["href"], **kwargs ).asend(yadisk=self, then=_validate_link_response) ).href async def _download( self, get_download_link_function: Callable[..., Awaitable[str]], src_path: str, file_or_path: AsyncFileOrPathDestination, /, **kwargs ) -> None: n_retries = kwargs.get("n_retries") if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES # Number of retries for getting the download link. # It is set to 0, unless the file is not seekable, in which case # we have to use a different retry scheme n_retries_for_download_link = 0 retry_interval = kwargs.get("retry_interval") if retry_interval is None: retry_interval = settings.DEFAULT_RETRY_INTERVAL timeout = kwargs.get("timeout", ...) if timeout is ...: timeout = settings.DEFAULT_TIMEOUT kwargs["timeout"] = timeout file: Any = None close_file = False file_position = 0 session = self.session try: if isinstance(file_or_path, (str, bytes)): close_file = True file = await self.open_file(file_or_path, "wb") else: close_file = False file = file_or_path if await _is_file_seekable(file): file_position = await _file_tell(file) else: n_retries, n_retries_for_download_link = 0, n_retries async def attempt() -> None: temp_kwargs = dict(kwargs) temp_kwargs["n_retries"] = n_retries_for_download_link temp_kwargs["retry_interval"] = 0.0 link = await get_download_link_function(src_path, **temp_kwargs) # session.get() doesn't accept some of the passed parameters _filter_request_kwargs(temp_kwargs) temp_kwargs.setdefault("stream", True) if await _is_file_seekable(file): await _file_seek(file, file_position) settings.logger.info(f"downloading file {src_path} from {link}") async with await session.send_request("GET", link, **temp_kwargs) as response: if response.status != 200: raise await response.get_exception() await response.download(file.write) return await auto_retry(attempt, n_retries, retry_interval) finally: if close_file and file is not None: if is_async_func(file.close): await file.close() else: file.close() async def download( self, src_path: str, path_or_file: AsyncFileOrPathDestination, /, **kwargs ) -> AsyncResourceLinkObject: """ Download the file. :param src_path: source path :param path_or_file: destination path or file-like object :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceLinkObject`, link to the source resource """ _apply_default_args(kwargs, self.default_args) await self._download(self.get_download_link, src_path, path_or_file, **kwargs) return AsyncResourceLinkObject.from_path(src_path, yadisk=self) async def download_by_link( self, link: str, file_or_path: AsyncFileOrPathDestination, /, **kwargs ) -> None: """ Download the file from the link. :param link: download link :param file_or_path: destination path or file-like object :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` """ _apply_default_args(kwargs, self.default_args) async def get_link(*args, **kwargs) -> str: return link await self._download(get_link, "", file_or_path, **kwargs) async def remove( self, path: str, /, **kwargs ) -> Optional[AsyncOperationLinkObject]: """ Remove the resource. :param path: path to the resource to be removed :param permanently: if `True`, the resource will be removed permanently, otherwise, it will be just moved to the trash :param md5: `str`, MD5 hash of the file to remove :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises BadRequestError: MD5 check is only available for files :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(DeleteRequest, path, **kwargs) async def mkdir(self, path: str, /, **kwargs) -> AsyncResourceLinkObject: """ Create a new directory. :param path: path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await MkdirRequest(self.session, path, **kwargs).asend(yadisk=self) async def makedirs(self, path: str, /, **kwargs) -> AsyncResourceLinkObject: """ Create a new directory at `path`. If its parent directory doesn't exist it will also be created recursively. :param path: path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceLinkObject` """ while True: try: return await self.mkdir(path, **kwargs) except ParentNotFoundError as e: # We first have to remove the scheme, otherwise posixpath.split() # may treat it as part of the path scheme, path_without_scheme = remove_path_scheme(path) # Extract the parent directory head, _tail = posixpath.split(path_without_scheme) head = head.strip("/") if head == "": # We should never find ourselves in this situation raise e from None # Restore the scheme if scheme: head = f"{scheme}:/{head}" await self.makedirs(head, **kwargs) async def check_token(self, token: Optional[str] = None, /, **kwargs) -> bool: """ Check whether the token is valid. :param token: token to check, equivalent to `self.token` if `None` :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :returns: `bool` """ # Any ID will do, doesn't matter whether it exists or not fake_operation_id = "0000" if token is None: token = self.token if not token: return False _set_authorization_header(kwargs, token) try: # get_operation_status() doesn't require any permissions, unlike most other requests await self.get_operation_status(fake_operation_id, **kwargs) return True except OperationNotFoundError: return True except UnauthorizedError: return False async def get_trash_meta(self, path: str, /, **kwargs) -> "AsyncTrashResourceObject": """ Get meta information about a trash resource. :param path: path to the trash resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncTrashResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return await GetTrashRequest( self.session, path, **kwargs ).asend(yadisk=self, then=_then) async def trash_exists(self, path: str, /, **kwargs) -> bool: """ Check whether the trash resource at `path` exists. :param path: path to the trash resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return await _exists(self.get_trash_meta, path, **kwargs) async def copy( self, src_path: str, dst_path: str, /, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: """ Copy `src_path` to `dst_path`. If the operation is performed asynchronously, returns the link to the operation, otherwise, returns the link to the newly created resource. :param src_path: source path :param dst_path: destination path :param overwrite: if `True` the destination path can be overwritten, otherwise, an error will be raised :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises InsufficientStorageError: cannot complete request due to lack of storage space :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(CopyRequest, src_path, dst_path, **kwargs) async def restore_trash( self, path: str, dst_path: Optional[str] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: """ Restore a trash resource. Returns a link to the newly created resource or a link to the asynchronous operation. :param path: path to the trash resource to restore :param dst_path: destination path :param overwrite: `bool`, determines whether the destination can be overwritten :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait( RestoreTrashRequest, path, dst_path=dst_path, **kwargs ) async def move( self, src_path: str, dst_path: str, /, **kwargs ) -> Union[AsyncOperationLinkObject, AsyncResourceLinkObject]: """ Move `src_path` to `dst_path`. :param src_path: source path to be moved :param dst_path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(MoveRequest, src_path, dst_path, **kwargs) async def rename( self, src_path: str, new_name: str, /, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: """ Rename `src_path` to have filename `new_name`. Does the same as `move()` but changes only the filename. :param src_path: source path to be moved :param new_name: target filename to rename to :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises ValueError: `new_name` is not a valid filename or `src_path` is root :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ new_name = new_name.rstrip("/") if "/" in new_name or new_name in (".", "..", ""): raise ValueError(f"Invalid filename: {new_name}") # Remove scheme first, otherwise PurePosixPath will treat it as part of the path scheme, src_path_without_scheme = remove_path_scheme(src_path) sanitized_src_path = PurePosixPath(src_path_without_scheme.strip("/")) if len(sanitized_src_path.parts) == 0: raise ValueError("Cannot rename root") dst_path = str(sanitized_src_path.parent / new_name) # Restore scheme back if scheme: dst_path = f"{scheme}:/{dst_path}" return await self.move(src_path, dst_path, **kwargs) async def remove_trash( self, path: str, /, **kwargs ) -> Optional[AsyncOperationLinkObject]: """ Remove a trash resource. :param path: path to the trash resource to be deleted :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(DeleteTrashRequest, path, **kwargs) async def publish(self, path: str, /, **kwargs) -> AsyncResourceLinkObject: """ Make a resource public. :param path: path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param public_settings: :any:`PublicSettings` or `None`, public access settings for the resource :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject`, link to the resource """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await PublishRequest(self.session, path, **kwargs).asend(yadisk=self) async def unpublish(self, path: str, /, **kwargs) -> AsyncResourceLinkObject: """ Make a public resource private. :param path: path to the resource to be unpublished :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await UnpublishRequest(self.session, path, **kwargs).asend(yadisk=self) async def get_public_settings(self, path: str, /, **kwargs) -> PublicSettingsObject: """ Get public settings of a resource. :param path: path to the resource :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ :returns: :any:`PublicSettingsObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await GetPublicSettingsRequest(self.session, path, **kwargs).asend(yadisk=self) async def get_public_available_settings(self, path: str, /, **kwargs) -> PublicAvailableSettingsObject: """ Get public settings of a shared resource for the current OAuth token owner. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ :returns: :any:`PublicAvailableSettingsObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await GetPublicAvailableSettingsRequest(self.session, path, **kwargs).asend(yadisk=self) async def update_public_settings(self, path: str, public_settings: PublicSettings, /, **kwargs) -> None: """ Update public settings of a shared resource. :param path: path to the resource :param public_settings: :any:`PublicSettings`, public access settings for the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `None` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await UpdatePublicSettingsRequest(self.session, path, public_settings, **kwargs).asend(yadisk=self) async def save_to_disk( self, public_key: str, /, **kwargs ) -> Union[AsyncResourceLinkObject, "AsyncOperationLinkObject"]: """ Saves a public resource to the disk. Returns the link to the operation if it's performed asynchronously, or a link to the resource otherwise. :param public_key: public key or public URL of the resource :param name: filename of the saved resource :param path: path to the copied resource in the public folder :param save_path: path to the destination directory (downloads directory by default) :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(SaveToDiskRequest, public_key, **kwargs) async def get_public_meta(self, public_key: str, /, **kwargs) -> "AsyncPublicResourceObject": """ Get meta-information about a public resource. :param public_key: public key or public URL of the resource :param path: relative path to a resource in a public folder. By specifying the key of the published folder in `public_key`, you can request metainformation for any resource in the folder. :param offset: offset from the beginning of the list of nested resources :param limit: maximum number of nested elements to be included in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: file preview size :param preview_crop: `bool`, allow preview crop :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncPublicResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return await GetPublicMetaRequest( self.session, public_key, **kwargs ).asend(yadisk=self, then=_then) async def public_exists(self, public_key: str, /, **kwargs) -> bool: """ Check whether the public resource exists. :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return await _exists(self.get_public_meta, public_key, **kwargs) async def public_listdir( self, public_key: str, /, **kwargs ) -> AsyncGenerator["AsyncPublicResourceObject", None]: """ Get contents of a public directory. :param public_key: public key or public URL of the resource :param path: relative path to the resource in the public folder. By specifying the key of the published folder in `public_key`, you can request contents of any nested folder. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: async generator of :any:`AsyncPublicResourceObject` """ async for file in _listdir(self.get_public_meta, public_key, **kwargs): yield file async def get_public_type(self, public_key: str, /, **kwargs) -> str: """ Get public resource type. :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return await _get_type(self.get_public_meta, public_key, **kwargs) async def is_public_dir(self, public_key: str, /, **kwargs) -> bool: """ Check whether `public_key` is a public directory. :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `public_key` is a directory, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_public_type(public_key, **kwargs)) == "dir" except PathNotFoundError: return False async def is_public_file(self, public_key: str, /, **kwargs) -> bool: """ Check whether `public_key` is a public file. :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `public_key` is a file, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_public_type(public_key, **kwargs)) == "file" except PathNotFoundError: return False async def trash_listdir( self, path: str, /, **kwargs ) -> AsyncGenerator["AsyncTrashResourceObject", None]: """ Get contents of a trash resource. :param path: path to the directory in the trash bin :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: async generator of :any:`AsyncTrashResourceObject` """ async for file in _listdir(self.get_trash_meta, path, **kwargs): yield file async def get_trash_type(self, path: str, /, **kwargs) -> str: """ Get trash resource type. :param path: path to the trash resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return await _get_type(self.get_trash_meta, path, **kwargs) async def is_trash_dir(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a trash directory. :param path: path to the trash resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_trash_type(path, **kwargs)) == "dir" except PathNotFoundError: return False async def is_trash_file(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a trash file. :param path: path to the trash resource :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ try: return (await self.get_trash_type(path, **kwargs)) == "file" except PathNotFoundError: return False async def get_public_resources(self, **kwargs) -> "AsyncPublicResourcesListObject": """ Get a list of public resources. :param offset: offset from the beginning of the list :param limit: maximum number of elements in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param type: filter based on type of resources ("file" or "dir") :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncPublicResourcesListObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await GetPublicResourcesRequest(self.session, **kwargs).asend(yadisk=self) async def get_all_public_resources( self, *, max_items: Optional[int] = None, **kwargs ) -> AsyncGenerator[AsyncPublicResourceObject, None]: """ Get a list of all public resources. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param offset: offset from the beginning of the list :param limit: maximum number of elements in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param type: filter based on type of resources ("file" or "dir") :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: async generator of :any:`AsyncPublicResourceObject` """ if kwargs.get("offset") is None: kwargs["offset"] = 0 if kwargs.get("limit") is None: kwargs["limit"] = 100 remaining_items = max_items while True: # Do not query more items than necessary if remaining_items is not None: kwargs["limit"] = min(remaining_items, kwargs["limit"]) files = (await self.get_public_resources(**kwargs)).items or [] file_count = len(files) for i in files[:remaining_items]: yield i if remaining_items is not None: remaining_items -= file_count if remaining_items <= 0: break if file_count < kwargs["limit"]: break kwargs["offset"] += kwargs["limit"] async def patch(self, path: str, properties: dict, /, **kwargs) -> "AsyncResourceObject": """ Update custom properties of a resource. :param path: path to the resource :param properties: `dict`, custom properties to update :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await PatchRequest(self.session, path, properties, **kwargs).asend(yadisk=self) async def _get_files_some(self, **kwargs) -> List["AsyncResourceObject"]: def validate_response(response: "AsyncFilesResourceListObject") -> "AsyncFilesResourceListObject": if response.items is None: raise InvalidResponseError("Response did not contain key field") return response items: List["AsyncResourceObject"] = ( await FilesRequest( self.session, **kwargs ).asend(yadisk=self, then=validate_response) ).items return items async def get_files( self, *, max_items: Optional[int] = None, **kwargs ) -> AsyncGenerator["AsyncResourceObject", None]: """ Get a flat list of all files (that doesn't include directories). :param offset: offset from the beginning of the list :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of list elements to be included in each response :param media_type: type of files to include in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: async generator of :any:`AsyncResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) if kwargs.get("offset") is None: kwargs["offset"] = 0 if kwargs.get("limit") is None: kwargs["limit"] = 200 remaining_items = max_items while True: # Do not query more items than necessary if remaining_items is not None: kwargs["limit"] = min(remaining_items, kwargs["limit"]) files = await self._get_files_some(**kwargs) file_count = len(files) for file in files[:remaining_items]: yield file if remaining_items is not None: remaining_items -= file_count if remaining_items <= 0: break if file_count < kwargs["limit"]: break kwargs["offset"] += kwargs["limit"] async def get_last_uploaded(self, **kwargs) -> List["AsyncResourceObject"]: """ Get the list of latest uploaded files sorted by upload date. :param limit: maximum number of elements in the list :param media_type: type of files to include in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: async generator of :any:`AsyncResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) def validate_response( response: "AsyncLastUploadedResourceListObject" ) -> "AsyncLastUploadedResourceListObject": if response.items is None: raise InvalidResponseError("Response did not contain key field") return response items: List["AsyncResourceObject"] = ( await LastUploadedRequest( self.session, **kwargs ).asend(yadisk=self, then=validate_response) ).items return items async def upload_url( self, url: str, path: str, /, **kwargs ) -> AsyncOperationLinkObject: """ Upload a file from URL. :param url: source URL :param path: destination path :param disable_redirects: `bool`, forbid redirects :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`AsyncOperationLinkObject`, link to the asynchronous operation """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return await self._maybe_wait(UploadURLRequest, url, path, **kwargs) async def get_public_download_link(self, public_key: str, /, **kwargs) -> str: """ Get a download link for a public resource. :param public_key: public key or public URL of the resource :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return ( await GetPublicDownloadLinkRequest( self.session, public_key, fields=["href"], **kwargs ).asend(yadisk=self, then=_validate_link_response) ).href async def download_public( self, public_key: str, file_or_path: AsyncFileOrPathDestination, /, **kwargs ) -> AsyncPublicResourceLinkObject: """ Download the public resource. :param public_key: public key or public URL of the resource :param file_or_path: destination path or file-like object :param path: relative path to the resource within the public folder :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncPublicResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) await self._download( lambda public_key, **kwargs: self.get_public_download_link(public_key, **kwargs), public_key, file_or_path, **kwargs) return AsyncPublicResourceLinkObject.from_public_key(public_key, yadisk=self) async def get_operation_status(self, operation_id: str, /, **kwargs) -> OperationStatus: """ Get operation status. :param operation_id: ID of the operation or a link :param timeout: `float`, `tuple` or `None`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str`, :code:`"in-progress"` indicates that the operation is currently running, :code:`"success"` indicates that the operation was successful, :code:`"failed"` means that the operation failed """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return ( await GetOperationStatusRequest( self.session, operation_id, fields=["status"], **kwargs ).asend(yadisk=self) ).status async def wait_for_operation( self, operation_id: str, /, *, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, **kwargs ) -> None: """ Wait until an operation is completed. If the operation fails, an exception is raised. Waiting is performed by calling :any:`asyncio.sleep`. :param operation_id: ID of the operation or a link :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) """ async def poll() -> None: while (status := await self.get_operation_status(operation_id, **kwargs)) == "in-progress": await asyncio.sleep(poll_interval) if status != "success": raise AsyncOperationFailedError("Asynchronous operation failed") try: await asyncio.wait_for(poll(), timeout=poll_timeout) except asyncio.exceptions.TimeoutError as e: raise AsyncOperationPollingTimeoutError("Asynchronous operation did not complete in specified time") from e ================================================ FILE: src/yadisk/_async_client.pyi ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Optional, Any, Union, Literal, overload from ._typing_compat import Dict, AsyncGenerator, Iterable, List, Tuple, Type from .objects import ( DeviceCodeObject, TokenObject, TokenRevokeStatusObject, DiskInfoObject, AsyncResourceObject, AsyncResourceLinkObject, AsyncOperationLinkObject, AsyncTrashResourceObject, AsyncPublicResourceObject, AsyncPublicResourcesListObject, AsyncPublicResourceLinkObject, ResourceUploadLinkObject, PublicAvailableSettingsObject, PublicSettingsObject ) from .types import ( AsyncFileOrPath, AsyncFileOrPathDestination, Headers, OperationStatus, AsyncSession, AsyncSessionName, AsyncSessionFactory, AsyncOpenFileCallback, TimeoutParameter, PublicSettings ) __all__ = ["AsyncClient"] class AsyncClient: id: str secret: str token: str default_args: Dict[str, Any] session: AsyncSession open_file: AsyncOpenFileCallback synchronous = False def __init__( self, id: str = "", secret: str = "", token: str = "", *, default_args: Optional[Dict[str, Any]] = None, session: Optional[Union[AsyncSession, AsyncSessionName]] = None, open_file: Optional[AsyncOpenFileCallback] = None, session_factory: Optional[AsyncSessionFactory] = None ) -> None: ... async def __aenter__(self): ... async def __aexit__(self, *args, **kwargs) -> None: ... async def close(self) -> None: ... def get_auth_url( self, type: Union[Literal["code"], Literal["token"]], device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: ... def get_code_url( self, device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: ... async def get_device_code( self, *, device_id: Optional[str] = None, device_name: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> DeviceCodeObject: ... async def get_token( self, code: str, /, *, device_id: Optional[str] = None, device_name: Optional[str] = None, code_verifier: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> TokenObject: ... async def get_token_from_device_code( self, device_code: str, /, *, device_id: Optional[str] = None, device_name: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> TokenObject: ... async def refresh_token( self, refresh_token: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> TokenObject: ... async def revoke_token( self, token: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> TokenRevokeStatusObject: ... async def check_token( self, token: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def get_disk_info( self, *, extra_fields: Optional[Iterable[str]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> DiskInfoObject: ... async def get_meta( self, path: str, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceObject: ... async def exists( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def get_type( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def is_file( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def is_dir( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def listdir( self, path: str, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncResourceObject() async def get_upload_link( self, path: str, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def get_upload_link_object( self, path: str, /, *, overwrite: bool = False, fields: Optional[Iterable[str]] = None, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> ResourceUploadLinkObject: ... async def upload( self, file_or_path: AsyncFileOrPath, dst_path: str, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def upload_by_link( self, file_or_path: AsyncFileOrPath, link: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> None: ... async def get_download_link( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def download( self, src_path: str, file_or_path: AsyncFileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def download_by_link( self, link: str, file_or_path: AsyncFileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> None: ... @overload async def remove( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, md5: Optional[str] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def remove( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, md5: Optional[str] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Optional[AsyncOperationLinkObject]: ... async def mkdir( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def makedirs( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def get_trash_meta( self, path: str, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncTrashResourceObject: ... async def trash_exists( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... @overload async def copy( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def copy( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def restore_trash( self, path: str, /, dst_path: Optional[str] = None, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def restore_trash( self, path: str, /, dst_path: Optional[str] = None, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def move( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def move( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def rename( self, src_path: str, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def rename( self, src_path: str, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def remove_trash( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def remove_trash( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Optional[AsyncOperationLinkObject]: ... async def publish( self, path: str, /, *, allow_address_access: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def unpublish( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceLinkObject: ... async def get_public_settings( self, path: str, /, allow_address_access: bool = False, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> PublicSettingsObject: ... async def get_public_available_settings( self, path: str, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> PublicAvailableSettingsObject: ... async def update_public_settings( self, path: str, public_settings: PublicSettings, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> None: ... @overload async def save_to_disk( self, public_key: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, name: Optional[str] = None, path: Optional[str] = None, save_path: Optional[str] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def save_to_disk( self, public_key: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, name: Optional[str] = None, path: Optional[str] = None, save_path: Optional[str] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... async def get_public_meta( self, public_key: str, /, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncPublicResourceObject: ... async def public_exists( self, public_key: str, /, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def public_listdir( self, public_key: str, /, *, path: Optional[str] = None, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncPublicResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncPublicResourceObject() async def get_public_type( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def is_public_dir( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def is_public_file( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def trash_listdir( self, path: str, /, *, limit: Optional[int] = None, max_items: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncTrashResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncTrashResourceObject() async def get_trash_type( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def is_trash_dir( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def is_trash_file( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def get_public_resources( self, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, type: Optional[Union[Literal["file"], Literal["dir"]]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncPublicResourcesListObject: ... async def get_all_public_resources( self, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, type: Optional[Union[Literal["file"], Literal["dir"]]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncPublicResourceObject, None]: yield AsyncPublicResourceObject() async def patch( self, path: str, properties: dict, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncResourceObject: ... async def get_files( self, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, media_type: Optional[Union[str, Iterable[str]]] = None, sort: Optional[str] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncResourceObject() async def get_last_uploaded( self, *, limit: Optional[int] = None, media_type: Optional[Union[str, Iterable[str]]] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> List[AsyncResourceObject]: ... async def upload_url( self, url: str, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, disable_redirects: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... async def get_public_download_link( self, public_key: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def download_public( self, public_key: str, file_or_path: AsyncFileOrPathDestination, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncPublicResourceLinkObject: ... async def get_operation_status( self, operation_id: str, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> OperationStatus: ... async def wait_for_operation( self, operation_id: str, /, *, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> None: ... ================================================ FILE: src/yadisk/_async_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import TYPE_CHECKING, Any, Optional, TypeVar from ._typing_compat import Dict from .types import ( AsyncConsumeCallback, JSON, HTTPMethod, AsyncPayload, Headers, TimeoutParameter ) from .objects import ErrorObject from .utils import get_exception if TYPE_CHECKING: # pragma: no cover from .exceptions import YaDiskError __all__ = ["AsyncResponse", "AsyncSession"] class AsyncResponse: """ Represents an HTTP response. In case an error occurs, methods of this class should throw one of exceptions derived from :any:`YaDiskError`. :ivar status: `int`, HTTP status code """ _Self = TypeVar("_Self", bound="AsyncResponse") status: int def __init__(self) -> None: """Constructs an :any:`AsyncResponse` object.""" self.status = 0 async def json(self) -> JSON: """ Returns JSON-content of the response (parses JSON). .. note:: This is an abstract method that needs to be implemented. :raises RequestError: could not receive the response's body :raises ValueError: could not parse JSON :returns: `dict`, `list`, `str`, `int`, `float` or `None` """ raise NotImplementedError async def download(self, consume_callback: AsyncConsumeCallback) -> None: """ Downloads response's content. .. note:: This is an abstract method that needs to be implemented. :param consume_callback: regular or async function, takes one parameter - chunk of data (bytes), consumes the chunk (e.g. by writing to a file) :raises RequestError: could not receive the response's body """ raise NotImplementedError async def get_exception(self) -> "YaDiskError": """ Convenience wrapper for :any:`yadisk.utils.get_exception`. :returns: :any:`YaDiskError` """ try: js = await self.json() except ValueError: js = None error = ErrorObject(js) return get_exception(self, error) async def close(self) -> None: """ Closes the response and releases the underlying connection into the pool. .. note:: This is an abstract method that needs to be implemented. """ raise NotImplementedError async def __aenter__(self: _Self) -> _Self: return self async def __aexit__(self, *args, **kwargs) -> None: """Closes the response and releases the underlying connection into the pool""" await self.close() class AsyncSession: """ HTTP session class. Maintains open connections, stores headers and some other request parameters. Must be explicitly closed (can be done using the `with` statement). """ _Self = TypeVar("_Self", bound="AsyncSession") async def send_request(self, method: HTTPMethod, url: str, *, params: Optional[Dict[str, Any]] = None, data: Optional[AsyncPayload] = None, timeout: TimeoutParameter = ..., headers: Optional[Headers] = None, stream: bool = False, **kwargs) -> AsyncResponse: """ Sends an HTTP request with given parameters. In case an error occurs, the method should throw one of exceptions derived from :any:`YaDiskError`. Additional keyword arguments may be passed, they may be forwarded to the underlying HTTP client without modification. .. note:: This is an abstract method that needs to be implemented. :param method: `str`, HTTP method :param url: `str`, URL :param params: `dict`, GET parameters :param data: `bytes`, iterator (possibly async) or a file-like object (possible async), data to be sent in the request body :param headers: `dict`, additional headers to be set :param timeout: request timeout, a `tuple` of `(read timeout, connect timeout)`, `float` or `None` (no timeout) :param stream: `bool`, if `False`, the response content will be immediately downloaded :returns: :any:`Response`, response object """ raise NotImplementedError async def close(self) -> None: """ Closes the session. .. note:: This is an abstract method that needs to be implemented. """ raise NotImplementedError async def __aenter__(self: _Self) -> _Self: return self async def __aexit__(self, *args, **kwargs) -> None: """Closes the session.""" return await self.close() ================================================ FILE: src/yadisk/_client.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from pathlib import PurePosixPath import posixpath import time from urllib.parse import urlencode from ._api import * from .exceptions import ( AsyncOperationFailedError, AsyncOperationPollingTimeoutError, ParentNotFoundError, PathNotFoundError, RetriableYaDiskError, UnauthorizedError, OperationNotFoundError, InvalidResponseError, WrongResourceTypeError ) from .utils import auto_retry, CaseInsensitiveDict from .objects import ( SyncResourceLinkObject, SyncPublicResourceLinkObject, SyncTrashResourceObject, SyncFilesResourceListObject, SyncResourceObject, SyncLastUploadedResourceListObject, SyncOperationLinkObject, SyncPublicResourceObject, SyncPublicResourcesListObject, DiskInfoObject, TokenObject, TokenRevokeStatusObject, DeviceCodeObject, ResourceUploadLinkObject, PublicSettingsObject, PublicAvailableSettingsObject ) from ._session import Session from ._import_session import import_session from . import settings from typing import Any, Optional, Union, Literal from ._typing_compat import Callable, Generator, Dict, List, Type from .types import ( OpenFileCallback, FileOrPath, FileOrPathDestination, OperationStatus, PublicSettings, SessionFactory, SessionName ) from ._client_common import ( _add_spoof_user_agent_header, _apply_default_args, _filter_request_kwargs, _read_file_as_generator, _set_authorization_header, _add_authorization_header, _validate_listdir_response, _validate_link_response, _validate_get_type_response ) from ._common import remove_path_scheme __all__ = ["Client"] ResourceType = Union[ "SyncResourceObject", "SyncPublicResourceObject", "SyncTrashResourceObject" ] def _exists( get_meta_function: Callable[..., ResourceType], /, *args, **kwargs ) -> bool: try: # We want to query the bare minimum number of fields, that's what # the fields parameter is for get_meta_function(*args, fields=["type"], **kwargs) return True except PathNotFoundError: return False def _get_type( get_meta_function: Callable[..., ResourceType], /, *args, **kwargs ) -> str: return get_meta_function( *args, _then=_validate_get_type_response, fields=["type"], **kwargs ).type # type: ignore[return-value] def _listdir( get_meta_function: Callable[..., ResourceType], path: str, /, *, max_items: Optional[int] = None, **kwargs ) -> Generator[Any, None, None]: if kwargs.get("limit") is None: kwargs["limit"] = 500 if kwargs.get("fields") is None: kwargs["fields"] = [] kwargs["fields"] = ["embedded.items.%s" % (k,) for k in kwargs["fields"]] # Fields that are absolutely necessary NECESSARY_FIELDS = ["type", "embedded", "embedded.offset", "embedded.limit", "embedded.total", "embedded.items"] kwargs["fields"].extend(NECESSARY_FIELDS) remaining_items = max_items if remaining_items is not None: # Do not query more items than necessary kwargs["limit"] = min(remaining_items, kwargs["limit"]) result = get_meta_function(path, _then=_validate_listdir_response, **kwargs) if result.type == "file": raise WrongResourceTypeError("%r is a file" % (path,)) yield from result.embedded.items[:remaining_items] # type: ignore[union-attr,index] limit: int = result.embedded.limit # type: ignore[assignment,union-attr] offset: int = result.embedded.offset # type: ignore[assignment,union-attr] total: int = result.embedded.total # type: ignore[assignment,union-attr] while offset + limit < total: if remaining_items is not None: remaining_items -= len(result.embedded.items) # type: ignore[union-attr,arg-type] if remaining_items <= 0: break # Do not query more items than necessary kwargs["limit"] = min(remaining_items, kwargs["limit"]) else: remaining_items = None offset += limit kwargs["offset"] = offset result = get_meta_function(path, _then=_validate_listdir_response, **kwargs) if result.type == "file": raise WrongResourceTypeError("%r is a file" % (path,)) yield from result.embedded.items[:remaining_items] # type: ignore[union-attr,index] limit = result.embedded.limit # type: ignore[assignment,union-attr] total = result.embedded.total # type: ignore[assignment,union-attr] class Client: """ Implements access to Yandex.Disk REST API (provides synchronous API). HTTP client implementation can be specified using the :code:`session` parameter. :any:`RequestsSession` is used by default. For other options, see :doc:`/api_reference/sessions`. Almost all methods of :any:`Client` (the ones that accept `**kwargs`) accept some additional arguments: * **n_retries** - `int`, maximum number of retries for a request * **retry_interval** - `float`, delay between retries (in seconds) * **headers** - `dict` or `None`, additional request headers * **timeout** - `tuple` (:code:`(, )`) or `float` (specifies both connect and read timeout), request timeout (in seconds) Additional parameters, specific to a given HTTP client library can also be passed, see documentation for specific :any:`Session` subclasses (:doc:`/api_reference/sessions`). :param id: application ID :param secret: application secret password :param token: application token :param default_args: `dict` or `None`, default arguments for methods. Can be used to set the default timeout, headers, etc. :param session: `None`, `str` or an instance of :any:`Session`. If :code:`session` is a string, the appropriate session class will be imported, it must be one of the following values: * :code:`"httpx"` - :any:`HTTPXSession` * :code:`"pycurl"` - :any:`PycURLSession` * :code:`"requests"` - :any:`RequestsSession` :param open_file: `None` or a function that opens a file for reading or writing (:code:`open()` by default) :param session_factory: kept for compatibility, callable that returns an instance of :any:`Session` :ivar id: `str`, application ID :ivar secret: `str`, application secret password :ivar token: `str`, application token :ivar default_args: `dict`, default arguments for methods. Can be used to set the default timeout, headers, etc. :ivar session: current session (:any:`Session` instance) :ivar open_file: function that opens a file for reading or writing (:code:`open()` by default) The following exceptions may be raised by most API requests: :raises RequestError: HTTP client raised an exception while making a request :raises BadRequestError: server returned HTTP code 400 :raises FieldValidationError: request contains fields with invalid data :raises UnauthorizedError: server returned HTTP code 401 :raises ForbiddenError: server returned HTTP code 403 :raises NotAcceptableError: server returned HTTP code 406 :raises ConflictError: server returned HTTP code 409 :raises PayloadTooLargeError: server returned code 413 :raises UnsupportedMediaError: server returned HTTP code 415 :raises LockedError: server returned HTTP code 423 :raises TooManyRequestsError: server returned HTTP code 429 :raises InternalServerError: server returned HTTP code 500 :raises BadGatewayError: server returned HTTP code 502 :raises UnavailableError: server returned HTTP code 503 :raises GatewayTimeoutError: server returned HTTP code 504 :raises InsufficientStorageError: server returned HTTP code 509 :raises UnknownYaDiskError: other unknown error """ id: str secret: str token: str default_args: Dict[str, Any] session: Session open_file: OpenFileCallback synchronous = True def __init__(self, id: str = "", secret: str = "", token: str = "", *, default_args: Optional[Dict[str, Any]] = None, session: Optional[Union[Session, SessionName]] = None, open_file: Optional[OpenFileCallback] = None, session_factory: Optional[SessionFactory] = None) -> None: self.id = id self.secret = secret self.token = "" self.default_args = {} if default_args is None else default_args if open_file is None: open_file = open self.open_file = open_file if session is None: if session_factory is not None: session = session_factory() else: try: session = import_session("requests")() except ModuleNotFoundError as e: if e.name == "requests": raise ModuleNotFoundError( "requests is not installed. Either install requests or provide a custom session", name=e.name, path=e.path) from e else: raise elif isinstance(session, str): session = import_session(session)() self.session = session self.token = token def __enter__(self): return self def __exit__(self, *args, **kwargs) -> None: self.close() def close(self) -> None: """ Closes the session. Do not call this method while there are other active threads using this object. This method can also be called implicitly by using the `with` statement. """ self.session.close() def _maybe_wait( self, request_class: Type[APIRequest], /, *args, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, **kwargs ) -> Any: request = request_class(self.session, *args, **kwargs) if wait: args_to_filter = ( "permanently", "md5", "overwrite", "force_async", "fields" ) for arg in args_to_filter: kwargs.pop(arg, None) def then(response: Optional[SyncOperationLinkObject]) -> Optional[SyncOperationLinkObject]: if not isinstance(response, SyncOperationLinkObject): return response try: response.wait( poll_interval=poll_interval, poll_timeout=poll_timeout, **kwargs ) except RetriableYaDiskError as e: # We want to trigger a full retry (including the operation iteslf) # only if the asynchronous operation failed if not isinstance(e, AsyncOperationFailedError): e.disable_retry = True else: settings.logger.info("asynchronous operation failed, attempting to restart it") raise e from None return response return request.send(yadisk=self, then=then) else: return request.send(yadisk=self) def get_auth_url( self, type: Union[Literal["code"], Literal["token"]], device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: """ Get authentication URL for the user to go to. This method doesn't send any HTTP requests and merely constructs the URL. :param type: response type ("code" to get the confirmation code or "token" to get the token automatically) :param device_id: unique device ID, must be between 6 and 50 characters :param device_name: device name, should not be longer than 100 characters :param redirect_uri: the URL to redirect the user to after they allow access to the app, by default, the first redirect URI specified in the app settings is used :param display: doesn't do anything, kept for compatibility :param login_hint: username or email for the account the token is being requested for :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param force_confirm: if True, user will be required to confirm access to the account even if the user has already granted access for the application :param state: The state string, which Yandex.OAuth returns without any changes (<= 1024 characters) :param code_challenge: string derived from the generated :code:`code_verifier` value using one of the two possible transformations (plain or S256) :param code_challenge_method: specifies what function was used to transform the :code:`code_verifier` value to :code:`code_challenge`, allowed values are :code:`"plain"` and :code:`"S256"` (recommended). If :code:`"S256"` is used, :code:`code_challenge` must be produced by hashing the :code:`code_verifier` value and encoding it to base64 :raises ValueError: invalid arguments were passed :returns: authentication URL """ if type not in ("code", "token"): raise ValueError("type must be either 'code' or 'token'") if code_challenge_method not in (None, "plain", "S256"): raise ValueError("code_challenge_method must be either 'plain' or 'S256'") params = {"response_type": type, "client_id": self.id, "force_confirm": "yes" if force_confirm else "no"} if device_id is not None: params["device_id"] = device_id if device_name is not None: params["device_name"] = device_name if redirect_uri is not None: params["redirect_uri"] = redirect_uri if login_hint is not None: params["login_hint"] = login_hint if scope is not None: params["scope"] = " ".join(scope) if optional_scope is not None: params["optional_scope"] = " ".join(optional_scope) if state is not None: params["state"] = state if code_challenge is not None: params["code_challenge"] = code_challenge if code_challenge_method is not None: params["code_challenge_method"] = code_challenge_method return "https://oauth.yandex.ru/authorize?" + urlencode(params) def get_code_url( self, device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: """ Get the URL for the user to get the confirmation code. The confirmation code can later be used to get the token. This method doesn't send any HTTP requests and merely constructs the URL. :param device_id: unique device ID, must be between 6 and 50 characters :param device_name: device name, should not be longer than 100 characters :param redirect_uri: the URL to redirect the user to after they allow access to the app, by default, the first redirect URI specified in the app settings is used :param display: doesn't do anything, kept for compatibility :param login_hint: username or email for the account the token is being requested for :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param force_confirm: if True, user will be required to confirm access to the account even if the user has already granted access for the application :param state: The state string, which Yandex.OAuth returns without any changes (<= 1024 characters) :param code_challenge: string derived from the generated :code:`code_verifier` value using one of the two possible transformations (plain or S256) :param code_challenge_method: specifies what function was used to transform the :code:`code_verifier` value to :code:`code_challenge`, allowed values are :code:`"plain"` and :code:`"S256"` (recommended). If :code:`"S256"` is used, :code:`code_challenge` must be produced by hashing the :code:`code_verifier` value and encoding it to base64 :raises ValueError: invalid arguments were passed :returns: authentication URL """ return self.get_auth_url( "code", device_id=device_id, device_name=device_name, redirect_uri=redirect_uri, display=display, login_hint=login_hint, scope=scope, optional_scope=optional_scope, force_confirm=force_confirm, state=state, code_challenge=code_challenge, code_challenge_method=code_challenge_method ) def get_device_code(self, **kwargs) -> "DeviceCodeObject": """ This request is used for authorization using the Yandex OAuth page. In this case the user must enter the verification code (:code:`user_code`) in the browser on the Yandex OAuth page. After the user has entered the code on the OAuth page, the application can exchange the :code:`device_code` for the token using the :any:`Client.get_token_from_device_code()`. :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param scope: `str`, list of permissions for the application :param optional_scope: `str`, list of optional permissions for the application :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidClientError: invalid client ID :raises BadRequestError: invalid request parameters :returns: :any:`DeviceCodeObject` containing :code:`user_code` and :code:`device_code` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return GetDeviceCodeRequest(self.session, self.id, **kwargs).send(yadisk=self) def get_token(self, code: str, /, **kwargs) -> "TokenObject": """ Get a new token. :param code: confirmation code :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param code_verifier: `str`, verifier code, used with the PKCE authorization flow :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises BadVerificationCodeError: confirmation code has invalid format :raises InvalidGrantError: invalid or expired confirmation code :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return GetTokenRequest( self.session, "authorization_code", client_id=self.id, code=code, client_secret=self.secret, **kwargs ).send(yadisk=self) def get_token_from_device_code(self, device_code: str, /, **kwargs) -> "TokenObject": """ Get a new token from a device code, previously obtained with :any:`Client.get_device_code()`. :param device_code: device code, obtained from :any:`Client.get_device_code()` :param device_id: unique device ID (between 6 and 50 characters) :param device_name: device name, should not be longer than 100 characters :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises AuthorizationPendingError: user has not authorized the application yet :raises BadVerificationCodeError: :code:`device_code` has invalid format :raises InvalidGrantError: invalid or expired :code:`device_code` :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return GetTokenRequest( self.session, "device_code", client_id=self.id, code=device_code, client_secret=self.secret, **kwargs ).send(yadisk=self) def refresh_token(self, refresh_token: str, /, **kwargs) -> "TokenObject": """ Refresh an existing token. :param refresh_token: the refresh token that was received with the token :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidGrantError: invalid or expired refresh token or it doesn't belong to this application :raises InvalidClientError: invalid client ID or client secret :raises BadRequestError: invalid request parameters :returns: :any:`TokenObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") return RefreshTokenRequest( self.session, refresh_token, self.id, self.secret, **kwargs ).send(yadisk=self) def revoke_token( self, token: Optional[str] = None, /, **kwargs ) -> "TokenRevokeStatusObject": """ Revoke the token. :param token: token to revoke :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InvalidGrantError: specified token doesn't belong to this application :raises InvalidClientError: invalid client ID or client secret :raises UnsupportedTokenTypeError: token could not be revoked because it doesn't have a :code:`device_id` :raises BadRequestError: invalid request parameters :returns: :any:`TokenRevokeStatusObject` """ _apply_default_args(kwargs, self.default_args) _set_authorization_header(kwargs, "") if token is None: token = self.token return RevokeTokenRequest( self.session, token, self.id, self.secret, **kwargs ).send(yadisk=self) def check_token(self, token: Optional[str] = None, /, **kwargs) -> bool: """ Check whether the token is valid. :param token: token to check, equivalent to `self.token` if `None` :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :returns: `bool` """ # Any ID will do, doesn't matter whether it exists or not fake_operation_id = "0000" if token is None: token = self.token if not token: return False _set_authorization_header(kwargs, token) try: # get_operation_status() doesn't require any permissions, unlike most other requests self.get_operation_status(fake_operation_id, **kwargs) return True except OperationNotFoundError: return True except UnauthorizedError: return False def get_disk_info(self, **kwargs) -> "DiskInfoObject": """ Get disk information. :param extra_fields: list of additional keys to be included in the response :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`DiskInfoObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return DiskInfoRequest(self.session, **kwargs).send(yadisk=self) def get_meta(self, path: str, /, **kwargs) -> "SyncResourceObject": """ Get meta information about a file/directory. :param path: path to the resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return GetMetaRequest(self.session, path, **kwargs).send(yadisk=self, then=_then) def exists(self, path: str, /, **kwargs) -> bool: """ Check whether `path` exists. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return _exists(self.get_meta, path, **kwargs) def get_type(self, path: str, /, **kwargs) -> str: """ Get resource type. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return _get_type(self.get_meta, path, **kwargs) def is_file(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a file. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ try: return self.get_type(path, **kwargs) == "file" except PathNotFoundError: return False def is_dir(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a directory. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ try: return self.get_type(path, **kwargs) == "dir" except PathNotFoundError: return False def listdir(self, path: str, /, **kwargs) -> Generator["SyncResourceObject", None, None]: """ Get contents of `path`. :param path: path to the directory :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`ResourceObject` """ return _listdir(self.get_meta, path, **kwargs) def get_upload_link( self, path: str, /, spoof_user_agent: bool = True, **kwargs ) -> str: """ Get a link to upload the file using the PUT request. :param path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is used to bypass Yandex.Disk's upload speed limit for some file types if spoof_user_agent: _add_spoof_user_agent_header(kwargs) return GetUploadLinkRequest( self.session, path, fields=["href"], **kwargs ).send(yadisk=self, then=_validate_link_response).href def get_upload_link_object( self, path: str, /, spoof_user_agent: bool = True, **kwargs ) -> ResourceUploadLinkObject: """ Get a link to upload the file using the PUT request. This is similar to :any:`Client.get_upload_link()`, except it returns an instance of :any:`ResourceUploadLinkObject` which also contains an asynchronous operation ID. :param path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`ResourceUploadLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is used to bypass Yandex.Disk's upload speed limit for some file types if spoof_user_agent: _add_spoof_user_agent_header(kwargs) return GetUploadLinkRequest( self.session, path, **kwargs ).send(yadisk=self) def _upload(self, get_upload_link_function: Callable, file_or_path: FileOrPath, dst_path: str, /, **kwargs) -> None: timeout = kwargs.get("timeout", ...) if timeout is ...: timeout = settings.DEFAULT_UPLOAD_TIMEOUT retry_interval = kwargs.get("retry_interval") if retry_interval is None: retry_interval = settings.DEFAULT_UPLOAD_RETRY_INTERVAL n_retries = kwargs.get("n_retries") if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES # Number of retries for getting the upload link. # It is set to 0, unless the file is not seekable, in which case # we have to use a different retry scheme n_retries_for_upload_link = 0 kwargs["timeout"] = timeout # Make sure we don't get any inconsistent behavior with header names kwargs["headers"] = CaseInsensitiveDict(kwargs.get("headers") or {}) file: Any = None close_file = False file_position = 0 iterator_factory = None session = self.session try: if isinstance(file_or_path, (str, bytes)): close_file = True file = self.open_file(file_or_path, "rb") elif callable(file_or_path): close_file = False iterator_factory = file_or_path else: close_file = False file = file_or_path if file is not None and file.seekable(): file_position = file.tell() elif iterator_factory is None: n_retries, n_retries_for_upload_link = 0, n_retries def attempt() -> None: temp_kwargs = dict(kwargs) temp_kwargs["n_retries"] = n_retries_for_upload_link temp_kwargs["retry_interval"] = 0.0 link = get_upload_link_function(dst_path, **temp_kwargs) # session.put() doesn't accept some of the passed parameters _filter_request_kwargs(temp_kwargs) temp_kwargs.setdefault("stream", True) # Disable keep-alive by default, since the upload server is random temp_kwargs["headers"].setdefault("Connection", "close") # This is generally not necessary, libraries like aiohttp # will generally always set this header while others might not # We're setting content-type here just to fix this inconsistency, # this makes testing easier temp_kwargs["headers"].setdefault("Content-Type", "application/octet-stream") if iterator_factory is not None: payload = iterator_factory() elif file.seekable(): file.seek(file_position) payload = file else: # requests will try to seek the file to determine the payload size # regardless of whether it is seekable() or not. # To bypass this problem we pass the file as a generator instead. payload = _read_file_as_generator(file) settings.logger.info(f"uploading file to {dst_path} at {link}") with session.send_request("PUT", link, data=payload, **temp_kwargs) as response: if response.status != 201: raise response.get_exception() auto_retry(attempt, n_retries, retry_interval) finally: if close_file and file is not None: file.close() def upload( self, file_or_path: FileOrPath, dst_path: str, /, **kwargs ) -> SyncResourceLinkObject: """ Upload a file to disk. :param file_or_path: path, file-like object to be uploaded or a function that returns an iterator (or generator) :param dst_path: destination path :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`SyncResourceLinkObject`, link to the destination resource """ _apply_default_args(kwargs, self.default_args) self._upload(self.get_upload_link, file_or_path, dst_path, **kwargs) return SyncResourceLinkObject.from_path(dst_path, yadisk=self) def upload_by_link(self, file_or_path: FileOrPath, link: str, /, **kwargs) -> None: """ Upload a file to disk using an upload link. :param file_or_path: path, file-like object to be uploaded or a function that returns an iterator (or generator) :param link: upload link :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises InsufficientStorageError: cannot upload file due to lack of storage space """ _apply_default_args(kwargs, self.default_args) self._upload(lambda *args, **kwargs: link, file_or_path, "", **kwargs) def get_download_link(self, path: str, /, **kwargs) -> str: """ Get a download link for a file (or a directory). :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetDownloadLinkRequest( self.session, path, fields=["href"], **kwargs ).send(yadisk=self, then=_validate_link_response).href def _download( self, get_download_link_function: Callable, src_path: str, file_or_path: FileOrPathDestination, /, **kwargs ) -> None: n_retries = kwargs.get("n_retries") if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES # Number of retries for getting the download link. # It is set to 0, unless the file is not seekable, in which case # we have to use a different retry scheme n_retries_for_download_link = 0 retry_interval = kwargs.get("retry_interval") if retry_interval is None: retry_interval = settings.DEFAULT_RETRY_INTERVAL timeout = kwargs.get("timeout", ...) if timeout is ...: timeout = settings.DEFAULT_TIMEOUT kwargs["timeout"] = timeout file: Any = None close_file = False file_position = 0 session = self.session try: if isinstance(file_or_path, (str, bytes)): close_file = True file = self.open_file(file_or_path, "wb") else: close_file = False file = file_or_path if file.seekable(): file_position = file.tell() else: n_retries, n_retries_for_download_link = 0, n_retries def attempt() -> None: temp_kwargs = dict(kwargs) temp_kwargs["n_retries"] = n_retries_for_download_link temp_kwargs["retry_interval"] = 0.0 link = get_download_link_function(src_path, **temp_kwargs) # session.get() doesn't accept some of the passed parameters _filter_request_kwargs(temp_kwargs) temp_kwargs.setdefault("stream", True) if file.seekable(): file.seek(file_position) settings.logger.info(f"downloading file {src_path} from {link}") with session.send_request("GET", link, **temp_kwargs) as response: # pycurl can't get status until the response is actually read # in that case, status will be set to 0 if response.status == 0: def consume(chunk: bytes) -> None: if response.status not in (0, 200): return file.write(chunk) response.download(consume) if response.status != 200: raise response.get_exception() else: if response.status != 200: raise response.get_exception() response.download(file.write) auto_retry(attempt, n_retries, retry_interval) finally: if close_file and file is not None: file.close() def download( self, src_path: str, file_or_path: FileOrPathDestination, /, **kwargs ) -> SyncResourceLinkObject: """ Download the file. :param src_path: source path :param file_or_path: destination path or file-like object :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject`, link to the source resource """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) self._download(self.get_download_link, src_path, file_or_path, **kwargs) return SyncResourceLinkObject.from_path(src_path, yadisk=self) def download_by_link( self, link: str, file_or_path: FileOrPathDestination, /, **kwargs ) -> None: """ Download the file from the link. :param link: download link :param file_or_path: destination path or file-like object :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` """ _apply_default_args(kwargs, self.default_args) self._download(lambda *args, **kwargs: link, "", file_or_path, **kwargs) def remove(self, path: str, /, **kwargs) -> Optional["SyncOperationLinkObject"]: """ Remove the resource. :param path: path to the resource to be removed :param permanently: if `True`, the resource will be removed permanently, otherwise, it will be just moved to the trash :param md5: `str`, MD5 hash of the file to remove :param force_async: forces the operation to be executed asynchronously :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises BadRequestError: MD5 check is only available for files :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(DeleteRequest, path, **kwargs) def mkdir(self, path: str, /, **kwargs) -> SyncResourceLinkObject: """ Create a new directory. :param path: path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return MkdirRequest(self.session, path, **kwargs).send(yadisk=self) def makedirs(self, path: str, /, **kwargs) -> SyncResourceLinkObject: """ Create a new directory at `path`. If its parent directory doesn't exist it will also be created recursively. :param path: path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject` """ while True: try: return self.mkdir(path, **kwargs) except ParentNotFoundError as e: # We first have to remove the scheme, otherwise posixpath.split() # may treat it as part of the path scheme, path_without_scheme = remove_path_scheme(path) # Extract the parent directory head, _tail = posixpath.split(path_without_scheme) head = head.strip("/") if head == "": # We should never find ourselves in this situation raise e from None # Restore the scheme if scheme: head = f"{scheme}:/{head}" self.makedirs(head, **kwargs) def get_trash_meta(self, path: str, /, **kwargs) -> "SyncTrashResourceObject": """ Get meta information about a trash resource. :param path: path to the trash resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncTrashResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return GetTrashRequest(self.session, path, **kwargs).send(yadisk=self, then=_then) def trash_exists(self, path: str, /, **kwargs) -> bool: """ Check whether the trash resource at `path` exists. :param path: path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return _exists(self.get_trash_meta, path, **kwargs) def copy( self, src_path: str, dst_path: str, /, **kwargs ) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Copy `src_path` to `dst_path`. If the operation is performed asynchronously, returns the link to the operation, otherwise, returns the link to the newly created resource. :param src_path: source path :param dst_path: destination path :param overwrite: if `True` the destination path can be overwritten, otherwise, an error will be raised :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises InsufficientStorageError: cannot complete request due to lack of storage space :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(CopyRequest, src_path, dst_path, **kwargs) def restore_trash( self, path: str, /, dst_path: Optional[str] = None, **kwargs ) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Restore a trash resource. Returns a link to the newly created resource or a link to the asynchronous operation. :param path: path to the trash resource to be restored :param dst_path: destination path :param overwrite: `bool`, determines whether the destination can be overwritten :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(RestoreTrashRequest, path, dst_path=dst_path, **kwargs) def move( self, src_path: str, dst_path: str, /, **kwargs ) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Move `src_path` to `dst_path`. :param src_path: source path to be moved :param dst_path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(MoveRequest, src_path, dst_path, **kwargs) def rename( self, src_path: str, new_name: str, /, **kwargs ) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Rename `src_path` to have filename `new_name`. Does the same as `move()` but changes only the filename. :param src_path: source path to be moved :param new_name: target filename to rename to :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises ValueError: `new_name` is not a valid filename or `src_path` is root :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ new_name = new_name.rstrip("/") if "/" in new_name or new_name in (".", "..", ""): raise ValueError(f"Invalid filename: {new_name}") # Remove scheme first, otherwise PurePosixPath will treat it as part of the path scheme, src_path_without_scheme = remove_path_scheme(src_path) sanitized_src_path = PurePosixPath(src_path_without_scheme.strip("/")) if len(sanitized_src_path.parts) == 0: raise ValueError("Cannot rename root") dst_path = str(sanitized_src_path.parent / new_name) # Restore scheme back if scheme: dst_path = f"{scheme}:/{dst_path}" return self.move(src_path, dst_path, **kwargs) def remove_trash( self, path: str, /, **kwargs ) -> Optional["SyncOperationLinkObject"]: """ Remove a trash resource. :param path: path to the trash resource to be deleted :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(DeleteTrashRequest, path, **kwargs) def publish(self, path: str, /, **kwargs) -> SyncResourceLinkObject: """ Make a resource public. :param path: path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param public_settings: :any:`PublicSettings` or `None`, public access settings for the resource :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject`, link to the resource """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return PublishRequest(self.session, path, **kwargs).send(yadisk=self) def unpublish(self, path: str, /, **kwargs) -> SyncResourceLinkObject: """ Make a public resource private. :param path: path to the resource to be unpublished :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return UnpublishRequest(self.session, path, **kwargs).send(yadisk=self) def get_public_settings(self, path: str, /, **kwargs) -> PublicSettingsObject: """ Get public settings of a resource. :param path: path to the resource :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ :returns: :any:`PublicSettingsObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetPublicSettingsRequest(self.session, path, **kwargs).send(yadisk=self) def get_public_available_settings(self, path: str, /, **kwargs) -> PublicAvailableSettingsObject: """ Get public settings of a shared resource for the current OAuth token owner. :param path: path to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ :returns: :any:`PublicAvailableSettingsObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetPublicAvailableSettingsRequest(self.session, path, **kwargs).send(yadisk=self) def update_public_settings(self, path: str, public_settings: PublicSettings, /, **kwargs) -> None: """ Update public settings of a shared resource. :param path: path to the resource :param public_settings: :any:`PublicSettings`, public access settings for the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `None` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return UpdatePublicSettingsRequest(self.session, path, public_settings, **kwargs).send(yadisk=self) def save_to_disk( self, public_key: str, /, **kwargs ) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Saves a public resource to the disk. Returns the link to the operation if it's performed asynchronously, or a link to the resource otherwise. :param public_key: public key or public URL of the public resource :param name: filename of the saved resource :param path: path to the copied resource in the public folder :param save_path: path to the destination directory (downloads directory by default) :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(SaveToDiskRequest, public_key, **kwargs) def get_public_meta( self, public_key: str, /, **kwargs ) -> "SyncPublicResourceObject": """ Get meta-information about a public resource. :param public_key: public key or public URL of the public resource :param path: relative path to a resource in a public folder. By specifying the key of the published folder in `public_key`, you can request metainformation for any resource in the folder. :param offset: offset from the beginning of the list of nested resources :param limit: maximum number of nested elements to be included in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: file preview size :param preview_crop: `bool`, allow preview crop :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncPublicResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) # This is for internal error handling _then = kwargs.pop("_then", None) return GetPublicMetaRequest(self.session, public_key, **kwargs).send(yadisk=self, then=_then) def public_exists(self, public_key: str, /, **kwargs) -> bool: """ Check whether the public resource exists. :param public_key: public key or public URL of the public resource :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ return _exists(self.get_public_meta, public_key, **kwargs) def public_listdir( self, public_key: str, /, **kwargs ) -> Generator["SyncPublicResourceObject", None, None]: """ Get contents of a public directory. :param public_key: public key or public URL of the public resource :param path: relative path to the resource in the public folder. By specifying the key of the published folder in `public_key`, you can request contents of any nested folder. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`SyncPublicResourceObject` """ return _listdir(self.get_public_meta, public_key, **kwargs) def get_public_type(self, public_key: str, /, **kwargs) -> str: """ Get public resource type. :param public_key: public key or public URL of the public resource :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return _get_type(self.get_public_meta, public_key, **kwargs) def is_public_dir(self, public_key: str, /, **kwargs) -> bool: """ Check whether the public resource is a public directory. :param public_key: public key or public URL of the public resource :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `public_key` is a directory, `False` otherwise (even if it doesn't exist) """ try: return self.get_public_type(public_key, **kwargs) == "dir" except PathNotFoundError: return False def is_public_file(self, public_key: str, /, **kwargs) -> bool: """ Check whether the public resource is a public file. :param public_key: public key or public URL of the public resource :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `public_key` is a file, `False` otherwise (even if it doesn't exist) """ try: return self.get_public_type(public_key, **kwargs) == "file" except PathNotFoundError: return False def trash_listdir( self, path: str, /, **kwargs ) -> Generator["SyncTrashResourceObject", None, None]: """ Get contents of a trash resource. :param path: path to the directory in the trash bin :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`SyncTrashResourceObject` """ return _listdir(self.get_trash_meta, path, **kwargs) def get_trash_type(self, path: str, /, **kwargs) -> str: """ Get trash resource type. :param path: path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ return _get_type(self.get_trash_meta, path, **kwargs) def is_trash_dir(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a trash directory. :param path: path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ try: return self.get_trash_type(path, **kwargs) == "dir" except PathNotFoundError: return False def is_trash_file(self, path: str, /, **kwargs) -> bool: """ Check whether `path` is a trash file. :param path: path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ try: return self.get_trash_type(path, **kwargs) == "file" except PathNotFoundError: return False def get_public_resources(self, **kwargs) -> "SyncPublicResourcesListObject": """ Get a list of public resources. :param offset: offset from the beginning of the list :param limit: maximum number of elements in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param type: filter based on type of resources ("file" or "dir") :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncPublicResourcesListObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetPublicResourcesRequest(self.session, **kwargs).send(yadisk=self) def get_all_public_resources( self, *, max_items: Optional[int] = None, **kwargs ) -> Generator[SyncPublicResourceObject, None, None]: """ Get a list of all public resources. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param offset: offset from the beginning of the list :param limit: maximum number of elements in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param type: filter based on type of resources ("file" or "dir") :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: generator of :any:`SyncPublicResourceObject` """ if kwargs.get("offset") is None: kwargs["offset"] = 0 if kwargs.get("limit") is None: kwargs["limit"] = 100 remaining_items = max_items while True: # Do not query more items than necessary if remaining_items is not None: kwargs["limit"] = min(remaining_items, kwargs["limit"]) files = self.get_public_resources(**kwargs).items or [] file_count = len(files) yield from files[:remaining_items] if remaining_items is not None: remaining_items -= file_count if remaining_items <= 0: break if file_count < kwargs["limit"]: break kwargs["offset"] += kwargs["limit"] def patch(self, path: str, properties: dict, /, **kwargs) -> "SyncResourceObject": """ Update custom properties of a resource. :param path: path to the resource :param properties: `dict`, custom properties to update :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`ResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return PatchRequest(self.session, path, properties, **kwargs).send(yadisk=self) def _get_files_some(self, **kwargs) -> List["SyncResourceObject"]: response: "SyncFilesResourceListObject" = FilesRequest( self.session, **kwargs).send(yadisk=self) if response.items is None: raise InvalidResponseError("Response did not contain key field") return response.items def get_files( self, *, max_items: Optional[int] = None, **kwargs ) -> Generator["SyncResourceObject", None, None]: """ Get a flat list of all files (that doesn't include directories). :param offset: offset from the beginning of the list :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of list elements to be included in each response :param media_type: type of files to include in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: generator of :any:`ResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) if kwargs.get("offset") is None: kwargs["offset"] = 0 if kwargs.get("limit") is None: kwargs["limit"] = 200 remaining_items = max_items while True: # Do not query more items than necessary if remaining_items is not None: kwargs["limit"] = min(remaining_items, kwargs["limit"]) files = self._get_files_some(**kwargs) file_count = len(files) yield from files[:remaining_items] if remaining_items is not None: remaining_items -= file_count if remaining_items <= 0: break if file_count < kwargs["limit"]: break kwargs["offset"] += kwargs["limit"] def get_last_uploaded(self, **kwargs) -> List["SyncResourceObject"]: """ Get the list of latest uploaded files sorted by upload date. :param limit: maximum number of elements in the list :param media_type: type of files to include in the list :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request More info about this request: * `Official docs `__ * `Polygon `__ :returns: generator of :any:`ResourceObject` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) response: "SyncLastUploadedResourceListObject" = LastUploadedRequest( self.session, **kwargs ).send(yadisk=self) if response.items is None: raise InvalidResponseError("Response did not contain key field") return response.items def upload_url( self, url: str, path: str, /, **kwargs ) -> "SyncOperationLinkObject": """ Upload a file from URL. :param url: source URL :param path: destination path :param disable_redirects: `bool`, forbid redirects :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) More info about this request: * `Official docs `__ * `Polygon `__ :returns: :any:`SyncOperationLinkObject`, link to the asynchronous operation """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return self._maybe_wait(UploadURLRequest, url, path, **kwargs) def get_public_download_link(self, public_key: str, /, **kwargs) -> str: """ Get a download link for a public resource. :param public_key: public key or public URL of the public resource :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str` """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetPublicDownloadLinkRequest( self.session, public_key, fields=["href"], **kwargs ).send(yadisk=self, then=_validate_link_response).href def download_public( self, public_key: str, file_or_path: FileOrPathDestination, /, **kwargs ) -> SyncPublicResourceLinkObject: """ Download the public resource. :param public_key: public key or public URL of the public resource :param file_or_path: destination path or file-like object :param path: relative path to the resource within the public folder :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncPublicResourceLinkObject` """ _apply_default_args(kwargs, self.default_args) self._download( lambda public_key, **kwargs: self.get_public_download_link(public_key, **kwargs), public_key, file_or_path, **kwargs) return SyncPublicResourceLinkObject.from_public_key(public_key, yadisk=self) def get_operation_status(self, operation_id: str, /, **kwargs) -> OperationStatus: """ Get operation status. :param operation_id: ID of the operation or a link :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found More info about this request: * `Official docs `__ * `Polygon `__ :returns: `str`, :code:`"in-progress"` indicates that the operation is currently running, :code:`"success"` indicates that the operation was successful, :code:`"failed"` means that the operation failed """ _apply_default_args(kwargs, self.default_args) _add_authorization_header(kwargs, self.token) return GetOperationStatusRequest( self.session, operation_id, fields=["status"], **kwargs ).send(yadisk=self).status def wait_for_operation( self, operation_id: str, /, *, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, **kwargs ) -> None: """ Wait until an operation is completed. If the operation fails, an exception is raised. Waiting is performed by calling :any:`time.sleep`. :param operation_id: ID of the operation or a link :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) """ poll_start_time = time.monotonic() while (status := self.get_operation_status(operation_id, **kwargs)) == "in-progress": if poll_timeout is not None: total_poll_duration = time.monotonic() - poll_start_time if total_poll_duration >= poll_timeout: raise AsyncOperationPollingTimeoutError("Asynchronous operation did not complete in specified time") time.sleep(poll_interval) if status != "success": raise AsyncOperationFailedError("Asynchronous operation failed") ================================================ FILE: src/yadisk/_client.pyi ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Optional, Any, Union, Literal, overload from ._typing_compat import Dict, Generator, Iterable, List, Tuple, Type from .objects import ( DeviceCodeObject, TokenObject, TokenRevokeStatusObject, DiskInfoObject, SyncResourceObject, SyncResourceLinkObject, SyncOperationLinkObject, SyncTrashResourceObject, SyncPublicResourceObject, SyncPublicResourcesListObject, SyncPublicResourceLinkObject, ResourceUploadLinkObject, PublicSettingsObject, PublicAvailableSettingsObject ) from .types import ( FileOrPath, FileOrPathDestination, Headers, OperationStatus, PublicSettings, Session, SessionName, SessionFactory, OpenFileCallback, TimeoutParameter ) __all__ = ["Client"] class Client: id: str secret: str token: str default_args: Dict[str, Any] session: Session open_file: OpenFileCallback synchronous = True def __init__( self, id: str = "", secret: str = "", token: str = "", *, default_args: Optional[Dict[str, Any]] = None, session: Optional[Union[Session, SessionName]] = None, open_file: Optional[OpenFileCallback] = None, session_factory: Optional[SessionFactory] = None ) -> None: ... def __enter__(self): ... def __exit__(self, *args, **kwargs) -> None: ... def close(self) -> None: ... def get_auth_url( self, type: Union[Literal["code"], Literal["token"]], device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: ... def get_code_url( self, device_id: Optional[str] = None, device_name: Optional[str] = None, redirect_uri: Optional[str] = None, login_hint: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, force_confirm: bool = True, state: Optional[str] = None, code_challenge: Optional[str] = None, code_challenge_method: Optional[Union[Literal["plain"], Literal["S256"]]] = None, display: None = None ) -> str: ... def get_device_code( self, *, device_id: Optional[str] = None, device_name: Optional[str] = None, scope: Optional[str] = None, optional_scope: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> DeviceCodeObject: ... def get_token( self, code: str, /, *, device_id: Optional[str] = None, device_name: Optional[str] = None, code_verifier: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> TokenObject: ... def get_token_from_device_code( self, device_code: str, /, *, device_id: Optional[str] = None, device_name: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> TokenObject: ... def refresh_token( self, refresh_token: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> TokenObject: ... def revoke_token( self, token: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> TokenRevokeStatusObject: ... def check_token( self, token: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def get_disk_info( self, *, extra_fields: Optional[Iterable[str]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> DiskInfoObject: ... def get_meta( self, path: str, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceObject: ... def exists( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def get_type( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def is_file( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def is_dir( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def listdir( self, path: str, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncResourceObject, None, None]: ... def get_upload_link( self, path: str, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def get_upload_link_object( self, path: str, /, *, overwrite: bool = False, fields: Optional[Iterable[str]] = None, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> ResourceUploadLinkObject: ... def upload( self, file_or_path: FileOrPath, dst_path: str, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def upload_by_link( self, file_or_path: FileOrPath, link: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> None: ... def get_download_link( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def download( self, src_path: str, file_or_path: FileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def download_by_link( self, link: str, file_or_path: FileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> None: ... @overload def remove( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, md5: Optional[str] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def remove( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, md5: Optional[str] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Optional[SyncOperationLinkObject]: ... def mkdir( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def makedirs( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def get_trash_meta( self, path: str, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncTrashResourceObject: ... def trash_exists( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... @overload def copy( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def copy( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def restore_trash( self, path: str, /, dst_path: Optional[str] = None, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def restore_trash( self, path: str, /, dst_path: Optional[str] = None, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def move( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def move( self, src_path: str, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def rename( self, src_path: str, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def rename( self, src_path: str, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def remove_trash( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def remove_trash( self, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Optional[SyncOperationLinkObject]: ... def publish( self, path: str, /, *, allow_address_access: bool = False, public_settings: Optional[PublicSettings] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def unpublish( self, path: str, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def get_public_settings( self, path: str, /, allow_address_access: bool = False, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> PublicSettingsObject: ... def get_public_available_settings( self, path: str, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> PublicAvailableSettingsObject: ... def update_public_settings( self, path: str, public_settings: PublicSettings, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> None: ... @overload def save_to_disk( self, public_key: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, name: Optional[str] = None, path: Optional[str] = None, save_path: Optional[str] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def save_to_disk( self, public_key: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, name: Optional[str] = None, path: Optional[str] = None, save_path: Optional[str] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... def get_public_meta( self, public_key: str, /, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncPublicResourceObject: ... def public_exists( self, public_key: str, /, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def public_listdir( self, public_key: str, /, *, path: Optional[str] = None, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncPublicResourceObject, None, None]: ... def get_public_type( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def is_public_dir( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def is_public_file( self, public_key: str, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def trash_listdir( self, path: str, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncTrashResourceObject, None, None]: ... def get_trash_type( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def is_trash_dir( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def is_trash_file( self, path: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def get_public_resources( self, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, type: Optional[Union[Literal["file"], Literal["dir"]]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncPublicResourcesListObject: ... def get_all_public_resources( self, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, type: Optional[Union[Literal["file"], Literal["dir"]]] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncPublicResourceObject, None, None]: ... def patch( self, path: str, properties: dict, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceObject: ... def get_files( self, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, media_type: Optional[Union[str, Iterable[str]]] = None, sort: Optional[str] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncResourceObject, None, None]: ... def get_last_uploaded( self, *, limit: Optional[int] = None, media_type: Optional[Union[str, Iterable[str]]] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> List[SyncResourceObject]: ... def upload_url( self, url: str, path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, disable_redirects: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... def get_public_download_link( self, public_key: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def download_public( self, public_key: str, file_or_path: FileOrPathDestination, /, *, path: Optional[str] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncPublicResourceLinkObject: ... def get_operation_status( self, operation_id: str, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> OperationStatus: ... def wait_for_operation( self, operation_id: str, /, *, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> None: ... ================================================ FILE: src/yadisk/_client_common.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from .utils import CaseInsensitiveDict from ._typing_compat import Dict, Generator from .exceptions import InvalidResponseError from .objects import ResourceObject, LinkObject from typing import Any, AnyStr, IO, Optional __all__ = [ "_add_authorization_header", "_add_spoof_user_agent_header", "_apply_default_args", "_filter_request_kwargs", "_read_file_as_generator", "_set_authorization_header", "_validate_get_type_response", "_validate_link_response", "_validate_listdir_response" ] def _apply_default_args(args: Dict[str, Any], default_args: Dict[str, Any]) -> None: new_args = dict(default_args) new_args.update(args) args.clear() args.update(new_args) def _filter_request_kwargs(kwargs: Dict[str, Any]) -> None: # Remove some of the yadisk-specific arguments from kwargs keys_to_remove = ("n_retries", "retry_interval", "retry_on", "fields", "overwrite", "path") for key in keys_to_remove: kwargs.pop(key, None) def _read_file_as_generator(input_file: IO[AnyStr]) -> Generator[AnyStr, None, None]: chunk_size = 8192 while chunk := input_file.read(chunk_size): yield chunk def _set_authorization_header( kwargs: Dict[str, Any], new_token: Optional[str] = None ) -> None: headers = CaseInsensitiveDict(kwargs.get("headers") or {}) if new_token: headers["Authorization"] = f"OAuth {new_token}" else: headers.pop("Authorization", None) kwargs["headers"] = headers def _add_authorization_header( kwargs: Dict[str, Any], new_token: Optional[str] = None ) -> None: headers = CaseInsensitiveDict(kwargs.get("headers") or {}) if "Authorization" in headers: return if new_token: headers["Authorization"] = f"OAuth {new_token}" else: headers["Authorization"] = "" kwargs["headers"] = headers def _add_spoof_user_agent_header(kwargs: Dict[str, Any]) -> None: headers = kwargs.setdefault("headers", {}) headers["User-Agent"] = 'Yandex.Disk {"os":"windows"}' def _validate_listdir_response(response: ResourceObject) -> ResourceObject: if response.type == "file": return response if response.embedded is None: raise InvalidResponseError("Response did not contain _embedded field") if (response.type is None or response.embedded.items is None or response.embedded.offset is None or response.embedded.limit is None or response.embedded.total is None): raise InvalidResponseError("Response did not contain key field") return response def _validate_link_response(response: LinkObject) -> LinkObject: if not response.href: raise InvalidResponseError("Response did not contain the link") return response def _validate_get_type_response(response: ResourceObject) -> ResourceObject: if response.type is None: raise InvalidResponseError("Response did not contain the type field") return response ================================================ FILE: src/yadisk/_common.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import datetime import inspect from ._typing_compat import Callable, List from . import settings from typing import Optional, TypeVar, Any, Union from .types import TimeoutParameter, Tuple __all__ = [ "bool_or_error", "dict_or_error", "ensure_path_has_scheme", "float_or_error", "int_or_error", "is_default_timeout", "is_operation_link", "is_public_resource_link", "is_resource_link", "remove_path_scheme", "str_or_dict_or_error", "str_or_error", "typed_list", "yandex_date" ] T = TypeVar("T", bound=Callable) def typed_list(datatype: T) -> Callable[[Optional[List]], List[T]]: def list_factory(iterable: Optional[List] = None) -> List[T]: if iterable is None: return [] if not isinstance(iterable, list): raise ValueError(f"Expected a list, got {type(iterable)}") return [datatype(i) for i in iterable] return list_factory def int_or_error(x: Any) -> int: if not isinstance(x, int): raise ValueError(f"{repr(x)} is not an integer") return x def float_or_error(x: Any) -> float: if not isinstance(x, (float, int)): raise ValueError(f"{repr(x)} is not a float") return x def str_or_error(x: Any) -> str: if not isinstance(x, str): raise ValueError(f"{repr(x)} is not a string") return x def bool_or_error(x: Any) -> bool: if not isinstance(x, bool): raise ValueError(f"{repr(x)} is not a boolean value") return x def dict_or_error(x: Any) -> dict: if not isinstance(x, dict): raise ValueError(f"{repr(x)} is not a dict") return x def str_or_dict_or_error(x: Any) -> Union[str, dict]: if not isinstance(x, (str, dict)): raise ValueError(f"{repr(x)} is not a string nor a dict") return x def yandex_date(string: str) -> datetime.datetime: return datetime.datetime.strptime(string[:-3] + string[-2:], "%Y-%m-%dT%H:%M:%S%z") def _is_endpoint_link(link: str, base_endpoint_url: str) -> bool: link_scheme, _, link = link.partition("://") endpoint_scheme, _, base_endpoint_url = base_endpoint_url.partition("://") if link_scheme not in ("http", "https") or endpoint_scheme not in ("http", "https"): return False if not base_endpoint_url.endswith("/") and not base_endpoint_url.endswith("?"): base_endpoint_url += "/" return link.startswith(base_endpoint_url) def is_operation_link(link: str) -> bool: return _is_endpoint_link(link, f"{settings.BASE_API_URL}/v1/disk/operations/") def is_resource_link(url: str) -> bool: return _is_endpoint_link(url, f"{settings.BASE_API_URL}/v1/disk/resources?") def is_public_resource_link(url: str) -> bool: return _is_endpoint_link(url, f"{settings.BASE_API_URL}/v1/disk/public/resources?") KNOWN_SCHEMAS = ("disk:", "trash:", "app:", "photounlim:") def ensure_path_has_scheme(path: str, default_scheme: str = "disk") -> str: # Modifies path to always have a scheme (disk:/, trash:/ or app:/). # Without the scheme Yandex.Disk won't let you upload filenames with the ':' character. # See https://github.com/ivknv/yadisk/issues/26 for more details if path in KNOWN_SCHEMAS: return default_scheme + ":/" + path if path.startswith("/"): return default_scheme + ":" + path if any(path.startswith(scheme + "/") for scheme in KNOWN_SCHEMAS): return path return default_scheme + ":/" + path def remove_path_scheme(path: str) -> Tuple[str, str]: """ Remove scheme from path. :param path: `str`, path to remove the scheme from :returns: `tuple[str, str]`, removed scheme (without `:/`) and the path without it """ if path.startswith("/") or path in KNOWN_SCHEMAS: return "", path if any(path.startswith(scheme + "/") for scheme in KNOWN_SCHEMAS): scheme, _sep, path = path.partition(":/") return scheme, path return "", path def is_async_func(func: Any) -> bool: return inspect.isgeneratorfunction(func) or inspect.iscoroutinefunction(func) def is_default_timeout(timeout: TimeoutParameter) -> bool: return timeout is ... ================================================ FILE: src/yadisk/_import_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import TYPE_CHECKING from ._typing_compat import Type if TYPE_CHECKING: # pragma: no cover from ._session import Session from ._async_session import AsyncSession from .types import AsyncSessionName, SessionName __all__ = ["import_async_session", "import_session"] sessions = { "httpx": ("sessions.httpx_session", "HTTPXSession"), "pycurl": ("sessions.pycurl_session", "PycURLSession"), "requests": ("sessions.requests_session", "RequestsSession") } async_sessions = { "aiohttp": ("sessions.aiohttp_session", "AIOHTTPSession"), "httpx": ("sessions.async_httpx_session", "AsyncHTTPXSession") } def import_session(name: "SessionName") -> Type["Session"]: """ Imports relevant session class based on provided name. The following sessions are available: * :code:`"httpx"` - :any:`HTTPXSession` * :code:`"pycurl"` - :any:`PycURLSession` * :code:`"requests"` - :any:`RequestsSession` :param name: `str`, session name :raises ImportError: could not import module :raises ValueError: unknown name :returns: subclass of :any:`Session` """ try: module_path, class_name = sessions[name] except KeyError: raise ValueError(f"unknown session name: {repr(name)}") from None return getattr( __import__(module_path, globals(), locals(), level=1, fromlist=(class_name,)), class_name ) def import_async_session(name: "AsyncSessionName") -> Type["AsyncSession"]: """ Imports relevant asynchronous session class based on provided name. :param name: `str`, session name The following sessions are available: * :code:`"aiohttp"` - :any:`AIOHTTPSession` * :code:`"httpx"` - :any:`AsyncHTTPXSession` :raises ImportError: could not import module :raises ValueError: unknown name :returns: subclass of :any:`AsyncSession` """ try: module_path, class_name = async_sessions[name] except KeyError: raise ValueError(f"unknown asynchronous session name: {repr(name)}") from None return getattr( __import__(module_path, globals(), locals(), level=1, fromlist=(class_name,)), class_name ) ================================================ FILE: src/yadisk/_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Optional, Any, TypeVar from .exceptions import YaDiskError from ._typing_compat import Dict from .utils import get_exception from .objects import ErrorObject from .types import ( ConsumeCallback, JSON, HTTPMethod, Headers, Payload, TimeoutParameter ) __all__ = ["Response", "Session"] class Response: """ Represents an HTTP response. In case an error occurs, methods of this class should throw one of exceptions derived from :any:`YaDiskError`. :ivar status: `int`, HTTP status code """ _Self = TypeVar("_Self", bound="Response") status: int def __init__(self) -> None: """Constructs a :any:`Response` object.""" self.status = 0 def json(self) -> JSON: """ Returns JSON-content of the response (parses JSON). .. note:: This is an abstract method that needs to be implemented. :raises RequestError: could not receive the response's body :raises ValueError: could not parse JSON :returns: `dict`, `list`, `str`, `int`, `float` or `None` """ raise NotImplementedError def download(self, consume_callback: ConsumeCallback) -> None: """ Downloads response's content. .. note:: This is an abstract method that needs to be implemented. :param consume_callback: function, takes one parameter - chunk of data (bytes), consumes the chunk (e.g. by writing to a file) :raises RequestError: could not receive the response's body """ raise NotImplementedError def get_exception(self) -> YaDiskError: """ Convenience wrapper for :any:`yadisk.utils.get_exception`. :returns: :any:`YaDiskError` """ try: js = self.json() except ValueError: js = None error = ErrorObject(js) return get_exception(self, error) def close(self) -> None: """ Closes the response and releases the underlying connection into the pool .. note:: This is an abstract method that needs to be implemented. """ raise NotImplementedError def __enter__(self: _Self) -> _Self: return self def __exit__(self, *args, **kwargs) -> None: """Closes the response and releases the underlying connection into the pool""" self.close() class Session: """ HTTP session class. Maintains open connections, stores headers and some other request parameters. Must be explicitly closed (can be done using the `with` statement). """ _Self = TypeVar("_Self", bound="Session") def send_request(self, method: HTTPMethod, url: str, *, params: Optional[Dict[str, Any]] = None, data: Optional[Payload] = None, timeout: TimeoutParameter = ..., headers: Optional[Headers] = None, stream: bool = False, **kwargs) -> Response: """ Sends an HTTP request with given parameters. In case an error occurs, the method should throw one of exceptions derived from :any:`YaDiskError`. Additional keyword arguments may be passed, they may be forwarded to the underlying HTTP client without modification. .. note:: This is an abstract method that needs to be implemented. :param method: `str`, HTTP method :param url: `str`, URL :param params: `dict`, GET parameters :param data: `bytes`, an iterator or a file-like object, data to be sent in the request body :param headers: `dict`, additional headers to be set :param timeout: request timeout, a `tuple` of `(read timeout, connect timeout)`, `float` or `None` (no timeout) :param stream: `bool`, if `False`, the response content will be immediately downloaded :returns: :any:`Response`, response object """ raise NotImplementedError def close(self) -> None: """ Closes the session. .. note:: This is an abstract method that needs to be implemented. """ raise NotImplementedError def __enter__(self: _Self) -> _Self: return self def __exit__(self, *args, **kwargs) -> None: """Closes the session.""" return self.close() ================================================ FILE: src/yadisk/_typing_compat.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . __all__ = [ "AsyncGenerator", "AsyncIterable", "AsyncIterator", "Awaitable", "Callable", "Coroutine", "Dict", "Generator", "Iterable", "Iterator", "List", "Mapping", "Set", "Tuple", "Type", "TypeAlias" ] import sys if sys.version_info >= (3, 10): from typing import TypeAlias else: from typing_extensions import TypeAlias from typing import TYPE_CHECKING if sys.version_info < (3, 10): from typing import ( List, Dict, Set, Tuple, Callable, Iterable, Generator, AsyncGenerator, Coroutine, Awaitable, AsyncIterable, Iterator, AsyncIterator, Mapping, Type ) else: from collections.abc import ( Callable, Iterable, Generator, AsyncGenerator, Coroutine, Awaitable, AsyncIterable, Iterator, AsyncIterator, Mapping ) if TYPE_CHECKING: # pragma: no cover from typing import List, Dict, Set, Tuple, Type else: # mypy complains about this List = list Dict = dict Set = set Tuple = tuple Type = type ================================================ FILE: src/yadisk/exceptions.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . __all__ = [ "AsyncOperationFailedError", "AsyncOperationPollingTimeoutError", "AuthorizationPendingError", "BadGatewayError", "BadRequestError", "BadVerificationCodeError", "ConflictError", "DirectoryExistsError", "FieldValidationError", "ForbiddenError", "GatewayTimeoutError", "GoneError", "InsufficientStorageError", "InternalServerError", "InvalidClientError", "InvalidGrantError", "InvalidResponseError", "LockedError", "MD5DifferError", "NotAcceptableError", "NotFoundError", "OperationNotFoundError", "ParentNotFoundError", "PasswordRequiredError", "PathExistsError", "PathNotFoundError", "PayloadTooLargeError", "RequestError", "RequestTimeoutError", "ResourceDownloadLimitExceededError", "ResourceIsLockedError", "RetriableYaDiskError", "TooManyRedirectsError", "TooManyRequestsError", "UnauthorizedError", "UnavailableError", "UnknownYaDiskError", "UnsupportedMediaError", "UnsupportedTokenTypeError", "UploadTrafficLimitExceededError", "WrongResourceTypeError", "YaDiskConnectionError", "YaDiskError" ] from .types import AnyResponse from typing import Optional class YaDiskError(Exception): """ Base class for all exceptions in this library. :ivar error_type: `str`, unique error code as returned by API :ivar response: an instance of :any:`Response` or :any:`AsyncResponse` :ivar disable_retry: `bool`, if set to :code:`True`, exception will not trigger a retry in :any:`utils.auto_retry()` :param error_type: `str`, unique error code as returned by API :param msg: `str`, exception message :param response: an instance of :any:`Response` or :any:`AsyncResponse` :param disable_retry: `bool`, if set to :code:`True`, exception will not trigger a retry in :any:`utils.auto_retry()` """ error_type: Optional[str] response: Optional[AnyResponse] disable_retry: bool def __init__( self, error_type: Optional[str] = None, msg: str = "", response: Optional[AnyResponse] = None, disable_retry: bool = False ) -> None: Exception.__init__(self, msg) self.error_type = error_type self.response = response self.disable_retry = disable_retry class RequestError(YaDiskError): """ Generic exception class for cases when a request could not be sent or response could not be received. """ def __init__(self, msg: str = "", disable_retry: bool = False): YaDiskError.__init__(self, None, msg, disable_retry=disable_retry) class YaDiskConnectionError(RequestError): """Thrown when a connection error occured.""" pass class TooManyRedirectsError(RequestError): """Thrown when there were too many redirects.""" pass class RequestTimeoutError(RequestError): """Thrown when a request timed out.""" pass class WrongResourceTypeError(YaDiskError): """Thrown when the resource was expected to be of different type (e.g., file instead of directory).""" def __init__(self, msg: str = "") -> None: YaDiskError.__init__(self, None, msg, None) class RetriableYaDiskError(YaDiskError): """Thrown when there was an error but it would make sense to retry the request.""" pass class AsyncOperationFailedError(RetriableYaDiskError): """Raised when an asynchronous operation fails""" def __init__(self, msg: str = "") -> None: YaDiskError.__init__(self, None, msg, None) class AsyncOperationPollingTimeoutError(YaDiskError): """Raised when a polling timeout occured while waiting for an asynchronous operation""" def __init__(self, msg: str = "") -> None: YaDiskError.__init__(self, None, msg, None) class UnknownYaDiskError(RetriableYaDiskError): """Thrown when the request failed but the response does not contain any error info.""" def __init__( self, msg: str= "", response: Optional[AnyResponse] = None, disable_retry: bool = False ) -> None: RetriableYaDiskError.__init__(self, None, msg, response, disable_retry=disable_retry) class BadRequestError(YaDiskError): """Thrown when the server returns code 400.""" pass class UnauthorizedError(YaDiskError): """Thrown when the server returns code 401.""" pass class ForbiddenError(YaDiskError): """Thrown when the server returns code 403.""" pass class NotFoundError(YaDiskError): """Thrown when the server returns code 404.""" pass class NotAcceptableError(YaDiskError): """Thrown when the server returns code 406.""" pass class ConflictError(YaDiskError): """Thrown when the server returns code 409.""" pass class GoneError(YaDiskError): """Raised when the server returns code 410.""" pass class PayloadTooLargeError(YaDiskError): """Thrown when the server returns code 413.""" pass class UnsupportedMediaError(YaDiskError): """Thrown when the server returns code 415.""" pass class LockedError(YaDiskError): """Thrown when the server returns code 423.""" pass class UploadTrafficLimitExceededError(LockedError): """Thrown when upload limit has been exceeded.""" pass class TooManyRequestsError(YaDiskError): """Thrown when the server returns code 429.""" pass class ResourceDownloadLimitExceededError(TooManyRequestsError): """Raised when the download limit for a resource is exceeded.""" pass class InternalServerError(RetriableYaDiskError): """Thrown when the server returns code 500.""" pass class BadGatewayError(RetriableYaDiskError): """Thrown when the server returns code 502""" pass class UnavailableError(RetriableYaDiskError): """Thrown when the server returns code 503.""" pass class GatewayTimeoutError(RetriableYaDiskError): """Thrown when the server returns code 504""" pass class InsufficientStorageError(YaDiskError): """Thrown when the server returns code 507.""" pass class PathNotFoundError(NotFoundError): """Thrown when the requested path does not exist.""" pass class ParentNotFoundError(ConflictError): """Thrown by `mkdir`, `upload`, etc. when the parent directory doesn't exist.""" pass class PathExistsError(ConflictError): """Thrown when the requested path already exists.""" pass class DirectoryExistsError(PathExistsError): """Thrown when the directory already exists.""" pass class FieldValidationError(BadRequestError): """Thrown when the request contains fields with invalid data.""" pass class ResourceIsLockedError(LockedError): """Thrown when the resource is locked by another operation.""" pass class MD5DifferError(ConflictError): """Thrown when the MD5 hash of the file to be deleted doesn't match with the actual one.""" pass class OperationNotFoundError(NotFoundError): """Thrown by `get_operation_status()` when the operation doesn't exist.""" pass class InvalidResponseError(YaDiskError): """Thrown when Yandex.Disk did not return a JSON response or if it's invalid.""" pass class AuthorizationPendingError(BadRequestError): """Thrown when authorization is currently pending, the application has to wait.""" pass class InvalidClientError(BadRequestError): """Thrown when an invalid client ID or client secret was provided""" pass class InvalidGrantError(BadRequestError): """Thrown when a verification code is expired or invalid""" pass class BadVerificationCodeError(BadRequestError): """Thrown when a verification code has invalid format""" pass class UnsupportedTokenTypeError(BadRequestError): """Thrown when the specified token cannot be used in a request""" pass class PasswordRequiredError(ForbiddenError): """Thrown when a password is required to access the resource""" pass ================================================ FILE: src/yadisk/objects/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import * from ._error_object import * from ._link_object import * from ._disk import * from ._resources import * from ._operations import * from ._auth import * __all__ = [ # noqa: RUF022 # _yadisk_object "YaDiskObject", # _error_object "ErrorObject", # _link_object "LinkObject", # _disk "DiskInfoObject", "SystemFoldersObject", "UserObject", "UserPublicInfoObject", # _resources "CommentIDsObject", "EXIFObject", "FilesResourceListObject", "SyncFilesResourceListObject", "AsyncFilesResourceListObject", "LastUploadedResourceListObject", "SyncLastUploadedResourceListObject", "AsyncLastUploadedResourceListObject", "PublicResourcesListObject", "SyncPublicResourcesListObject", "AsyncPublicResourcesListObject", "ResourceListObject", "SyncResourceListObject", "AsyncResourceListObject", "ResourceObject", "SyncResourceObject", "AsyncResourceObject", "ResourceUploadLinkObject", "ShareInfoObject", "PublicResourceObject", "SyncPublicResourceObject", "AsyncPublicResourceObject", "PublicResourceListObject", "SyncPublicResourceListObject", "AsyncPublicResourceListObject", "TrashResourceObject", "SyncTrashResourceObject", "AsyncTrashResourceObject", "TrashResourceListObject", "SyncTrashResourceListObject", "AsyncTrashResourceListObject", "ResourceLinkObject", "SyncResourceLinkObject", "AsyncResourceLinkObject", "PublicResourceLinkObject", "SyncPublicResourceLinkObject", "AsyncPublicResourceLinkObject", "ResourceDownloadLinkObject", "PublicSettingsObject", "PublicAvailableSettingsObject", "PublicAccessObject", "PublicDefaultObject", "ExternalOrganizationIdVerboseObject", "PasswordVerboseObject", "PublicAccessObject", "ExternalOrganizationIdVerboseObject", "AvailableUntilVerboseObject", # _operations "OperationStatusObject", "OperationLinkObject", "SyncOperationLinkObject", "AsyncOperationLinkObject", # _auth "TokenObject", "TokenRevokeStatusObject", "DeviceCodeObject" ] ================================================ FILE: src/yadisk/objects/_auth.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import YaDiskObject from .._common import str_or_error, int_or_error from typing import Any, Optional __all__ = ["DeviceCodeObject", "TokenObject", "TokenRevokeStatusObject"] class TokenObject(YaDiskObject): """ Token object. :param token: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar access_token: `str`, token string :ivar refresh_token: `str`, the refresh-token :ivar token_type: `str`, type of the token :ivar expires_in: `int`, amount of time before the token expires :ivar scope: `str`, list of rights requested by the application, returned only if the token has a smaller set of rights than requested """ access_token: Optional[str] refresh_token: Optional[str] token_type: Optional[str] expires_in: Optional[int] scope: Optional[str] def __init__(self, token: Optional[dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"access_token": str_or_error, "refresh_token": str_or_error, "token_type": str_or_error, "expires_in": int_or_error, "scope": str_or_error}, yadisk) self.import_fields(token) class TokenRevokeStatusObject(YaDiskObject): """ Result of token revocation request. :param token_revoke_status: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar status: `str`, status of the operation """ status: Optional[str] def __init__(self, token_revoke_status: Optional[dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__(self, {"status": str_or_error}, yadisk) self.import_fields(token_revoke_status) class DeviceCodeObject(YaDiskObject): """ Result of :any:`Client.get_device_code()` / :any:`AsyncClient.get_device_code()`. :param device_code_object: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar device_code: `str`, device code that can be used for obtaining the token :ivar user_code: `str`, code that the user should enter on the OAuth page :ivar verification_url: `str`, URL of the OAuth page where user is expected to enter the :code:`user_code` :ivar interval: `int`, the minimum interval (in seconds) with which the app must request an OAuth token. If requests come more often, Yandex OAuth may respond with an error :ivar expires_in: `int`, amount of time before the codes expire """ device_code: Optional[str] user_code: Optional[str] verification_url: Optional[str] interval: Optional[int] expires_in: Optional[int] def __init__(self, device_code_object: Optional[dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, { "device_code": str_or_error, "user_code": str_or_error, "verification_url": str_or_error, "interval": int_or_error, "expires_in": int_or_error }, yadisk) self.import_fields(device_code_object) ================================================ FILE: src/yadisk/objects/_disk.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from functools import partial from ._yadisk_object import YaDiskObject from .._typing_compat import Dict from .._common import str_or_error, bool_or_error, int_or_error, yandex_date from typing import Any, Optional, NoReturn, TYPE_CHECKING if TYPE_CHECKING: # pragma: no cover import datetime __all__ = ["DiskInfoObject", "SystemFoldersObject", "UserObject", "UserPublicInfoObject"] class DiskInfoObject(YaDiskObject): """ Disk information object. :param disk_info: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar deletion_restriction_days: `int`, number of days before file deletion after account lock :ivar free_photounlim_end_date: `int`, timestamp in ms of expiration date of unlimited photo upload :ivar hide_screenshots_in_photoslice: `bool`, tells whether the screenshots are hidden in photoslice :ivar is_idm_managed_folder_address_access: `bool`, not clear what this is for :ivar is_idm_managed_public_access: `bool`, not clear what this is for :ivar is_legal_entity: `bool`, tells if the account belongs to a legal entity :ivar is_paid: `bool`, tells if the account is paid or not :ivar max_file_size: `int`, maximum supported file size (bytes) :ivar paid_max_file_size: `int`, maximum supported file size for a paid account (bytes) :ivar payment_flow: `bool`, tells if the user is involved in `payment_flow` :ivar photounlim_size: `int`, total file size in unlimited photos :ivar reg_time: :any:`datetime.datetime`, Disk registration date :ivar revision: `int`, current revision of Yandex.Disk :ivar system_folders: :any:`SystemFoldersObject`, paths to the system folders :ivar total_space: `int`, total disk size (bytes) :ivar trash_size: `int`, amount of space used by trash (bytes), part of `used_space` :ivar unlimited_autoupload_enabled: `bool`, tells whether unlimited autoupload from mobile devices is enabled :ivar used_space: `int`, amount of space used (bytes) :ivar user: :any:`UserObject`, owner of the disk :ivar will_be_overdrawn: `bool`, tells if the user will be in overdraft upon reaching `free_photounlim_end_date` """ deletion_restriction_days: Optional[int] free_photounlim_end_date: Optional[int] hide_screenshots_in_photoslice: Optional[bool] is_idm_managed_folder_address_access: Optional[bool] is_idm_managed_public_access: Optional[bool] is_legal_entity: Optional[bool] is_paid: Optional[bool] max_file_size: Optional[int] paid_max_file_size: Optional[int] payment_flow: Optional[bool] photounlim_size: Optional[int] reg_time: Optional["datetime.datetime"] revision: Optional[int] system_folders: "SystemFoldersObject" total_space: Optional[int] trash_size: Optional[int] unlimited_autoupload_enabled: Optional[bool] used_space: Optional[int] user: "UserObject" will_be_overdrawn: Optional[bool] def __init__(self, disk_info: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: YaDiskObject.__init__( self, { "deletion_restriction_days": int_or_error, "free_photounlim_end_date": int_or_error, "hide_screenshots_in_photoslice": bool_or_error, "is_idm_managed_folder_address_access": bool_or_error, "is_idm_managed_public_access": bool_or_error, "is_legal_entity": bool_or_error, "is_paid": bool_or_error, "max_file_size": int_or_error, "paid_max_file_size": int_or_error, "payment_flow": bool_or_error, "photounlim_size": int_or_error, "reg_time": yandex_date, "revision": int_or_error, "system_folders": partial(SystemFoldersObject, yadisk=yadisk), "total_space": int_or_error, "trash_size": int_or_error, "unlimited_autoupload_enabled": bool_or_error, "used_space": int_or_error, "user": partial(UserObject, yadisk=yadisk), "will_be_overdrawn": bool_or_error }, yadisk ) self.import_fields(disk_info) class SystemFoldersObject(YaDiskObject): """ Object, containing paths to system folders. :param system_folders: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar odnoklassniki: `str`, path to the Odnoklassniki folder :ivar google: `str`, path to the Google+ folder :ivar instagram: `str`, path to the Instagram folder :ivar vkontakte: `str`, path to the VKontakte folder :ivar attach: `str`, path to the mail attachments folder :ivar mailru: `str`, path to the My World folder :ivar downloads: `str`, path to the Downloads folder :ivar applications: `str` path to the Applications folder :ivar facebook: `str`, path to the Facebook folder :ivar social: `str`, path to the social networks folder :ivar messenger: `str`, path to the Messenger Files folder :ivar calendar: `str`, path to the Meeting Materials folder :ivar photostream: `str`, path to the camera folder :ivar screenshots: `str`, path to the screenshot folder :ivar scans: `str`, path to the Scans folder """ odnoklassniki: Optional[str] google: Optional[str] instagram: Optional[str] vkontakte: Optional[str] attach: Optional[str] mailru: Optional[str] downloads: Optional[str] applications: Optional[str] facebook: Optional[str] social: Optional[str] messenger: Optional[str] calendar: Optional[str] photostream: Optional[str] screenshots: Optional[str] scans: Optional[str] def __init__( self, system_folders: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, {"odnoklassniki": str_or_error, "google": str_or_error, "instagram": str_or_error, "vkontakte": str_or_error, "attach": str_or_error, "mailru": str_or_error, "downloads": str_or_error, "applications": str_or_error, "facebook": str_or_error, "social": str_or_error, "messenger": str_or_error, "calendar": str_or_error, "photostream": str_or_error, "screenshots": str_or_error, "scans": str_or_error}, yadisk) self.import_fields(system_folders) class UserObject(YaDiskObject): """ User object. :param user: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar reg_time: :any:`datetime.datetime`, Disk registration date :ivar display_name: `str`, user's display name :ivar uid: `str`, user's UID :ivar country: `str`, user's country :ivar is_child: `bool`, tells whether it's a child account :ivar login: `str`, user's login """ reg_time: Optional["datetime.datetime"] display_name: Optional[str] uid: Optional[str] country: Optional[str] is_child: Optional[bool] login: Optional[str] def __init__( self, user: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "reg_time": yandex_date, "display_name": str_or_error, "uid": str_or_error, "country": str_or_error, "is_child": bool_or_error, "login": str_or_error }, yadisk ) self.import_fields(user) class UserPublicInfoObject(UserObject): """ Public user information object. Inherits from :any:`UserObject` for compatibility. :param public_user_info: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar login: `str`, user's login :ivar display_name: `str`, user's display name :ivar uid: `str`, user's UID """ country: NoReturn # pyright: ignore[reportIncompatibleVariableOverride] def __init__( self, public_user_info: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: UserObject.__init__(self, None, yadisk) self.remove_field("country") self.import_fields(public_user_info) ================================================ FILE: src/yadisk/objects/_error_object.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import YaDiskObject __all__ = ["ErrorObject"] class ErrorObject(YaDiskObject): """ Mirrors Yandex.Disk REST API error object. :param error: `dict` or `None` :param yadisk: `YaDisk` or `None`, `YaDisk` object :ivar message: `str`, human-readable error message :ivar description: `str`, technical error description :ivar error: `str`, error code """ def __init__(self, error=None, yadisk=None): YaDiskObject.__init__( self, {"message": str, "description": str, "error": str}, yadisk) self.set_alias("error_description", "message") self.import_fields(error) ================================================ FILE: src/yadisk/objects/_link_object.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import YaDiskObject from typing import Any, Optional from .._common import str_or_error, bool_or_error __all__ = ["LinkObject"] class LinkObject(YaDiskObject): """ Link object. :param link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ href: Optional[str] method: Optional[str] templated: Optional[bool] def __init__(self, link: Optional[dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"href": str_or_error, "method": str_or_error, "templated": bool_or_error}, yadisk) self.import_fields(link) ================================================ FILE: src/yadisk/objects/_operations.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import YaDiskObject from ._link_object import LinkObject from .._common import str_or_error from ..types import OperationStatus from typing import Any, Optional __all__ = [ "AsyncOperationLinkObject", "OperationLinkObject", "OperationStatusObject", "SyncOperationLinkObject" ] class OperationStatusObject(YaDiskObject): """ Operation status object. :param operation_status: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object :ivar status: `str`, status of the operation """ status: OperationStatus def __init__(self, operation_status: Optional[dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"status": str_or_error}, yadisk) self.import_fields(operation_status) class OperationLinkObject(LinkObject): """ Operation link object. :param link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ pass class SyncOperationLinkObject(OperationLinkObject): """ Operation link object. :param link: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ def get_status(self, **kwargs) -> OperationStatus: """ Get operation status. :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :returns: `str`, :code:`"in-progress"` indicates that the operation is currently running, :code:`"success"` indicates that the operation was successful, :code:`"failed"` means that the operation failed """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.href is None: raise ValueError("OperationLinkObject has no link") return self._yadisk.get_operation_status(self.href, **kwargs) def wait(self, **kwargs) -> None: """ Wait until an operation is completed. If the operation fails, an exception is raised. Waiting is performed by calling :any:`time.sleep`. :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.href is None: raise ValueError("OperationLinkObject has no link") return self._yadisk.wait_for_operation(self.href, **kwargs) class AsyncOperationLinkObject(OperationLinkObject): """ Operation link object. :param link: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ async def get_status(self, **kwargs) -> OperationStatus: """ Get operation status. :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :returns: `str`, :code:`"in-progress"` indicates that the operation is currently running, :code:`"success"` indicates that the operation was successful, :code:`"failed"` means that the operation failed """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.href is None: raise ValueError("OperationLinkObject has no link") return await self._yadisk.get_operation_status(self.href, **kwargs) async def wait(self, **kwargs) -> None: """ Wait until an operation is completed. If the operation fails, an exception is raised. Waiting is performed by calling :any:`asyncio.sleep`. :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.href is None: raise ValueError("OperationLinkObject has no link") return await self._yadisk.wait_for_operation(self.href, **kwargs) ================================================ FILE: src/yadisk/objects/_operations.pyi ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Optional, Any from .._typing_compat import Dict, Tuple, Type from ._yadisk_object import YaDiskObject from ._link_object import LinkObject from ..types import OperationStatus, TimeoutParameter, Headers __all__ = [ "AsyncOperationLinkObject", "OperationLinkObject", "OperationStatusObject", "SyncOperationLinkObject" ] class OperationStatusObject(YaDiskObject): status: OperationStatus def __init__(self, operation_status: Optional[dict] = None, yadisk: Optional[Any] = None) -> None: ... class OperationLinkObject(LinkObject): ... class SyncOperationLinkObject(OperationLinkObject): def get_status( self, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> OperationStatus: ... def wait( self, *, poll_interval: float = ..., poll_timeout: Optional[float] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> None: ... class AsyncOperationLinkObject(OperationLinkObject): async def get_status( self, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> OperationStatus: ... async def wait( self, *, poll_interval: float = ..., poll_timeout: Optional[float] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> None: ... ================================================ FILE: src/yadisk/objects/_resources.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from functools import partial from pathlib import PurePosixPath from urllib.parse import urlencode, urlparse, parse_qs from ._yadisk_object import YaDiskObject from ._link_object import LinkObject from ._disk import UserPublicInfoObject from .._common import ( typed_list, yandex_date, is_resource_link, is_public_resource_link, ensure_path_has_scheme, str_or_error, int_or_error, float_or_error, bool_or_error, dict_or_error, str_or_dict_or_error ) from ..types import ( JSON, AsyncFileOrPath, AsyncFileOrPathDestination, FileOrPath, FileOrPathDestination ) from .. import settings from typing import ( TYPE_CHECKING, Any, Literal, overload, Union, Protocol, Optional ) from .._typing_compat import Generator, Dict, List, AsyncGenerator if TYPE_CHECKING: # pragma: no cover import datetime from ._operations import ( OperationLinkObject, AsyncOperationLinkObject, SyncOperationLinkObject ) __all__ = [ "AsyncFilesResourceListObject", "AsyncLastUploadedResourceListObject", "AsyncPublicResourceLinkObject", "AsyncPublicResourceListObject", "AsyncPublicResourceObject", "AsyncPublicResourcesListObject", "AsyncResourceLinkObject", "AsyncResourceListObject", "AsyncResourceObject", "AsyncTrashResourceListObject", "AsyncTrashResourceObject", "AvailableUntilVerboseObject", "CommentIDsObject", "EXIFObject", "ExternalOrganizationIdVerboseObject", "FilesResourceListObject", "LastUploadedResourceListObject", "PasswordVerboseObject", "PublicAccessObject", "PublicAvailableSettingsObject", "PublicDefaultObject", "PublicResourceLinkObject", "PublicResourceListObject", "PublicResourceObject", "PublicResourcesListObject", "PublicSettingsObject", "ResourceDownloadLinkObject", "ResourceLinkObject", "ResourceListObject", "ResourceObject", "ResourceUploadLinkObject", "ShareInfoObject", "SyncFilesResourceListObject", "SyncLastUploadedResourceListObject", "SyncPublicResourceLinkObject", "SyncPublicResourceListObject", "SyncPublicResourceObject", "SyncPublicResourcesListObject", "SyncResourceLinkObject", "SyncResourceListObject", "SyncResourceObject", "SyncTrashResourceListObject", "SyncTrashResourceObject", "TrashResourceListObject", "TrashResourceObject", ] class CommentIDsObject(YaDiskObject): """ Comment IDs object. :param comment_ids: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar private_resource: `str`, comment ID for private resources :ivar public_resource: `str`, comment ID for public resources """ private_resource: Optional[str] public_resource: Optional[str] def __init__(self, comment_ids: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"private_resource": str_or_error, "public_resource": str_or_error}, yadisk) self.import_fields(comment_ids) class EXIFObject(YaDiskObject): """ EXIF metadata object. :param exif: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar date_time: :any:`datetime.datetime`, capture date :ivar gps_longitude: `float`, longitude of the photo's location :ivar gps_latitude: `float`, latitude of the photo's location """ date_time: Optional["datetime.datetime"] gps_longitude: Optional[float] gps_latitude: Optional[float] def __init__( self, exif: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "date_time": yandex_date, "gps_longitude": float_or_error, "gps_latitude": float_or_error }, yadisk ) self.import_fields(exif) class FilesResourceListObject(YaDiskObject): """ Flat list of files. :param files_resource_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, flat list of files (:any:`ResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["ResourceObject"]] limit: Optional[int] offset: Optional[int] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"items": typed_list(partial(ResourceObject, yadisk=yadisk)), "limit": int_or_error, "offset": int_or_error}, yadisk) self.import_fields(files_resource_list) class SyncFilesResourceListObject(FilesResourceListObject): """ Flat list of files. :param files_resource_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar items: `list`, flat list of files (:any:`SyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["SyncResourceObject"]] # type: ignore[assignment] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): FilesResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncResourceObject, yadisk=yadisk))) self.import_fields(files_resource_list) class AsyncFilesResourceListObject(FilesResourceListObject): """ Flat list of files. :param files_resource_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, flat list of files (:any:`AsyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["AsyncResourceObject"]] # type: ignore[assignment] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): FilesResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncResourceObject, yadisk=yadisk))) self.import_fields(files_resource_list) class LastUploadedResourceListObject(YaDiskObject): """ List of last uploaded resources. :param last_uploaded_resources_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, list of resources (:any:`ResourceObject`) :ivar limit: `int`, maximum number of elements in the list """ items: Optional[List["ResourceObject"]] limit: Optional[int] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"items": typed_list(partial(ResourceObject, yadisk=yadisk)), "limit": int_or_error}, yadisk) self.import_fields(last_uploaded_resources_list) class SyncLastUploadedResourceListObject(LastUploadedResourceListObject): """ List of last uploaded resources. :param last_uploaded_resources_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar items: `list`, list of resources (:any:`SyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list """ items: Optional[List["SyncResourceObject"]] # type: ignore[assignment] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): LastUploadedResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncResourceObject, yadisk=yadisk))) self.import_fields(last_uploaded_resources_list) class AsyncLastUploadedResourceListObject(LastUploadedResourceListObject): """ List of last uploaded resources. :param last_uploaded_resources_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, list of resources (:any:`AsyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list """ items: Optional[List["AsyncResourceObject"]] # type: ignore[assignment] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): LastUploadedResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncResourceObject, yadisk=yadisk))) self.import_fields(last_uploaded_resources_list) class PublicResourcesListObject(YaDiskObject): """ List of public resources. :param public_resources_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, list of public resources (:any:`PublicResourceObject`) :ivar type: `str`, resource type to filter by :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["PublicResourceObject"]] type: Optional[str] limit: Optional[int] offset: Optional[int] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"items": typed_list(partial(PublicResourceObject, yadisk=yadisk)), "type": str_or_error, "limit": int_or_error, "offset": int_or_error}, yadisk) self.import_fields(public_resources_list) class SyncPublicResourcesListObject(PublicResourcesListObject): """ List of public resources. :param public_resources_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar items: `list`, list of public resources (:any:`SyncPublicResourceObject`) :ivar type: `str`, resource type to filter by :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["SyncPublicResourceObject"]] # type: ignore[assignment] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourcesListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncPublicResourceObject, yadisk=yadisk))) self.import_fields(public_resources_list) class AsyncPublicResourcesListObject(PublicResourcesListObject): """ List of public resources. :param public_resources_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar items: `list`, list of public resources (:any:`AsyncPublicResourceObject`) :ivar type: `str`, resource type to filter by :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list """ items: Optional[List["AsyncPublicResourceObject"]] # type: ignore[assignment] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourcesListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncPublicResourceObject, yadisk=yadisk))) self.import_fields(public_resources_list) class ResourceProtocol(Protocol): @property def type(self) -> Optional[str]: ... @property def path(self) -> Optional[str]: ... @property def public_key(self) -> Optional[str]: ... @property def public_url(self) -> Optional[str]: ... @property def file(self) -> Optional[str]: ... @property def _yadisk(self) -> Optional[Any]: ... class ResourceObjectMethodsMixin: def get_meta(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "SyncResourceObject": """ Get meta information about a file/directory. :param relative_path: `str` or `None`, relative path from resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`SyncResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_meta(str(path), **kwargs) def get_public_meta(self: ResourceProtocol, **kwargs) -> "SyncPublicResourceObject": """ Get meta-information about a public resource. :param path: relative path to a resource in a public folder. :param offset: offset from the beginning of the list of nested resources :param limit: maximum number of nested elements to be included in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: file preview size :param preview_crop: `bool`, allow preview crop :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`SyncPublicResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") public_key_or_url = self.public_key or self.public_url if public_key_or_url is None: raise ValueError("ResourceObject doesn't have a public_key/public_url") return self._yadisk.get_public_meta(public_key_or_url, **kwargs) def exists(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource exists. :param relative_path: `str` or `None`, relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.exists(str(path), **kwargs) def get_type(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get resource type. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_type(str(path), **kwargs) def is_dir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a directory. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.is_dir(str(path), **kwargs) def is_file(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a file. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.is_file(str(path), **kwargs) def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> Generator["SyncResourceObject", None, None]: """ Get contents of the resource. :param relative_path: relative path from resource :param limit: number of children resources to be included in the response :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`SyncResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.listdir(str(path), **kwargs) def public_listdir( self: ResourceProtocol, **kwargs ) -> Generator["SyncPublicResourceObject", None, None]: """ Get contents of a public directory. :param path: relative path to the resource in the public folder. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`SyncPublicResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") public_key_or_url = self.public_key or self.public_url if public_key_or_url is None: raise ValueError("ResourceObject doesn't have a public_key/public_url") return self._yadisk.public_listdir(public_key_or_url, **kwargs) def get_upload_link(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get a link to upload the file using the PUT request. :param relative_path: `str` or `None`, relative path to the resource :param overwrite: `bool`, determines whether to overwrite the destination :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: `str` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_upload_link(str(path), **kwargs) def get_upload_link_object( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "ResourceUploadLinkObject": """ Get a link to upload the file using the PUT request. This is similar to :any:`Client.get_upload_link()`, except it returns an instance of :any:`ResourceUploadLinkObject` which also contains an asynchronous operation ID. :param relative_path: `str` or `None`, relative path to the resource :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`ResourceUploadLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_upload_link_object(str(path), **kwargs) def upload(self: ResourceProtocol, path_or_file: FileOrPath, relative_path: Optional[str] = None, /, **kwargs) -> "SyncResourceLinkObject": """ Upload a file to disk. :param path_or_file: path or file-like object to be uploaded :param relative_path: `str` or `None`, destination path relative to the resource :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`SyncResourceLinkObject`, link to the destination resource """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") dst_path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.upload(path_or_file, str(dst_path), **kwargs) def upload_url(self: ResourceProtocol, url: str, relative_path: Optional[str] = None, /, **kwargs) -> "OperationLinkObject": """ Upload a file from URL. :param url: source URL :param relative_path: `str` or `None`, destination path relative to the resource :param disable_redirects: `bool`, forbid redirects :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncOperationLinkObject`, link to the asynchronous operation """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") dst_path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.upload_url(url, str(dst_path), **kwargs) def get_download_link(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get a download link for a file (or a directory). :param relative_path: `str` or `None`, path relative to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: `str` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_download_link(str(path), **kwargs) @overload def download(self: ResourceProtocol, dst_path_or_file: FileOrPathDestination, /, **kwargs) -> "SyncResourceLinkObject": pass @overload def download(self: ResourceProtocol, relative_path: Optional[str], dst_path_or_file: FileOrPathDestination, /, **kwargs) -> "SyncResourceLinkObject": pass def download(self: ResourceProtocol, /, *args, **kwargs) -> "SyncResourceLinkObject": """ Download the file. This method takes 1 or 2 positional arguments: 1. :code:`download(dst_path_or_file, /, **kwargs)` 2. :code:`download(relative_path, dst_path_or_file, /, **kwargs)` If `relative_path` is empty or None (or not specified) this method will try to use the `file` attribute as a download link. :param relative_path: `str` or `None`, source path relative to the resource :param dst_path_or_file: destination path or file-like object :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject`, link to the source resource """ if len(args) == 1: relative_path, dst_path_or_file = None, args[0] elif len(args) == 2: relative_path, dst_path_or_file = args else: raise TypeError("download() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if not relative_path and hasattr(self, "file") and self.file is not None: self._yadisk.download_by_link(self.file, dst_path_or_file, **kwargs) return SyncResourceLinkObject.from_path(self.path, yadisk=self._yadisk) if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.download(str(src_path), dst_path_or_file, **kwargs) @overload def patch(self: ResourceProtocol, properties: Dict, **kwargs) -> "SyncResourceObject": pass @overload def patch(self: ResourceProtocol, relative_path: Union[str, None], properties: Dict, **kwargs) -> "SyncResourceObject": pass def patch(self: ResourceProtocol, *args, **kwargs) -> "SyncResourceObject": """ Update custom properties of a resource. This method takes 1 or 2 positional arguments: 1. :code:`patch(properties, /, **kwargs)` 2. :code:`patch(relative_path, properties, /, **kwargs)` :param relative_path: `str` or `None`, path relative to the resource :param properties: `dict`, custom properties to update :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceObject` """ if len(args) == 1: relative_path, properties = None, args[0] elif len(args) == 2: relative_path, properties = args else: raise TypeError("patch() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.patch(str(path), properties, **kwargs) def publish( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "SyncResourceLinkObject": """ Make a resource public. :param relative_path: `str` or `None`, relative path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param public_settings: :any:`PublicSettings` or `None`, public access settings for the resource :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject`, link to the resource """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.publish(str(path), **kwargs) def unpublish(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "SyncResourceLinkObject": """ Make a public resource private. :param relative_path: `str` or `None`, relative path to the resource to be unpublished :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.unpublish(str(path), **kwargs) def get_public_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a resource. :param relative_path: `str` or `None`, relative path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicSettingsObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_public_settings(str(path), **kwargs) def get_public_available_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a shared resource for the current OAuth token owner. :param relative_path: `str` or `None`, relative path to the resource to be published :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicAvailableSettingsObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_public_available_settings(str(path), **kwargs) def update_public_settings( self: ResourceProtocol, *args, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a shared resource for the current OAuth token owner. This method takes 1 or 2 positional arguments: 1. :code:`update_public_settings(public_settings, /, **kwargs)` 2. :code:`update_public_settings(relative_path, public_settings, /, **kwargs)` :param relative_path: `str` or `None`, relative path to the resource to be published :param public_settings: :any:`PublicSettings`, public access settings for the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicAvailableSettingsObject` """ if len(args) == 1: relative_path, public_settings = None, args[0] elif len(args) == 2: relative_path, public_settings = args else: raise TypeError("update_public_settings() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.update_public_settings(str(path), public_settings, **kwargs) def mkdir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "SyncResourceLinkObject": """ Create a new directory. :param relative_path: `str` or `None`, relative path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.mkdir(str(path), **kwargs) def makedirs( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "SyncResourceLinkObject": """ Create a new directory at `path`. If its parent directory doesn't exist it will also be created recursively. :param relative_path: `str` or `None`, relative path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`SyncResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.makedirs(str(path), **kwargs) def remove(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> Optional["SyncOperationLinkObject"]: """ Remove the resource. :param relative_path: `str` or `None`, relative path to the resource to be removed :param permanently: if `True`, the resource will be removed permanently, otherwise, it will be just moved to the trash :param md5: `str`, MD5 hash of the file to remove :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises BadRequestError: MD5 check is only available for files :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.remove(str(path), **kwargs) @overload def move(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass @overload def move(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass def move(self: ResourceProtocol, /, *args, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: """ Move resource to `dst_path`. This method takes 1 or 2 positional arguments: 1. :code:`move(dst_path, /, **kwargs)` 2. :code:`move(relative_path, dst_path, /, **kwargs)` :param relative_path: `str` or `None`, source path to be moved relative to the resource :param dst_path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ if len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("move() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.move(str(src_path), dst_path, **kwargs) @overload def rename(self: ResourceProtocol, new_name: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass @overload def rename(self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass def rename( self: ResourceProtocol, /, *args, **kwargs ) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: """ Rename `src_path` to have filename `new_name`. Does the same as `move()` but changes only the filename. :param relative_path: `str` or `None`, source path to be renamed relative to the resource :param new_name: target filename to rename to :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises ValueError: `new_name` is not a valid filename :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ if len(args) == 1: relative_path, new_name = None, args[0] elif len(args) == 2: relative_path, new_name = args else: raise TypeError("rename() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.rename(str(path), new_name, **kwargs) @overload def copy(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass @overload def copy(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: pass def copy(self: ResourceProtocol, /, *args, **kwargs) -> Union["SyncResourceLinkObject", "SyncOperationLinkObject"]: """ Copy resource to `dst_path`. If the operation is performed asynchronously, returns the link to the operation, otherwise, returns the link to the newly created resource. This method takes 1 or 2 positional arguments: 1. :code:`copy(dst_path, /, **kwargs)` 2. :code:`copy(relative_src_path, dst_path, /, **kwargs)` :param relative_src_path: `str` or `None`, source path relative to the resource :param dst_path: destination path :param overwrite: if `True` the destination path can be overwritten, otherwise, an error will be raised :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises InsufficientStorageError: cannot complete request due to lack of storage space :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ if len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("copy() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.copy(str(src_path), dst_path, **kwargs) class AsyncResourceObjectMethodsMixin: async def get_meta( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "AsyncResourceObject": """ Get meta information about a file/directory. :param relative_path: `str` or `None`, relative path from resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`AsyncResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_meta(str(path), **kwargs) async def get_public_meta(self: ResourceProtocol, **kwargs) -> "AsyncPublicResourceObject": """ Get meta-information about a public resource. :param path: relative path to a resource in a public folder. :param offset: offset from the beginning of the list of nested resources :param limit: maximum number of nested elements to be included in the list :param sort: `str`, field to be used as a key to sort children resources :param preview_size: file preview size :param preview_crop: `bool`, allow preview crop :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`AsyncPublicResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") public_key_or_url = self.public_key or self.public_url if public_key_or_url is None: raise ValueError("ResourceObject doesn't have a public_key/public_url") return await self._yadisk.get_public_meta(public_key_or_url, **kwargs) async def exists(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource exists. :param relative_path: `str` or `None`, relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.exists(str(path), **kwargs) async def get_type(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get resource type. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_type(str(path), **kwargs) async def is_dir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a directory. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.is_dir(str(path), **kwargs) async def is_file(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a file. :param relative_path: relative path from the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.is_file(str(path), **kwargs) async def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> AsyncGenerator["AsyncResourceObject", None]: """ Get contents of the resource. :param relative_path: relative path from resource :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`AsyncResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") async for i in self._yadisk.listdir(str(path), **kwargs): yield i async def public_listdir( self: ResourceProtocol, **kwargs ) -> AsyncGenerator["AsyncPublicResourceObject", None]: """ Get contents of a public directory. :param path: relative path to the resource in the public folder. :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`AsyncPublicResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") public_key_or_url = self.public_key or self.public_url if public_key_or_url is None: raise ValueError("ResourceObject doesn't have a public_key/public_url") async for i in self._yadisk.public_listdir(public_key_or_url, **kwargs): yield i async def get_upload_link(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get a link to upload the file using the PUT request. :param relative_path: `str` or `None`, relative path to the resource :param overwrite: `bool`, determines whether to overwrite the destination :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: `str` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_upload_link(str(path), **kwargs) async def get_upload_link_object( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "ResourceUploadLinkObject": """ Get a link to upload the file using the PUT request. This is similar to :any:`AsyncClient.get_upload_link()`, except it returns an instance of :any:`ResourceUploadLinkObject` which also contains an asynchronous operation ID. :param relative_path: `str` or `None`, relative path to the resource :param overwrite: `bool`, determines whether to overwrite the destination :param fields: list of keys to be included in the response :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`ResourceUploadLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_upload_link_object(str(path), **kwargs) async def upload( self: ResourceProtocol, path_or_file: AsyncFileOrPath, relative_path: Optional[str] = None, /, **kwargs ) -> "AsyncResourceLinkObject": """ Upload a file to disk. :param path_or_file: path or file-like object to be uploaded :param relative_path: `str` or `None`, destination path relative to the resource :param overwrite: if `True`, the resource will be overwritten if it already exists, an error will be raised otherwise :param spoof_user_agent: `bool`, if `True` (default), the `User-Agent` header will be set to a special value, which should allow bypassing of Yandex.Disk's upload speed limit :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises UploadTrafficLimitExceededError: upload limit has been exceeded :returns: :any:`AsyncResourceLinkObject`, link to the destination resource """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") dst_path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.upload(path_or_file, str(dst_path), **kwargs) async def upload_url(self: ResourceProtocol, url: str, relative_path: Optional[str] = None, /, **kwargs) -> "AsyncOperationLinkObject": """ Upload a file from URL. :param url: source URL :param relative_path: `str` or `None`, destination path relative to the resource :param disable_redirects: `bool`, forbid redirects :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises PathExistsError: destination path already exists :raises InsufficientStorageError: cannot upload file due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncOperationLinkObject`, link to the asynchronous operation """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") dst_path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.upload_url(url, str(dst_path), **kwargs) async def get_download_link(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get a download link for a file (or a directory). :param relative_path: `str` or `None`, path relative to the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: `str` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_download_link(str(path), **kwargs) @overload async def download( self: ResourceProtocol, dst_path_or_file: AsyncFileOrPathDestination, /, **kwargs ) -> "AsyncResourceLinkObject": pass @overload async def download( self: ResourceProtocol, relative_path: Optional[str], dst_path_or_file: AsyncFileOrPathDestination, /, **kwargs ) -> "AsyncResourceLinkObject": pass async def download(self: ResourceProtocol, /, *args, **kwargs) -> "AsyncResourceLinkObject": """ Download the file. This method takes 1 or 2 positional arguments: 1. :code:`download(dst_path_or_file, /, **kwargs)` 2. :code:`download(relative_path, dst_path_or_file, /, **kwargs)` If `relative_path` is empty or None (or not specified) this method will try to use the `file` attribute as a download link. :param relative_path: `str` or `None`, source path relative to the resource :param dst_path_or_file: destination path or file-like object :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceLinkObject`, link to the source resource """ if len(args) == 1: relative_path, dst_path_or_file = None, args[0] elif len(args) == 2: relative_path, dst_path_or_file = args else: raise TypeError("download() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if not relative_path and hasattr(self, "file") and self.file is not None: await self._yadisk.download_by_link(self.file, dst_path_or_file, **kwargs) return AsyncResourceLinkObject.from_path(self.path, yadisk=self._yadisk) if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.download(str(src_path), dst_path_or_file, **kwargs) @overload async def patch(self: ResourceProtocol, properties: Dict, **kwargs) -> "AsyncResourceObject": pass @overload async def patch( self: ResourceProtocol, relative_path: Union[str, None], properties: Dict, **kwargs ) -> "AsyncResourceObject": pass async def patch(self: ResourceProtocol, *args, **kwargs) -> "AsyncResourceObject": """ Update custom properties of a resource. This method takes 1 or 2 positional arguments: 1. :code:`patch(properties, /, **kwargs)` 2. :code:`patch(relative_path, properties, /, **kwargs)` :param relative_path: `str` or `None`, path relative to the resource :param properties: `dict`, custom properties to update :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceObject` """ if len(args) == 1: relative_path, properties = None, args[0] elif len(args) == 2: relative_path, properties = args else: raise TypeError("patch() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.patch(str(path), properties, **kwargs) async def publish(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "AsyncResourceLinkObject": """ Make a resource public. :param relative_path: `str` or `None`, relative path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param public_settings: :any:`PublicSettings`, public access settings for the resource :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceLinkObject`, link to the resource """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.publish(str(path), **kwargs) async def unpublish(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "AsyncResourceLinkObject": """ Make a public resource private. :param relative_path: `str` or `None`, relative path to the resource to be unpublished :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`ResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.unpublish(str(path), **kwargs) async def get_public_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a resource. :param relative_path: `str` or `None`, relative path to the resource to be published :param allow_address_access: `bool`, specifies the request format, i.e. with personal access settings (when set to `True`) or without :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicSettingsObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_public_settings(str(path), **kwargs) async def get_public_available_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a shared resource for the current OAuth token owner. :param relative_path: `str` or `None`, relative path to the resource to be published :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicAvailableSettingsObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_public_available_settings(str(path), **kwargs) async def update_public_settings( self: ResourceProtocol, *args, **kwargs ) -> "PublicSettingsObject": """ Get public settings of a shared resource for the current OAuth token owner. This method takes 1 or 2 positional arguments: 1. :code:`update_public_settings(public_settings, /, **kwargs)` 2. :code:`update_public_settings(relative_path, public_settings, /, **kwargs)` :param relative_path: `str` or `None`, relative path to the resource to be published :param public_settings: :any:`PublicSettings`, public access settings for the resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`PublicAvailableSettingsObject` """ if len(args) == 1: relative_path, public_settings = None, args[0] elif len(args) == 2: relative_path, public_settings = args else: raise TypeError("update_public_settings() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.update_public_settings(str(path), public_settings, **kwargs) async def mkdir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "AsyncResourceLinkObject": """ Create a new directory. :param relative_path: `str` or `None`, relative path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ParentNotFoundError: parent directory doesn't exist :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.mkdir(str(path), **kwargs) async def makedirs( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> "AsyncResourceLinkObject": """ Create a new directory at `path`. If its parent directory doesn't exist it will also be created recursively. :param relative_path: `str` or `None`, relative path to the directory to be created :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises DirectoryExistsError: destination path already exists :raises InsufficientStorageError: cannot create directory due to lack of storage space :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :returns: :any:`AsyncSyncResourceLinkObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.makedirs(str(path), **kwargs) async def remove(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> Optional["AsyncOperationLinkObject"]: """ Remove the resource. :param relative_path: `str` or `None`, relative path to the resource to be removed :param permanently: if `True`, the resource will be removed permanently, otherwise, it will be just moved to the trash :param md5: `str`, MD5 hash of the file to remove :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises BadRequestError: MD5 check is only available for files :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.remove(str(path), **kwargs) @overload async def move(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass @overload async def move(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass async def move( self: ResourceProtocol, /, *args, **kwargs ) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: """ Move resource to `dst_path`. This method takes 1 or 2 positional arguments: 1. :code:`move(dst_path, /, **kwargs)` 2. :code:`move(relative_path, dst_path, /, **kwargs)` :param relative_path: `str` or `None`, source path to be moved relative to the resource :param dst_path: destination path :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ if len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("move() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.move(str(src_path), dst_path, **kwargs) @overload async def rename(self: ResourceProtocol, new_name: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass @overload async def rename(self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass async def rename( self: ResourceProtocol, /, *args, **kwargs ) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: """ Rename `src_path` to have filename `new_name`. Does the same as `move()` but changes only the filename. :param relative_path: `str` or `None`, source path to be renamed relative to the resource :param new_name: target filename to rename to :param overwrite: `bool`, determines whether to overwrite the destination :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises ValueError: `new_name` is not a valid filename :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ if len(args) == 1: relative_path, new_name = None, args[0] elif len(args) == 2: relative_path, new_name = args else: raise TypeError("rename() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.rename(str(path), new_name, **kwargs) @overload async def copy(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass @overload async def copy(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: pass async def copy( self: ResourceProtocol, /, *args, **kwargs ) -> Union["AsyncResourceLinkObject", "AsyncOperationLinkObject"]: """ Copy resource to `dst_path`. If the operation is performed asynchronously, returns the link to the operation, otherwise, returns the link to the newly created resource. This method takes 1 or 2 positional arguments: 1. :code:`copy(dst_path, /, **kwargs)` 2. :code:`copy(relative_path, dst_path, /, **kwargs)` :param relative_path: `str` or `None`, source path relative to the resource :param dst_path: destination path :param overwrite: if `True` the destination path can be overwritten, otherwise, an error will be raised :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises InsufficientStorageError: cannot complete request due to lack of storage space :raises ResourceIsLockedError: resource is locked by another request :raises UploadTrafficLimitExceededError: upload limit has been exceeded :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ if len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("copy() takes 1 or 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") src_path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.copy(str(src_path), dst_path, **kwargs) def _convert_list_of_previews(previews: JSON) -> Optional[Dict[str, str]]: if previews is None: return None if not isinstance(previews, list): raise ValueError(f"Expected a list, got {type(previews)}") result = {} for preview in previews: if not isinstance(preview, dict): raise ValueError(f"Expected a dict, got {type(preview)}") try: name = preview["name"] url = preview["url"] except KeyError: continue if not isinstance(name, str): raise ValueError(f"Expected a string, got {type(name)}") if not isinstance(url, str): raise ValueError(f"Expected a string, got {type(url)}") result[name] = url return result class ResourceObject(YaDiskObject): """ Resource object. :param resource: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`ResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ antivirus_status: Optional[str] file: Optional[str] size: Optional[int] public_key: Optional[str] sha256: Optional[str] embedded: Optional["ResourceListObject"] _embedded: Optional["ResourceListObject"] name: Optional[str] exif: Optional[EXIFObject] resource_id: Optional[str] custom_properties: Optional[Dict] public_url: Optional[str] share: Optional["ShareInfoObject"] modified: Optional["datetime.datetime"] created: Optional["datetime.datetime"] photoslice_time: Optional["datetime.datetime"] mime_type: Optional[str] path: Optional[str] preview: Optional[str] comment_ids: Optional[CommentIDsObject] type: Optional[str] media_type: Optional[str] md5: Optional[str] revision: Optional[int] sizes: Optional[Dict[str, str]] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"antivirus_status": str_or_dict_or_error, "file": str_or_error, "size": int_or_error, "public_key": str_or_error, "sha256": str_or_error, "embedded": partial(ResourceListObject, yadisk=yadisk), "name": str_or_error, "exif": partial(EXIFObject, yadisk=yadisk), "resource_id": str_or_error, "custom_properties": dict_or_error, "public_url": str_or_error, "share": partial(ShareInfoObject, yadisk=yadisk), "modified": yandex_date, "created": yandex_date, "photoslice_time": yandex_date, "mime_type": str_or_error, "path": str_or_error, "preview": str_or_error, "comment_ids": partial(CommentIDsObject, yadisk=yadisk), "type": str_or_error, "media_type": str_or_error, "md5": str_or_error, "revision": int_or_error, "sizes": _convert_list_of_previews }, yadisk) self.set_alias("_embedded", "embedded") self.import_fields(resource) class SyncResourceObject(ResourceObject, ResourceObjectMethodsMixin): """ Resource object. :param resource: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`SyncResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ embedded: Optional["SyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(SyncResourceListObject, yadisk=yadisk)) self.import_fields(resource) class AsyncResourceObject(ResourceObject, AsyncResourceObjectMethodsMixin): """ Resource object. :param resource: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`AsyncResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ embedded: Optional["AsyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(AsyncResourceListObject, yadisk=yadisk)) self.import_fields(resource) class ResourceLinkObject(LinkObject): """ Resource link object. :param link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar path: `str`, path to the resource """ type: Optional[str] public_key: Optional[str] public_url: Optional[str] file: Optional[str] path: Optional[str] def __init__(self, link: Optional[Dict] = None, yadisk: Optional[Any] = None): LinkObject.__init__(self, None, yadisk) self.set_field_type("path", str_or_error) self.set_field_type("public_key", str_or_error) self.set_field_type("public_url", str_or_error) self.set_field_type("type", str_or_error) self.set_field_type("file", str_or_error) self.import_fields(link) if self.href is not None and is_resource_link(self.href): try: self.path = ensure_path_has_scheme( parse_qs(urlparse(self.href).query).get("path", [])[0]) except IndexError: pass @classmethod def from_path(cls, path: Optional[str], yadisk: Optional[Any] = None): if path is None: return cls(yadisk=yadisk) path = ensure_path_has_scheme(path) return cls( {"method": "GET", "href": f"{settings.BASE_API_URL}/v1/disk/resources?{urlencode({'path': path})}", "templated": False}, yadisk=yadisk) class SyncResourceLinkObject(ResourceLinkObject, ResourceObjectMethodsMixin): """ Resource link object. :param link: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar path: `str`, path to the resource """ pass class AsyncResourceLinkObject(ResourceLinkObject, AsyncResourceObjectMethodsMixin): """ Resource link object. :param link: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar path: `str`, path to the resource """ pass class PublicResourceLinkObject(LinkObject): """ Public resource link object. :param link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar public_key: `str`, public key of the resource :ivar public_url: `str`, public URL of the resource """ type: Optional[str] file: Optional[str] path: Optional[str] public_key: Optional[str] public_url: Optional[str] def __init__(self, link: Optional[Dict] = None, yadisk: Optional[Any] = None): LinkObject.__init__(self, None, yadisk) self.set_field_type("public_key", str_or_error) self.set_field_type("public_url", str_or_error) self.set_field_type("path", str_or_error) self.import_fields(link) if self.href is not None and is_public_resource_link(self.href): try: public_key_or_url = parse_qs(urlparse(self.href).query).get("public_key", [])[0] except IndexError: public_key_or_url = "" if public_key_or_url.startswith(("http://", "https://")): self.public_url = public_key_or_url else: self.public_key = public_key_or_url @classmethod def from_public_key(cls, public_key: Optional[str], yadisk: Optional[Any] = None): if public_key is None: return cls(yadisk=yadisk) return cls( {"method": "GET", "href": f"{settings.BASE_API_URL}/v1/disk/public/resources?{urlencode({'public_key': public_key})}", "templated": False}, yadisk=yadisk) class SyncPublicResourceLinkObject(PublicResourceLinkObject, ResourceObjectMethodsMixin): """ Public resource link object. :param link: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar public_key: `str`, public key of the resource :ivar public_url: `str`, public URL of the resource """ pass class AsyncPublicResourceLinkObject(PublicResourceLinkObject, AsyncResourceObjectMethodsMixin): """ Public resource link object. :param link: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated :ivar public_key: `str`, public key of the resource :ivar public_url: `str`, public URL of the resource """ pass class ResourceListObject(YaDiskObject): """ List of resources. :param resource_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`ResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ sort: Optional[str] items: Optional[List[ResourceObject]] limit: Optional[int] offset: Optional[int] path: Optional[str] total: Optional[int] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"sort": str_or_error, "items": typed_list(partial(ResourceObject, yadisk=yadisk)), "limit": int_or_error, "offset": int_or_error, "path": str_or_error, "total": int_or_error}, yadisk) self.import_fields(resource_list) class SyncResourceListObject(ResourceListObject): """ List of resources. :param resource_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`SyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ items: Optional[List[SyncResourceObject]] # type: ignore[assignment] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncResourceObject, yadisk=yadisk))) self.import_fields(resource_list) class AsyncResourceListObject(ResourceListObject): """ List of resources. :param resource_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`AsyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ items: Optional[List[AsyncResourceObject]] # type: ignore[assignment] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncResourceObject, yadisk=yadisk))) self.import_fields(resource_list) class ResourceUploadLinkObject(LinkObject): """ Resource upload link. :param resource_upload_link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar operation_id: `str`, ID of the upload operation :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ operation_id: Optional[str] def __init__(self, resource_upload_link: Optional[Dict] = None, yadisk: Optional[Any] = None): LinkObject.__init__(self, None, yadisk) self.set_field_type("operation_id", str_or_error) self.import_fields(resource_upload_link) class ResourceDownloadLinkObject(LinkObject): """ Resource download link. :param link: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar href: `str`, link URL :ivar method: `str`, HTTP method :ivar templated: `bool`, tells whether the URL is templated """ pass class ShareInfoObject(YaDiskObject): """ Shared folder information object. :param share_info: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar is_root: `bool`, tells whether the folder is root :ivar is_owned: `bool`, tells whether the user is the owner of this directory :ivar rights: `str`, access rights """ is_root: Optional[bool] is_owned: Optional[bool] rights: Optional[str] def __init__(self, share_info: Optional[Dict] = None, yadisk: Optional[Any] = None): YaDiskObject.__init__( self, {"is_root": bool_or_error, "is_owned": bool_or_error, "rights": str_or_error}, yadisk) self.import_fields(share_info) class PublicResourceObject(ResourceObject): """ Public resource object. :param resource: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`PublicResourceObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar view_count: `int`, number of times the public resource was viewed :ivar owner: :any:`UserPublicInfoObject`, owner of the public resource """ views_count: Optional[int] view_count: Optional[int] embedded: Optional["PublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["PublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] owner: Optional[UserPublicInfoObject] def __init__(self, public_resource=None, yadisk=None): ResourceObject.__init__(self, None, yadisk) self.set_field_type("views_count", int_or_error) self.set_alias("view_count", "views_count") self.set_field_type("embedded", partial(PublicResourceListObject, yadisk=yadisk)) self.set_field_type("owner", partial(UserPublicInfoObject, yadisk=yadisk)) self.import_fields(public_resource) class SyncPublicResourceObject(PublicResourceObject, ResourceObjectMethodsMixin): """ Public resource object. :param resource: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`SyncPublicResourceObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar view_count: `int`, number of times the public resource was viewed :ivar owner: :any:`UserPublicInfoObject`, owner of the public resource """ embedded: Optional["SyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, public_resource: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(SyncPublicResourceListObject, yadisk=yadisk)) self.import_fields(public_resource) class AsyncPublicResourceObject(PublicResourceObject, AsyncResourceObjectMethodsMixin): """ Public resource object. :param resource: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`AsyncPublicResourceObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar view_count: `int`, number of times the public resource was viewed :ivar owner: :any:`UserPublicInfoObject`, owner of the public resource """ embedded: Optional["AsyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, public_resource: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(AsyncPublicResourceListObject, yadisk=yadisk)) self.import_fields(public_resource) class PublicResourceListObject(ResourceListObject): """ List of public resources. :param public_resource_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`ResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list :ivar public_key: `str`, public key of the resource """ public_key: Optional[str] items: Optional[List[PublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceListObject.__init__(self, None, yadisk) self.set_field_type("public_key", str_or_error) self.set_field_type("items", typed_list(partial(PublicResourceObject, yadisk=yadisk))) self.import_fields(public_resource_list) class SyncPublicResourceListObject(PublicResourceListObject): """ List of public resources. :param public_resource_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`SyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list :ivar public_key: `str`, public key of the resource """ items: Optional[List[SyncPublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncPublicResourceObject, yadisk=yadisk))) self.import_fields(public_resource_list) class AsyncPublicResourceListObject(PublicResourceListObject): """ List of public resources. :param public_resource_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`AsyncResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list :ivar public_key: `str`, public key of the resource """ items: Optional[List[AsyncPublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): PublicResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncPublicResourceObject, yadisk=yadisk))) self.import_fields(public_resource_list) class TrashResourceObject(ResourceObject): """ Trash resource object. :param trash_resource: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`TrashResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar origin_path: `str`, original path :ivar deleted: :any:`datetime.datetime`, date of deletion :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ embedded: Optional["TrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["TrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] origin_path: Optional[str] deleted: Optional["datetime.datetime"] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(TrashResourceListObject, yadisk=yadisk)) self.set_field_type("origin_path", str_or_error) self.set_field_type("deleted", yandex_date) self.import_fields(trash_resource) class SyncTrashResourceObject(TrashResourceObject): """ Trash resource object. :param trash_resource: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`SyncTrashResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar origin_path: `str`, original path :ivar deleted: :any:`datetime.datetime`, date of deletion :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ embedded: Optional["SyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None): TrashResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(SyncTrashResourceListObject, yadisk=yadisk)) self.import_fields(trash_resource) def get_meta(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "SyncTrashResourceObject": """ Get meta information about a trash resource. :param relative_path: `str` or `None`, relative path to the trash resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`SyncTrashResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_trash_meta(str(path), **kwargs) def exists(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether the trash resource exists. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.trash_exists(str(path), **kwargs) def get_type(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get trash resource type. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.get_trash_type(str(path), **kwargs) def is_dir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a trash directory. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.is_trash_dir(str(path), **kwargs) def is_file(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a trash file. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.is_trash_file(str(path), **kwargs) def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> Generator["SyncTrashResourceObject", None, None]: """ Get contents of a trash resource. :param relative_path: `str` or `None`, relative path to the directory in the trash bin :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`SyncTrashResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.trash_listdir(str(path), **kwargs) def remove(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> Optional["SyncOperationLinkObject"]: """ Remove a trash resource. :param relative_path: `str` or `None`, relative path to the trash resource to be deleted :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.remove_trash(str(path), **kwargs) @overload def restore(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: pass @overload def restore(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: pass def restore(self: ResourceProtocol, /, *args, **kwargs) -> Union[SyncResourceLinkObject, "SyncOperationLinkObject"]: """ Restore a trash resource. Returns a link to the newly created resource or a link to the asynchronous operation. This method takes 1 or 2 positional arguments: 1. :code:`restore(dst_path, /, **kwargs)` 2. :code:`restore(relative_path=None, dst_path, /, **kwargs)` :param relative_path: `str` or `None`, relative path to the trash resource to be restored :param dst_path: destination path :param overwrite: `bool`, determines whether the destination can be overwritten :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param requests_args: `dict`, additional parameters for :any:`RequestsSession` :param httpx_args: `dict`, additional parameters for :any:`HTTPXSession` :param curl_options: `dict`, additional options for :any:`PycURLSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`SyncResourceLinkObject` or :any:`SyncOperationLinkObject` """ if len(args) == 0: relative_path = dst_path = None elif len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("restore() takes up to 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return self._yadisk.restore_trash(str(path), dst_path, **kwargs) class AsyncTrashResourceObject(TrashResourceObject): """ Trash resource object. :param trash_resource: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar antivirus_status: `str`, antivirus check status :ivar file: `str`, download URL :ivar size: `int`, file size :ivar public_key: `str`, public resource key :ivar sha256: `str`, SHA256 hash :ivar md5: `str`, MD5 hash :ivar embedded: :any:`AsyncTrashResourceListObject`, list of nested resources :ivar name: `str`, filename :ivar exif: :any:`EXIFObject`, EXIF metadata :ivar resource_id: `str`, resource ID :ivar custom_properties: `dict`, custom resource properties :ivar public_url: `str`, public URL :ivar share: :any:`ShareInfoObject`, shared folder information :ivar modified: :any:`datetime.datetime`, date of last modification :ivar created: :any:`datetime.datetime`, date of creation :ivar photoslice_time: :any:`datetime.datetime`, photo/video creation date :ivar mime_type: `str`, MIME type :ivar path: `str`, path to the resource :ivar preview: `str`, file preview URL :ivar comment_ids: :any:`CommentIDsObject`, comment IDs :ivar type: `str`, type ("file" or "dir") :ivar media_type: `str`, file type as determined by Yandex.Disk :ivar revision: `int`, Yandex.Disk revision at the time of last modification :ivar origin_path: `str`, original path :ivar deleted: :any:`datetime.datetime`, date of deletion :ivar sizes: `dict[str, str]`, mapping of all preview sizes, where keys are names and values are download links """ embedded: Optional["AsyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None): TrashResourceObject.__init__(self, None, yadisk) self.set_field_type("embedded", partial(AsyncTrashResourceListObject, yadisk=yadisk)) self.import_fields(trash_resource) async def get_meta(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> "AsyncTrashResourceObject": """ Get meta information about a trash resource. :param relative_path: `str` or `None`, relative path to the trash resource :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param sort: `str`, field to be used as a key to sort children resources :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: :any:`AsyncTrashResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("ResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_trash_meta(str(path), **kwargs) async def exists(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether the trash resource exists. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `bool` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.trash_exists(str(path), **kwargs) async def get_type(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> str: """ Get trash resource type. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :returns: "file" or "dir" """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.get_trash_type(str(path), **kwargs) async def is_dir(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a trash directory. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a directory, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.is_trash_dir(str(path), **kwargs) async def is_file(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> bool: """ Check whether resource is a trash file. :param relative_path: `str` or `None`, relative path to the trash resource :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises ForbiddenError: application doesn't have enough rights for this request :returns: `True` if `path` is a file, `False` otherwise (even if it doesn't exist) """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.is_trash_file(str(path), **kwargs) async def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs ) -> AsyncGenerator["AsyncTrashResourceObject", None]: """ Get contents of a trash resource. :param relative_path: `str` or `None`, relative path to the directory in the trash bin :param max_items: `int` or `None`, maximum number of returned items (`None` means unlimited) :param limit: number of children resources to be included in the response :param offset: number of children resources to be skipped in the response :param preview_size: size of the file preview :param preview_crop: `bool`, cut the preview to the size specified in the `preview_size` :param fields: list of keys to be included in the response :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises WrongResourceTypeError: resource is not a directory :returns: generator of :any:`AsyncTrashResourceObject` """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") async for i in self._yadisk.trash_listdir(str(path), **kwargs): yield i async def remove(self: ResourceProtocol, relative_path: Optional[str] = None, /, **kwargs) -> Optional["AsyncOperationLinkObject"]: """ Remove a trash resource. :param relative_path: `str` or `None`, relative path to the trash resource to be deleted :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncOperationLinkObject` if the operation is performed asynchronously, `None` otherwise """ if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.remove_trash(str(path), **kwargs) @overload async def restore(self: ResourceProtocol, dst_path: str, /, **kwargs) -> Union[AsyncResourceLinkObject, "AsyncOperationLinkObject"]: pass @overload async def restore(self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, **kwargs) -> Union[AsyncResourceLinkObject, "AsyncOperationLinkObject"]: pass async def restore( self: ResourceProtocol, /, *args, **kwargs ) -> Union[AsyncResourceLinkObject, "AsyncOperationLinkObject"]: """ Restore a trash resource. Returns a link to the newly created resource or a link to the asynchronous operation. This method takes 1 or 2 positional arguments: 1. :code:`restore(dst_path, /, **kwargs)` 2. :code:`restore(relative_path=None, dst_path, /, **kwargs)` :param relative_path: `str` or `None`, relative path to the trash resource to be restored :param dst_path: destination path :param overwrite: `bool`, determines whether the destination can be overwritten :param force_async: forces the operation to be executed asynchronously :param fields: list of keys to be included in the response :param wait: `bool`, if :code:`True`, the method will wait until the asynchronous operation is completed :param poll_interval: `float`, interval in seconds between subsequent operation status queries :param poll_timeout: `float` or `None`, total polling timeout (`None` means no timeout), if this timeout is exceeded, an exception is raised :param timeout: `float` or `tuple`, request timeout :param headers: `dict` or `None`, additional request headers :param n_retries: `int`, maximum number of retries :param retry_interval: delay between retries in seconds :param retry_on: `tuple`, additional exception classes to retry on :param aiohttp_args: `dict`, additional parameters for :any:`AIOHTTPSession` :param httpx_args: `dict`, additional parameters for :any:`AsyncHTTPXSession` :param kwargs: any other parameters, accepted by :any:`Session.send_request()` :raises PathNotFoundError: resource was not found on Disk :raises PathExistsError: destination path already exists :raises ForbiddenError: application doesn't have enough rights for this request :raises ResourceIsLockedError: resource is locked by another request :raises OperationNotFoundError: requested operation was not found :raises AsyncOperationFailedError: requested operation failed :raises AsyncOperationPollingTimeoutError: requested operation did not complete in specified time (when `poll_timeout` is not `None`) :returns: :any:`AsyncResourceLinkObject` or :any:`AsyncOperationLinkObject` """ if len(args) == 0: relative_path = dst_path = None elif len(args) == 1: relative_path, dst_path = None, args[0] elif len(args) == 2: relative_path, dst_path = args else: raise TypeError("restore() takes up to 2 positional arguments") if self._yadisk is None: raise ValueError("This object is not bound to a YaDisk instance") if self.path is None: raise ValueError("TrashResourceObject doesn't have a path") path = PurePosixPath(self.path) / (relative_path or "") return await self._yadisk.restore_trash(str(path), dst_path, **kwargs) class TrashResourceListObject(ResourceListObject): """ List of trash resources. :param trash_resource_list: `dict` or `None` :param yadisk: :any:`Client`/:any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`TrashResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ items: Optional[List[TrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): ResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(TrashResourceObject, yadisk=yadisk))) self.import_fields(trash_resource_list) class SyncTrashResourceListObject(TrashResourceListObject): """ List of trash resources. :param trash_resource_list: `dict` or `None` :param yadisk: :any:`Client` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`SyncTrashResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ items: Optional[List[SyncTrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): TrashResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(SyncTrashResourceObject, yadisk=yadisk))) self.import_fields(trash_resource_list) class AsyncTrashResourceListObject(TrashResourceListObject): """ List of trash resources. :param trash_resource_list: `dict` or `None` :param yadisk: :any:`AsyncClient` or `None`, `YaDisk` object :ivar sort: `str`, sort type :ivar items: `list`, list of resources (:any:`AsyncTrashResourceObject`) :ivar limit: `int`, maximum number of elements in the list :ivar offset: `int`, offset from the beginning of the list :ivar path: `str`, path to the directory that contains the elements of the list :ivar total: `int`, number of elements in the list """ items: Optional[List[AsyncTrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None): TrashResourceListObject.__init__(self, None, yadisk) self.set_field_type("items", typed_list(partial(AsyncTrashResourceObject, yadisk=yadisk))) self.import_fields(trash_resource_list) class PublicSettingsObject(YaDiskObject): """ Public settings of a shared resource. :ivar available_until: `int`, timestamp indicating the expiration date of the link :ivar read_only: `bool`, whether the resource is read-only :ivar available_until_verbose: :any:`AvailableUntilVerboseObject`, verbose information about the expiration date :ivar password: `str`, password to access the resource :ivar password_verbose: :any:`PasswordVerboseObject`, verbose information about the password :ivar external_organization_id: `str`, external organization ID :ivar external_organization_id_verbose: :any:`ExternalOrganizationIdVerboseObject`, verbose information about the external organization ID :ivar accesses: `List[PublicSettingsAccessObject]`, list of access settings """ available_until: Optional[int] read_only: Optional[bool] available_until_verbose: Optional["AvailableUntilVerboseObject"] password: Optional[str] password_verbose: Optional["PasswordVerboseObject"] external_organization_id: Optional[str] external_organization_id_verbose: Optional["ExternalOrganizationIdVerboseObject"] accesses: Optional[List["PublicAccessObject"]] def __init__( self, public_settings: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "available_until": int_or_error, "read_only": bool_or_error, "available_until_verbose": AvailableUntilVerboseObject, "password": str_or_error, "password_verbose": PasswordVerboseObject, "external_organization_id": str_or_error, "external_organization_id_verbose": ExternalOrganizationIdVerboseObject, "accesses": typed_list(PublicAccessObject) }, yadisk ) self.import_fields(public_settings) class AvailableUntilVerboseObject(YaDiskObject): """ Verbose information about the expiration date of a shared resource. :ivar enabled: `bool`, whether the expiration date is enabled :ivar value: `int`, timestamp of the expiration date """ enabled: Optional[bool] value: Optional[int] def __init__( self, available_until_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "enabled": bool_or_error, "value": int_or_error }, yadisk ) self.import_fields(available_until_verbose) class PasswordVerboseObject(YaDiskObject): """ Verbose information about the password of shared resource. :ivar enabled: `bool`, whether the password is enabled :ivar value: `str`, password value """ enabled: Optional[bool] value: Optional[str] def __init__( self, password_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "enabled": bool_or_error, "value": str_or_error }, yadisk ) self.import_fields(password_verbose) class ExternalOrganizationIdVerboseObject(YaDiskObject): """ Verbose information about the external organization ID of a shared resource. :ivar enabled: `bool`, whether the external organization ID is enabled :ivar value: `str`, external organization ID """ enabled: Optional[bool] value: Optional[str] def __init__( self, external_organization_id_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "enabled": bool_or_error, "value": str_or_error }, yadisk ) self.import_fields(external_organization_id_verbose) class PublicAccessObject(YaDiskObject): """ Access settings of a shared resource. :ivar macros: `List[Union[Literal["employees"], Literal["all"]]],`, specifies who has access to the shared resource, must contain only one element :ivar type: `str`, specifies the type of access, must be one of the following: - `macro`: access for all employees or all users - `user`: access for a specific user - `group`: access for a specific group - `department`: access for a specific department :ivar org_id: `int`, organization ID :ivar id: `str`, user, group or department ID :ivar rights: `List[str]`, specifies the access rights Valid access rights: - `write`: write access - `read`: read access - `read_without_download`: read access without download - `read_with_password`: read access with password - `read_with_password_without_download`: read access with password and without download """ macros: Optional[List[Union[Literal["all", "employees"], str]]] type: Optional[Union[Literal["macro", "user", "group", "department"], str]] org_id: Optional[int] id: Optional[str] rights: Optional[List[ Union[ Literal[ "read", "write", "read_without_download", "read_with_password", "read_with_password_without_download" ], str ] ]] def __init__( self, public_access: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "macros": typed_list(str_or_error), "type": str_or_error, "org_id": int_or_error, "id": str_or_error, "group_ids": typed_list(int_or_error), "department_ids": typed_list(int_or_error), "rights": typed_list(str_or_error) }, yadisk ) self.import_fields(public_access) class PublicAvailableSettingsObject(YaDiskObject): """ Public settings of a shared resource for the current OAuth token owner. :ivar permissions: `List[str]`, list of available permissions :ivar address_access_sharing: `str`, specifies who has access to the shared resource, must be one of the following: - `all`: access for all users - `inner`: access for all employees :ivar use_sharing: `bool`, whether the resource can be shared :ivar macro_sharing: `str`, specifies who has access to the shared resource, must be one of the following: - `all`: access for all users - `inner`: access for all employees :ivar default: `List[PublicDefault]`, default public settings """ permissions: Optional[List[str]] address_access_sharing: Optional[Union[Literal["all", "inner"], str]] use_sharing: Optional[bool] macro_sharing: Optional[Union[Literal["all", "inner"], str]] default: Optional[List["PublicDefaultObject"]] def __init__( self, public_available_settings: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "permissions": typed_list(str_or_error), "address_access_sharing": str_or_error, "use_sharing": bool_or_error, "macro_sharing": str_or_error, "default": typed_list(PublicDefaultObject) }, yadisk ) self.import_fields(public_available_settings) class PublicDefaultObject(YaDiskObject): """ Access settings of a shared resource. :ivar macros: `List[Union[Literal["employees"], Literal["all"]]],`, specifies who has access to the shared resource, must contain only one element :ivar org_id: `int`, organization ID :ivar rights: `List[str]`, specifies the access rights Valid access rights: - `write`: write access - `read`: read access - `read_without_download`: read access without download - `read_with_password`: read access with password - `read_with_password_without_download`: read access with password and without download """ macros: Optional[List[str]] org_id: Optional[int] rights: Optional[List[str]] def __init__( self, public_default: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: YaDiskObject.__init__( self, { "macros": typed_list(str_or_error), "org_id": int_or_error, "rights": typed_list(str_or_error) }, yadisk ) self.import_fields(public_default) ================================================ FILE: src/yadisk/objects/_resources.pyi ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ._yadisk_object import YaDiskObject from ._link_object import LinkObject from ._disk import UserPublicInfoObject from typing import Any, Literal, overload, Union, Protocol, Optional from .._typing_compat import ( Generator, Dict, List, AsyncGenerator, Iterable, Tuple, Type ) from ..types import ( AsyncFileOrPath, AsyncFileOrPathDestination, FileOrPath, FileOrPathDestination, Headers, TimeoutParameter, PublicSettings ) import datetime from ._operations import ( OperationLinkObject, AsyncOperationLinkObject, SyncOperationLinkObject ) __all__ = [ "AsyncFilesResourceListObject", "AsyncLastUploadedResourceListObject", "AsyncPublicResourceLinkObject", "AsyncPublicResourceListObject", "AsyncPublicResourceObject", "AsyncPublicResourcesListObject", "AsyncResourceLinkObject", "AsyncResourceListObject", "AsyncResourceObject", "AsyncTrashResourceListObject", "AsyncTrashResourceObject", "AvailableUntilVerboseObject", "CommentIDsObject", "EXIFObject", "ExternalOrganizationIdVerboseObject", "FilesResourceListObject", "LastUploadedResourceListObject", "PasswordVerboseObject", "PublicAccessObject", "PublicAvailableSettingsObject", "PublicDefaultObject", "PublicResourceLinkObject", "PublicResourceListObject", "PublicResourceObject", "PublicResourcesListObject", "PublicSettingsObject", "ResourceDownloadLinkObject", "ResourceLinkObject", "ResourceListObject", "ResourceObject", "ResourceUploadLinkObject", "ShareInfoObject", "SyncFilesResourceListObject", "SyncLastUploadedResourceListObject", "SyncPublicResourceLinkObject", "SyncPublicResourceListObject", "SyncPublicResourceObject", "SyncPublicResourcesListObject", "SyncResourceLinkObject", "SyncResourceListObject", "SyncResourceObject", "SyncTrashResourceListObject", "SyncTrashResourceObject", "TrashResourceListObject", "TrashResourceObject", ] class CommentIDsObject(YaDiskObject): private_resource: Optional[str] public_resource: Optional[str] def __init__(self, comment_ids: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class EXIFObject(YaDiskObject): date_time: Optional[datetime.datetime] gps_longitude: Optional[float] gps_latitude: Optional[float] def __init__( self, exif: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class FilesResourceListObject(YaDiskObject): items: Optional[List["ResourceObject"]] limit: Optional[int] offset: Optional[int] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncFilesResourceListObject(FilesResourceListObject): items: Optional[List["SyncResourceObject"]] # type: ignore[assignment] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncFilesResourceListObject(FilesResourceListObject): items: Optional[List["AsyncResourceObject"]] # type: ignore[assignment] def __init__(self, files_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class LastUploadedResourceListObject(YaDiskObject): items: Optional[List["ResourceObject"]] limit: Optional[int] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncLastUploadedResourceListObject(LastUploadedResourceListObject): items: Optional[List["SyncResourceObject"]] # type: ignore[assignment] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncLastUploadedResourceListObject(LastUploadedResourceListObject): items: Optional[List["AsyncResourceObject"]] # type: ignore[assignment] def __init__(self, last_uploaded_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class PublicResourcesListObject(YaDiskObject): items: Optional[List["PublicResourceObject"]] type: Optional[str] limit: Optional[int] offset: Optional[int] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncPublicResourcesListObject(PublicResourcesListObject): items: Optional[List["SyncPublicResourceObject"]] # type: ignore[assignment] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncPublicResourcesListObject(PublicResourcesListObject): items: Optional[List["AsyncPublicResourceObject"]] # type: ignore[assignment] def __init__(self, public_resources_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class ResourceProtocol(Protocol): @property def type(self) -> Optional[str]: ... @property def path(self) -> Optional[str]: ... @property def public_key(self) -> Optional[str]: ... @property def public_url(self) -> Optional[str]: ... @property def file(self) -> Optional[str]: ... @property def _yadisk(self) -> Optional[Any]: ... class ResourceObjectMethodsMixin: def get_meta( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceObject": ... def get_public_meta( self: ResourceProtocol, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncPublicResourceObject": ... def exists( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def get_type( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def is_dir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def is_file( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncResourceObject, None, None]: ... def public_listdir( self: ResourceProtocol, *, path: Optional[str] = None, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncPublicResourceObject, None, None]: ... def get_upload_link( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs) -> str: ... def get_upload_link_object( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, overwrite: bool = False, fields: Optional[Iterable[str]] = None, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> ResourceUploadLinkObject: ... def upload( self: ResourceProtocol, path_or_file: FileOrPath, relative_path: Optional[str] = None, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceLinkObject": ... def upload_url( self: ResourceProtocol, url: str, relative_path: Optional[str] = None, /, *, disable_redirects: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "OperationLinkObject": ... def get_download_link( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... @overload def download( self: ResourceProtocol, dst_path_or_file: FileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceLinkObject": ... @overload def download( self: ResourceProtocol, relative_path: Optional[str], dst_path_or_file: FileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceLinkObject": ... @overload def patch( self: ResourceProtocol, properties: Dict, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceObject": ... @overload def patch( self: ResourceProtocol, relative_path: Union[str, None], properties: Dict, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceObject": ... def publish( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, allow_address_access: bool = False, public_settings: Optional[PublicSettings] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceLinkObject": ... def unpublish( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncResourceLinkObject": ... def get_public_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, allow_address_access: bool = False, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... def get_public_available_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... @overload def update_public_settings( self: ResourceProtocol, relative_path: Optional[str], public_settings: PublicSettings, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... @overload def update_public_settings( self: ResourceProtocol, public_settings: PublicSettings, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... def mkdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... def makedirs( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncResourceLinkObject: ... @overload def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Optional[SyncOperationLinkObject]: ... @overload def move( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def move( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def move( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def move( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def rename( self: ResourceProtocol, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def rename( self: ResourceProtocol, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def rename( self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def rename( self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def copy( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def copy( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def copy( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def copy( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... class AsyncResourceObjectMethodsMixin: async def get_meta( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceObject": ... async def get_public_meta( self: ResourceProtocol, *, path: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncPublicResourceObject": ... async def exists( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def get_type( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def is_dir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def is_file( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncResourceObject() async def public_listdir( self: ResourceProtocol, *, path: Optional[str] = None, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncPublicResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncPublicResourceObject() async def get_upload_link( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def get_upload_link_object( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, overwrite: bool = False, fields: Optional[Iterable[str]] = None, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> ResourceUploadLinkObject: ... async def upload( self: ResourceProtocol, path_or_file: AsyncFileOrPath, relative_path: Optional[str] = None, /, *, overwrite: bool = False, spoof_user_agent: bool = True, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... async def upload_url( self: ResourceProtocol, url: str, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, disable_redirects: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncOperationLinkObject": ... async def get_download_link( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... @overload async def download( self: ResourceProtocol, dst_path_or_file: AsyncFileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... @overload async def download( self: ResourceProtocol, relative_path: Optional[str], dst_path_or_file: AsyncFileOrPathDestination, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... @overload async def patch( self: ResourceProtocol, properties: Dict, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceObject": ... @overload async def patch( self: ResourceProtocol, relative_path: Union[str, None], properties: dict, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceObject": ... async def publish( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, allow_address_access: bool = False, public_settings: Optional[PublicSettings] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... async def unpublish( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... async def get_public_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, allow_address_access: bool = False, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... async def get_public_available_settings( self: ResourceProtocol, relative_path: Optional[str] = None, /, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... @overload async def update_public_settings( self: ResourceProtocol, relative_path: Optional[str], public_settings: PublicSettings, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... @overload async def update_public_settings( self: ResourceProtocol, public_settings: PublicSettings, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "PublicSettingsObject": ... async def mkdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... async def makedirs( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncResourceLinkObject": ... @overload async def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Optional[AsyncOperationLinkObject]: ... @overload async def move( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def move( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def move( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def move( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def rename( self: ResourceProtocol, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def rename( self: ResourceProtocol, new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def rename( self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def rename( self: ResourceProtocol, relative_path: Optional[str], new_name: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def copy( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def copy( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def copy( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def copy( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... class ResourceObject(YaDiskObject): antivirus_status: Optional[str] file: Optional[str] size: Optional[int] public_key: Optional[str] sha256: Optional[str] embedded: Optional["ResourceListObject"] _embedded: Optional["ResourceListObject"] name: Optional[str] exif: Optional[EXIFObject] resource_id: Optional[str] custom_properties: Optional[Dict] public_url: Optional[str] share: Optional["ShareInfoObject"] modified: Optional["datetime.datetime"] created: Optional["datetime.datetime"] photoslice_time: Optional["datetime.datetime"] mime_type: Optional[str] path: Optional[str] preview: Optional[str] comment_ids: Optional[CommentIDsObject] type: Optional[str] media_type: Optional[str] md5: Optional[str] revision: Optional[int] sizes: Optional[Dict[str, str]] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncResourceObject(ResourceObject, ResourceObjectMethodsMixin): embedded: Optional["SyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncResourceObject(ResourceObject, AsyncResourceObjectMethodsMixin): embedded: Optional["AsyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class ResourceLinkObject(LinkObject): type: Optional[str] public_key: Optional[str] public_url: Optional[str] file: Optional[str] path: Optional[str] def __init__(self, link: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... @classmethod def from_path(cls, path: Optional[str], yadisk: Optional[Any] = None): ... class SyncResourceLinkObject(ResourceLinkObject, ResourceObjectMethodsMixin): ... class AsyncResourceLinkObject(ResourceLinkObject, AsyncResourceObjectMethodsMixin): ... class PublicResourceLinkObject(LinkObject): type: Optional[str] file: Optional[str] path: Optional[str] public_key: Optional[str] public_url: Optional[str] def __init__(self, link: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... @classmethod def from_public_key(cls, public_key: Optional[str], yadisk: Optional[Any] = None): ... class SyncPublicResourceLinkObject(PublicResourceLinkObject, ResourceObjectMethodsMixin): ... class AsyncPublicResourceLinkObject(PublicResourceLinkObject, AsyncResourceObjectMethodsMixin): ... class ResourceListObject(YaDiskObject): sort: Optional[str] items: Optional[List[ResourceObject]] limit: Optional[int] offset: Optional[int] path: Optional[str] total: Optional[int] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncResourceListObject(ResourceListObject): items: Optional[List[SyncResourceObject]] # type: ignore[assignment] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncResourceListObject(ResourceListObject): items: Optional[List[AsyncResourceObject]] # type: ignore[assignment] def __init__(self, resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class ResourceUploadLinkObject(LinkObject): operation_id: Optional[str] def __init__(self, resource_upload_link: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class ResourceDownloadLinkObject(LinkObject): ... class ShareInfoObject(YaDiskObject): is_root: Optional[bool] is_owned: Optional[bool] rights: Optional[str] def __init__(self, share_info: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class PublicResourceObject(ResourceObject): views_count: Optional[int] view_count: Optional[int] embedded: Optional["PublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["PublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] owner: Optional[UserPublicInfoObject] def __init__(self, public_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncPublicResourceObject(PublicResourceObject, ResourceObjectMethodsMixin): embedded: Optional["SyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, public_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncPublicResourceObject(PublicResourceObject, AsyncResourceObjectMethodsMixin): embedded: Optional["AsyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncPublicResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, public_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class PublicResourceListObject(ResourceListObject): public_key: Optional[str] items: Optional[List[PublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncPublicResourceListObject(PublicResourceListObject): items: Optional[List[SyncPublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncPublicResourceListObject(PublicResourceListObject): items: Optional[List[AsyncPublicResourceObject]] # type: ignore[assignment] def __init__(self, public_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class TrashResourceObject(ResourceObject): embedded: Optional["TrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["TrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] origin_path: Optional[str] deleted: Optional["datetime.datetime"] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncTrashResourceObject(TrashResourceObject): embedded: Optional["SyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["SyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... def get_meta( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> "SyncTrashResourceObject": ... def exists( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def get_type( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> str: ... def is_dir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def is_file( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> bool: ... def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Generator[SyncTrashResourceObject, None, None]: ... @overload def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Optional[SyncOperationLinkObject]: ... @overload def restore( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def restore( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... @overload def restore( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> SyncOperationLinkObject: ... @overload def restore( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), requests_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Union[SyncResourceLinkObject, SyncOperationLinkObject]: ... class AsyncTrashResourceObject(TrashResourceObject): embedded: Optional["AsyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] _embedded: Optional["AsyncTrashResourceListObject"] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, trash_resource: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... async def get_meta( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> "AsyncTrashResourceObject": ... async def exists( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def get_type( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> str: ... async def is_dir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def is_file( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> bool: ... async def listdir( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, max_items: Optional[int] = None, limit: Optional[int] = None, offset: Optional[int] = None, preview_size: Optional[str] = None, preview_crop: Optional[bool] = None, sort: Optional[str] = None, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncGenerator[AsyncTrashResourceObject, None]: # This line here is needed so that the type checker knows that this is # an async generator, rather than a simple async function yield AsyncTrashResourceObject() @overload async def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def remove( self: ResourceProtocol, relative_path: Optional[str] = None, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Optional[AsyncOperationLinkObject]: ... @overload async def restore( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def restore( self: ResourceProtocol, dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... @overload async def restore( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: Literal[True], fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> AsyncOperationLinkObject: ... @overload async def restore( self: ResourceProtocol, relative_path: Optional[str], dst_path: str, /, *, wait: bool = True, poll_interval: float = 1.0, poll_timeout: Optional[float] = None, overwrite: bool = False, force_async: bool = False, fields: Optional[Iterable[str]] = None, headers: Optional[Headers] = None, timeout: TimeoutParameter = ..., n_retries: Optional[int] = None, retry_interval: Optional[float] = None, retry_on: Tuple[Type[Exception], ...] = tuple(), aiohttp_args: Optional[Dict[str, Any]] = None, httpx_args: Optional[Dict[str, Any]] = None, **kwargs ) -> Union[AsyncResourceLinkObject, AsyncOperationLinkObject]: ... class TrashResourceListObject(ResourceListObject): items: Optional[List[TrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class SyncTrashResourceListObject(TrashResourceListObject): items: Optional[List[SyncTrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class AsyncTrashResourceListObject(TrashResourceListObject): items: Optional[List[AsyncTrashResourceObject]] # type: ignore[assignment] def __init__(self, trash_resource_list: Optional[Dict] = None, yadisk: Optional[Any] = None) -> None: ... class PublicSettingsObject(YaDiskObject): available_until: Optional[int] read_only: Optional[bool] available_until_verbose: Optional["AvailableUntilVerboseObject"] password: Optional[str] password_verbose: Optional["PasswordVerboseObject"] external_organization_id: Optional[str] external_organization_id_verbose: Optional["ExternalOrganizationIdVerboseObject"] accesses: Optional[List["PublicAccessObject"]] def __init__( self, public_settings: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class AvailableUntilVerboseObject(YaDiskObject): enabled: Optional[bool] value: Optional[int] def __init__( self, available_until_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class PasswordVerboseObject(YaDiskObject): enabled: Optional[bool] value: Optional[str] def __init__( self, password_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class ExternalOrganizationIdVerboseObject(YaDiskObject): enabled: Optional[bool] value: Optional[str] def __init__( self, external_organization_id_verbose: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class PublicAccessObject(YaDiskObject): macros: Optional[List[Union[Literal["all", "employees"], str]]] type: Optional[Union[Literal["macro", "user", "group", "department"], str]] org_id: Optional[int] id: Optional[str] rights: Optional[List[ Union[ Literal[ "read", "write", "read_without_download", "read_with_password", "read_with_password_without_download" ], str ] ]] def __init__( self, public_access: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class PublicAvailableSettingsObject(YaDiskObject): permissions: Optional[List[str]] address_access_sharing: Optional[Union[Literal["all", "inner"], str]] use_sharing: Optional[bool] macro_sharing: Optional[Union[Literal["all", "inner"], str]] default: Optional[List["PublicDefaultObject"]] def __init__( self, public_available_settings: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... class PublicDefaultObject(YaDiskObject): macros: Optional[List[str]] org_id: Optional[int] rights: Optional[List[str]] def __init__( self, public_default: Optional[Dict] = None, yadisk: Optional[Any] = None ) -> None: ... ================================================ FILE: src/yadisk/objects/_yadisk_object.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Any, Optional from .._typing_compat import Callable, Iterator, Generator __all__ = ["YaDiskObject"] class YaDiskObject: """ Base class for all objects mirroring the ones returned by Yandex.Disk REST API. It must have a fixed number of fields, each field must have a type. It also supports subscripting and access of fields through the . operator. :param field_types: `dict` or `None` :param yadisk: :any:`YaDisk` or `None`, `YaDisk` object """ FIELD_TYPES: dict FIELDS: dict ALIASES: dict _yadisk: Optional[Any] def __init__(self, field_types: Optional[dict] = None, yadisk: Optional[Any] = None): if field_types is None: field_types = {} self.FIELD_TYPES = {} self.FIELDS = {} self.ALIASES = {} self.set_field_types(field_types) self._yadisk = yadisk def __dir__(self) -> Generator[str, None, None]: """ Return available attributes. """ yield from super().__dir__() yield from self.FIELD_TYPES.keys() yield from self.ALIASES.keys() def set_field_types(self, field_types: dict) -> None: """ Set the field types of the object :param field_types: `dict`, where keys are the field names and values are types (or factories) """ self.FIELD_TYPES = field_types def set_field_type(self, field: str, type: Callable) -> None: """ Set field type. :param field: `str` :param type: type or factory """ self.FIELD_TYPES[field] = type def set_alias(self, alias: str, name: str) -> None: """ Set an alias. :param alias: `str`, alias to add :param name: `str`, field name """ self.ALIASES[alias] = name def remove_alias(self, alias: str) -> None: """ Remove an alias. :param alias: `str` """ self.ALIASES.pop(alias) def remove_field(self, field: str) -> None: """ Remove field. :param field: `str` """ self.FIELDS.pop(field, None) self.FIELD_TYPES.pop(field) def import_fields(self, source_dict: Optional[dict]) -> None: """ Set all the fields of the object to the values in `source_dict`. All the other fields are ignored :param source_dict: `dict` or `None` (nothing will be done in that case) """ if source_dict is not None: for field in self.FIELD_TYPES: try: self[field] = source_dict[field] except KeyError: pass for alias, field in self.ALIASES.items(): try: self[field] = source_dict[alias] except KeyError: pass def __setattr__(self, attr: str, value: Any) -> None: if attr in ("FIELDS", "FIELD_TYPES", "ALIASES", "_yadisk"): self.__dict__[attr] = value return attr = self.ALIASES.get(attr, attr) if attr not in self.FIELD_TYPES: raise AttributeError("Unknown attribute: %r" % (attr,)) datatype = self.FIELD_TYPES[attr] self.FIELDS[attr] = datatype(value) if value is not None else None def __getattr__(self, attr: str) -> Any: attr = self.ALIASES.get(attr, attr) if attr not in self.FIELD_TYPES: raise AttributeError("Unknown attribute: %r" % (attr,)) return self.FIELDS.get(attr) def __getitem__(self, key: str) -> Any: key = self.ALIASES.get(key, key) if key not in self.FIELD_TYPES: raise KeyError(str(key)) return self.FIELDS.get(key) def __setitem__(self, key: str, value: Any) -> None: self.__setattr__(key, value) def __delitem__(self, key: str) -> None: key = self.ALIASES.get(key, key) if key not in self.FIELD_TYPES: raise KeyError(str(key)) self.FIELDS.pop(key, None) def __iter__(self) -> Iterator[dict]: return iter(self.FIELDS) def __len__(self) -> int: return len(self.FIELDS) def __repr__(self) -> str: return "<%s%r>" % (self.__class__.__name__, self.FIELDS) def _repr_pretty_(self, p, cycle: bool) -> None: """IPython pretty-print implementation.""" if cycle: p.text(f"<{self.__class__.__name__}{'{...}'}>") else: if not self.FIELDS: p.text(f"<{self.__class__.__name__}{'{}'}>") return with p.group(4, f"<{self.__class__.__name__}{'{'}", "})>"): p.breakable() for idx, (k, v) in enumerate(self.FIELDS.items()): if idx: p.text(",") p.breakable() p.text(repr(k)) p.text(": ") p.pretty(v) def field(self, name: str) -> Any: """ Get value of field `name`, guarantee it's not :code:`None` or raise a :any:`ValueError`. :param name: `str`, name of the field :raises ValueError: value of the given field is :code:`None` :returns: field's value """ value = self.__getattr__(name) if value is not None: return value raise ValueError(f"field {repr(name)} is None") def __matmul__(self, name: str) -> Any: """ The :code:`@` operator. Same as :any:`YaDiskObject.field()`. Can be used like this: .. code:: python # if embedded or embedded.total turn out to be None, we'll get a ValueError file_count = client.get_meta("/some_folder") @ "embedded" @ "total" print(f"/some_folder contains {file_count} files") :param name: `str`, name of the field :raises ValueError: value of the given field is :code:`None` :returns: field's value """ return self.field(name) ================================================ FILE: src/yadisk/py.typed ================================================ ================================================ FILE: src/yadisk/sessions/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . ================================================ FILE: src/yadisk/sessions/_httpx_common.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Any, Optional, Union from ..exceptions import ( RequestError, TooManyRedirectsError, RequestTimeoutError, YaDiskConnectionError ) from ..types import TimeoutParameter from .._typing_compat import Dict, Tuple from .. import settings import httpx __all__ = ["convert_args_for_httpx", "convert_httpx_exception", "convert_timeout"] def convert_httpx_exception(exc: httpx.HTTPError) -> Union[RequestError, httpx.HTTPError]: if isinstance(exc, httpx.TooManyRedirects): return TooManyRedirectsError(str(exc)) elif isinstance(exc, httpx.TimeoutException): return RequestTimeoutError(str(exc)) elif isinstance(exc, httpx.ConnectError): return YaDiskConnectionError(str(exc)) elif isinstance(exc, httpx.HTTPError): return RequestError(str(exc)) else: return exc def convert_timeout(timeout: TimeoutParameter) -> Optional[httpx.Timeout]: if timeout is ...: return convert_timeout(settings.DEFAULT_TIMEOUT) elif timeout is None: return None elif isinstance(timeout, (int, float)): return httpx.Timeout(timeout) connect, read = timeout return httpx.Timeout(connect=connect, pool=connect, read=read, write=read) def convert_args_for_httpx( session: Union[httpx.Client, httpx.AsyncClient], kwargs: Dict[str, Any] ) -> Tuple[Dict[str, Any], Dict[str, Any]]: request_kwargs = { "params": kwargs.get("params"), "headers": kwargs.get("headers"), "content": kwargs.get("data"), "timeout": session.timeout } if "timeout" in kwargs: request_kwargs["timeout"] = convert_timeout(kwargs["timeout"]) send_kwargs = {"stream": kwargs.get("stream", False)} if "httpx_args" in kwargs: httpx_args = dict(kwargs["httpx_args"] or {}) for key in ("stream", "auth", "follow_redirects"): if key in httpx_args: send_kwargs[key] = httpx_args.pop(key) request_kwargs.update(httpx_args) return request_kwargs, send_kwargs ================================================ FILE: src/yadisk/sessions/aiohttp_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Optional, Any, Union from ..exceptions import ( RequestError, TooManyRedirectsError, RequestTimeoutError, YaDiskConnectionError ) from .._async_session import AsyncSession, AsyncResponse from .._common import is_async_func from ..utils import CaseInsensitiveDict from .._typing_compat import Dict from ..types import ( JSON, AsyncConsumeCallback, Headers, TimeoutParameter, HTTPMethod, AsyncPayload ) from .. import settings import aiohttp import sys __all__ = ["AIOHTTPSession"] def convert_aiohttp_exception(exc: aiohttp.ClientError) -> Union[RequestError, aiohttp.ClientError]: if isinstance(exc, aiohttp.TooManyRedirects): return TooManyRedirectsError(str(exc)) elif isinstance(exc, aiohttp.ServerTimeoutError): return RequestTimeoutError(str(exc)) elif isinstance(exc, aiohttp.ClientConnectionError): return YaDiskConnectionError(str(exc)) elif isinstance(exc, aiohttp.ClientError): return RequestError(str(exc)) else: return exc class AIOHTTPResponse(AsyncResponse): def __init__(self, response: aiohttp.ClientResponse): super().__init__() self._response = response self.status = response.status async def json(self) -> JSON: try: return await self._response.json() except aiohttp.ContentTypeError as e: raise ValueError("Expected Content-Type: application/json, got something else") from e except aiohttp.ClientError as e: raise convert_aiohttp_exception(e) from e async def download(self, consume_callback: AsyncConsumeCallback) -> None: callback: Any = consume_callback try: if is_async_func(consume_callback): async for chunk in self._response.content.iter_chunked(8192): await callback(chunk) else: async for chunk in self._response.content.iter_chunked(8192): callback(chunk) except aiohttp.ClientError as e: raise convert_aiohttp_exception(e) from e async def close(self) -> None: await self._response.release() def convert_timeout(timeout: TimeoutParameter) -> Optional[aiohttp.ClientTimeout]: if timeout is ...: return convert_timeout(settings.DEFAULT_TIMEOUT) elif timeout is None: return None elif isinstance(timeout, (int, float)): return aiohttp.ClientTimeout(sock_connect=timeout, sock_read=timeout) connect, read = timeout return aiohttp.ClientTimeout(sock_connect=connect, sock_read=read) DEFAULT_USER_AGENT = "Python/%s.%s aiohttp/%s" % (sys.version_info.major, sys.version_info.minor, aiohttp.__version__) class AIOHTTPSession(AsyncSession): """ .. _aiohttp: https://pypi.org/project/aiohttp :any:`AsyncSession` implementation using the `aiohttp`_ library. All arguments passed in the constructor are directly forwared to :any:`aiohttp.ClientSession`. :ivar aiohttp_session: underlying instance of :any:`aiohttp.ClientSession` To pass `aiohttp`-specific arguments from :any:`AsyncClient` use :code:`aiohttp_args` keyword argument. Usage example: .. code:: python import yadisk async def main(): async with yadisk.AsyncClient(..., session="aiohttp") as client: await client.get_meta( "/my_file.txt", n_retries=5, aiohttp_args={ "proxies": {"https": "http://example.com:1234"}, "verify": False } ) """ def __init__(self, *args, **kwargs) -> None: headers = CaseInsensitiveDict({ "User-Agent": DEFAULT_USER_AGENT, "Accept-Encoding": "gzip, deflate", "Accept": "*/*", "Connection": "keep-alive" }) headers.update(kwargs.get("headers") or {}) kwargs["headers"] = headers self._session = aiohttp.ClientSession(*args, **kwargs) @property def aiohttp_session(self) -> aiohttp.ClientSession: return self._session async def send_request( self, method: HTTPMethod, url: str, *, params: Optional[Dict[str, Any]] = None, data: Optional[AsyncPayload] = None, headers: Optional[Headers] = None, **kwargs ) -> AsyncResponse: converted_kwargs: Dict[str, Any] = { "params": params, "data": data, "headers": headers } if "timeout" in kwargs: converted_kwargs["timeout"] = convert_timeout(kwargs["timeout"]) if "aiohttp_args" in kwargs: converted_kwargs.update(kwargs["aiohttp_args"] or {}) try: return AIOHTTPResponse(await self._session.request(method, url, **converted_kwargs)) except aiohttp.ClientError as e: raise convert_aiohttp_exception(e) from e async def close(self) -> None: await self._session.close() ================================================ FILE: src/yadisk/sessions/async_httpx_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Any from .._async_session import AsyncSession, AsyncResponse from ..types import JSON, AsyncConsumeCallback, HTTPMethod from .._common import is_async_func from ._httpx_common import * import httpx __all__ = ["AsyncHTTPXSession"] class AsyncHTTPXResponse(AsyncResponse): def __init__(self, response: httpx.Response): super().__init__() self._response = response self.status = response.status_code async def json(self) -> JSON: try: await self._response.aread() except httpx.HTTPError as e: raise convert_httpx_exception(e) from e except httpx.StreamConsumed as e: raise ValueError(f"Could not parse JSON: {e}") from e return self._response.json() async def download(self, consume_callback: AsyncConsumeCallback) -> None: callback: Any = consume_callback try: if is_async_func(consume_callback): async for chunk in self._response.aiter_bytes(8192): await callback(chunk) else: async for chunk in self._response.aiter_bytes(8192): callback(chunk) except httpx.HTTPError as e: raise convert_httpx_exception(e) from e async def close(self) -> None: await self._response.aclose() class AsyncHTTPXSession(AsyncSession): """ .. _httpx: https://pypi.org/project/httpx :any:`AsyncSession` implementation using the `httpx`_ library. .. _httpx.AsyncClient: https://www.python-httpx.org/api/#asyncclient All arguments passed in the constructor are directly forwared to `httpx.AsyncClient`_. :ivar httpx_client: underlying instance of `httpx.AsyncClient`_ To pass `httpx`-specific arguments from :any:`AsyncClient` use :code:`httpx_args` keyword argument. Usage example: .. code:: python import yadisk async def main(): async with yadisk.AsyncClient(..., session="httpx") as client: await client.get_meta( "/my_file.txt", n_retries=5, httpx_args={ "proxy": "http://localhost:11234", "verify": False, "max_redirects": 10 } ) """ def __init__(self, *args, **kwargs): self._session = httpx.AsyncClient(*args, **kwargs) self._session.follow_redirects = True @property def httpx_session(self) -> httpx.AsyncClient: return self._session async def send_request(self, method: HTTPMethod, url: str, **kwargs) -> AsyncResponse: request_kwargs, send_kwargs = convert_args_for_httpx(self._session, kwargs) try: request = self._session.build_request(method, url, **request_kwargs) return AsyncHTTPXResponse(await self._session.send(request, **send_kwargs)) except httpx.HTTPError as e: raise convert_httpx_exception(e) from e async def close(self) -> None: await self._session.aclose() ================================================ FILE: src/yadisk/sessions/httpx_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from .._session import Session, Response from ..types import JSON, ConsumeCallback, HTTPMethod from ._httpx_common import * import httpx __all__ = ["HTTPXSession"] class HTTPXResponse(Response): def __init__(self, response: httpx.Response): super().__init__() self._response = response self.status = response.status_code def json(self) -> JSON: try: self._response.read() except httpx.HTTPError as e: raise convert_httpx_exception(e) from e except httpx.StreamConsumed as e: raise ValueError(f"Could not parse JSON: {e}") from e return self._response.json() def download(self, consume_callback: ConsumeCallback) -> None: try: for chunk in self._response.iter_bytes(8192): consume_callback(chunk) except httpx.HTTPError as e: raise convert_httpx_exception(e) from e def close(self) -> None: self._response.close() class HTTPXSession(Session): """ .. _httpx: https://pypi.org/project/httpx :any:`Session` implementation using the `httpx`_ library. .. _httpx.Client: https://www.python-httpx.org/api/#client All arguments passed in the constructor are directly forwared to `httpx.Client`_. :ivar httpx_client: underlying instance of `httpx.Client`_ To pass `httpx`-specific arguments from :any:`Client` use :code:`httpx_args` keyword argument. Usage example: .. code:: python import yadisk with yadisk.Client(..., session="httpx") as client: client.get_meta( "/my_file.txt", n_retries=5, httpx_args={ "proxy": "http://localhost:11234", "verify": False, "max_redirects": 10 } ) """ def __init__(self, *args, **kwargs): self._client = httpx.Client(*args, **kwargs) self._client.follow_redirects = True @property def httpx_client(self) -> httpx.Client: return self._client def send_request(self, method: HTTPMethod, url: str, **kwargs) -> Response: request_kwargs, send_kwargs = convert_args_for_httpx(self._client, kwargs) try: request = self._client.build_request(method, url, **request_kwargs) return HTTPXResponse(self._client.send(request, **send_kwargs)) except httpx.HTTPError as e: raise convert_httpx_exception(e) from e def close(self) -> None: self._client.close() ================================================ FILE: src/yadisk/sessions/pycurl_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from io import BytesIO import json from typing import Any, Optional from ..exceptions import ( RequestError, RequestTimeoutError, TooManyRedirectsError, YaDiskConnectionError ) from .._session import Session, Response from .._typing_compat import Iterator, Tuple, Dict from ..utils import CaseInsensitiveDict from ..types import JSON, ConsumeCallback, HTTPMethod, Headers, Payload, TimeoutParameter from .. import settings from urllib.parse import urlencode import pycurl __all__ = ["PycURLSession"] def convert_curl_error(error: pycurl.error) -> RequestError: code, msg = error.args mapping = {pycurl.E_TOO_MANY_REDIRECTS: TooManyRedirectsError, pycurl.E_COULDNT_CONNECT: YaDiskConnectionError, pycurl.E_NO_CONNECTION_AVAILABLE: YaDiskConnectionError, pycurl.E_OPERATION_TIMEDOUT: RequestTimeoutError} exc = mapping.get(code) or RequestError return exc(msg) # see PycurlResponse.download() implementation MAX_RESPONSE_BUFFER_SIZE = 128 * 1024 class PycURLResponse(Response): def __init__(self, curl: pycurl.Curl, response: bytes): super().__init__() self._curl = curl self._response = response self._update_status() def _update_status(self) -> None: self.status = self._curl.getinfo(pycurl.RESPONSE_CODE) def _perform(self) -> None: try: self._curl.perform() except pycurl.error as e: raise convert_curl_error(e) from e self._update_status() def _perform_rb(self) -> None: try: self._response = self._curl.perform_rb() except pycurl.error as e: raise convert_curl_error(e) from e self._update_status() def json(self) -> JSON: if not self.status: self._perform_rb() return json.loads(self._response) def download(self, consume_callback: ConsumeCallback) -> None: buffer = BytesIO() def write_cb(chunk: bytes) -> int: # Write up to `MAX_RESPONSE_BUFFER_SIZE` bytes of data into an in-memory buffer # This is a hack to detect bad HTTP status codes to give # `consume_callback` an opportunity to check status before writing if buffer.tell() < MAX_RESPONSE_BUFFER_SIZE: buffer.write(chunk) return len(chunk) elif buffer.tell(): buffer.seek(0) chunk_from_buffer = buffer.read() consume_callback(chunk_from_buffer) buffer.seek(0) buffer.truncate(0) consume_callback(chunk) return len(chunk) self._curl.setopt(pycurl.WRITEFUNCTION, write_cb) self._perform() # Write left over data from the buffer if buffer.tell(): buffer.seek(0) consume_callback(buffer.read()) def close(self) -> None: self._curl.close() class IterableReader: def __init__(self, iterator: Iterator[bytes]): self.iterator = iterator self._current_chunk = b"" self._position_in_chunk = 0 def read(self, size=-1) -> bytes: if size < 0: return self.readall() data = b"" while len(data) < size: if self._position_in_chunk >= len(self._current_chunk): try: self._current_chunk = next(self.iterator) except StopIteration: return data self._position_in_chunk = 0 remaining = size - len(data) chunk_fragment = self._current_chunk[self._position_in_chunk:self._position_in_chunk + remaining] data += chunk_fragment self._position_in_chunk += len(chunk_fragment) return data def readall(self) -> bytes: data = b"" while True: if self._position_in_chunk >= len(self._current_chunk): try: self._current_chunk = next(self.iterator) except StopIteration: return data self._position_in_chunk = 0 chunk_fragment = self._current_chunk[self._position_in_chunk:] data += chunk_fragment self._position_in_chunk += len(chunk_fragment) def convert_timeout(timeout: TimeoutParameter) -> Tuple[float, float]: if timeout is ...: return convert_timeout(settings.DEFAULT_TIMEOUT) if isinstance(timeout, tuple): connect_timeout, read_timeout = timeout else: connect_timeout = read_timeout = timeout MAX_TIMEOUT = 4294967 # in seconds if connect_timeout is None: connect_timeout = MAX_TIMEOUT elif connect_timeout <= 0.001: # If connect_timeout gets rounded down to 0, the default connect # timeout would be applied instead by cURL connect_timeout = 0.001 if read_timeout is None: # 0 disables LOW_SPEED_TIME read_timeout = 0 elif read_timeout <= 1.0: # If read_timeout gets rounded down to 0, the low speed time will be disabled # 1 second is the lowest possible timeout read_timeout = 1.0 return connect_timeout, read_timeout class PycURLSession(Session): """ .. _pycurl: https://pypi.org/project/pycurl :any:`Session` implementation using the `pycurl`_ library. To pass `pycurl`-specific arguments from :any:`Client` use :code:`curl_options` keyword argument. Usage example: .. code:: python import yadisk import pycurl with yadisk.Client(..., session="pycurl") as client: client.get_meta( "/my_file.txt", n_retries=5, curl_options={ pycurl.MAX_SEND_SPEED_LARGE: 5 * 1024**2, pycurl.MAX_RECV_SPEED_LARGE: 5 * 1024**2, pycurl.PROXY: "http://localhost:12345", pycurl.MAXREDIRS: 15 } ) """ def __init__(self) -> None: self._share = pycurl.CurlShare() self._share.setopt(pycurl.SH_SHARE, pycurl.LOCK_DATA_CONNECT) self._share.setopt(pycurl.SH_SHARE, pycurl.LOCK_DATA_DNS) self._share.setopt(pycurl.SH_SHARE, pycurl.LOCK_DATA_SSL_SESSION) def send_request( self, method: HTTPMethod, url: str, *, params: Optional[Dict[str, Any]] = None, data: Optional[Payload] = None, headers: Optional[Headers] = None, stream: bool = False, curl_options: Optional[Dict[int, Any]] = None, **kwargs ) -> Response: curl_headers = CaseInsensitiveDict({"connection": "keep-alive"}) curl_headers.update(headers or {}) if params: url = url + "?" + urlencode(params) curl = pycurl.Curl() curl.setopt(pycurl.NOSIGNAL, True) curl.setopt(pycurl.FOLLOWLOCATION, True) curl.setopt(pycurl.URL, url) curl.setopt(pycurl.SHARE, self._share) if "timeout" in kwargs: connect_timeout, read_timeout = convert_timeout(kwargs["timeout"]) curl.setopt(pycurl.CONNECTTIMEOUT_MS, int(connect_timeout * 1000)) curl.setopt(pycurl.LOW_SPEED_TIME, int(read_timeout)) curl.setopt(pycurl.LOW_SPEED_LIMIT, 64) curl.setopt(pycurl.HTTPHEADER, [f"{k}:{v}" for k, v in curl_headers.items() if k and v]) if curl_options is not None: for option, value in curl_options.items(): curl.setopt(option, value) uploading_file = False if data is not None: curl.setopt(pycurl.UPLOAD, True) uploading_file = True curl_data: Any if isinstance(data, bytes): curl_data = BytesIO(data) # Some requests may silently fail without specifying the exact # payload size. This appears to happen with PatchRequest (PUT # /v1/disk/resources). The server claims to have received an # empty string, but when using the test API gateway (which # forwards all requests using httpx) all data is sent # correctly. Weird. This also doesn't seem to affect file # uploads. curl.setopt(pycurl.INFILESIZE, len(data)) elif hasattr(data, "read"): curl_data = data elif isinstance(data, Iterator): curl_data = IterableReader(data) curl.setopt(pycurl.READDATA, curl_data) curl.setopt(pycurl.CUSTOMREQUEST, method) if not stream or uploading_file: try: response = curl.perform_rb() except pycurl.error as e: raise convert_curl_error(e) from e else: response = b"" return PycURLResponse(curl, response) def close(self) -> None: self._share.close() ================================================ FILE: src/yadisk/sessions/requests_session.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from ..exceptions import ( RequestError, TooManyRedirectsError, RequestTimeoutError, YaDiskConnectionError ) from .._session import Session, Response from ..utils import CaseInsensitiveDict from .._typing_compat import Dict from ..types import JSON, ConsumeCallback, HTTPMethod, Headers, Payload from typing import Any, Optional, Union import threading import requests __all__ = ["RequestsSession"] def convert_requests_exception(exc: requests.RequestException) -> Union[RequestError, requests.RequestException]: if isinstance(exc, requests.exceptions.TooManyRedirects): return TooManyRedirectsError(str(exc)) elif isinstance(exc, requests.exceptions.Timeout): return RequestTimeoutError(str(exc)) elif isinstance(exc, requests.exceptions.ConnectionError): return YaDiskConnectionError(str(exc)) elif isinstance(exc, requests.RequestException): return RequestError(str(exc)) else: return exc class RequestsResponse(Response): def __init__(self, response: requests.Response): super().__init__() self._response = response self.status = self._response.status_code def json(self) -> JSON: try: return self._response.json() except RuntimeError as e: raise ValueError(f"Could not parse JSON: {e}") from e def download(self, consume_callback: ConsumeCallback) -> None: try: for chunk in self._response.iter_content(8192): consume_callback(chunk) except requests.RequestException as e: raise convert_requests_exception(e) from e def close(self) -> None: self._response.close() class RequestsSession(Session): """ .. _requests: https://pypi.org/project/requests :any:`Session` implementation using the `requests`_ library. All arguments passed in the constructor are directly forwared to :any:`requests.Session`. :ivar requests_session: underlying instance of :any:`requests.Session` .. note:: Internally, this class creates thread-local instances of :any:`requests.Session`, since it is not currently guaranteed to be thread safe. Calling :any:`Session.close()` will close all thread-local sessions managed by this object. To pass `requests`-specific arguments from :any:`Client` use :code:`requests_args` keyword argument. Usage example: .. code:: python import yadisk with yadisk.Client(..., session="requests") as client: client.get_meta( "/my_file.txt", n_retries=5, requests_args={ "proxies": {"https": "http://example.com:1234"}, "verify": False } ) """ def __init__(self, *args, **kwargs): self._args, self._kwargs = args, kwargs self._local = threading.local() self._sessions = [] @property def requests_session(self) -> requests.Session: if not hasattr(self._local, "session"): self._local.session = requests.Session(*self._args, **self._kwargs) self._sessions.append(self._local.session) return self._local.session def _close_local(self) -> None: if not hasattr(self._local, "session"): return session = self._local.session session.close() self._sessions.remove(session) def send_request( self, method: HTTPMethod, url: str, *, params: Optional[Dict[str, Any]] = None, data: Optional[Payload] = None, headers: Optional[Headers] = None, stream: bool = False, **kwargs ) -> Response: requests_headers = CaseInsensitiveDict(self.requests_session.headers) requests_headers.update(headers or {}) converted_kwargs: Dict[str, Any] = { "params": params, "data": data, "headers": requests_headers, "stream": stream } if "timeout" in kwargs: converted_kwargs["timeout"] = kwargs["timeout"] if "requests_args" in kwargs: converted_kwargs.update(kwargs["requests_args"] or {}) try: return RequestsResponse( self.requests_session.request(method, url, **converted_kwargs) ) except requests.exceptions.RequestException as e: raise convert_requests_exception(e) from e def close(self) -> None: while self._sessions: session = self._sessions.pop() session.close() ================================================ FILE: src/yadisk/settings.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2024 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import logging from .types import TimeoutParameter __all__ = [ "BASE_API_URL", "BASE_OAUTH_API_URL", "DEFAULT_N_RETRIES", "DEFAULT_RETRY_INTERVAL", "DEFAULT_TIMEOUT", "DEFAULT_UPLOAD_RETRY_INTERVAL", "DEFAULT_UPLOAD_TIMEOUT", "logger" ] #: `tuple` of 2 numbers (`int` or `float`), default timeout for requests. #: First number is the connect timeout, the second one is the read timeout. DEFAULT_TIMEOUT: TimeoutParameter = (10.0, 15.0) #: `int`, default number of retries DEFAULT_N_RETRIES: int = 3 #: `float`, default retry interval DEFAULT_RETRY_INTERVAL: float = 0.0 #: Analogous to :any:`settings.DEFAULT_TIMEOUT` but for #: :any:`Client.upload()`/:any:`AsyncClient.upload()` function DEFAULT_UPLOAD_TIMEOUT: TimeoutParameter = DEFAULT_TIMEOUT #: Analogous to :any:`settings.DEFAULT_RETRY_INTERVAL` but for #: :any:`Client.upload()`/:any:`AsyncClient.upload()` function DEFAULT_UPLOAD_RETRY_INTERVAL: float = 0.0 #: Base URL for Yandex.Disk's REST API. #: Can be overriden for testing and other purposes BASE_API_URL: str = "https://cloud-api.yandex.net" #: Base URL for Yandex.Disk's OAuth API. #: Can be overriden for testing and other purposes BASE_OAUTH_API_URL: str = "https://oauth.yandex.ru" #: Logger for the library. Logs include information about requests to the API #: and automatic retry attempts. logger = logging.getLogger("yadisk") ================================================ FILE: src/yadisk/types.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . from typing import Any, Optional, TypedDict, Union, TYPE_CHECKING, Protocol, BinaryIO, Literal from ._typing_compat import ( Dict, List, Tuple, Callable, Awaitable, Iterator, AsyncIterator, Mapping, TypeAlias ) if TYPE_CHECKING: # pragma: no cover from ._session import Session, Response from ._async_session import AsyncSession, AsyncResponse from ._client import Client from ._async_client import AsyncClient __all__ = [ "JSON", "AnyClient", "AnyResponse", "AsyncConsumeCallback", "AsyncFileLike", "AsyncFileOrPath", "AsyncFileOrPathDestination", "AsyncOpenFileCallback", "AsyncPayload", "AsyncSessionFactory", "AsyncSessionName", "AvailableUntilVerbose", "BinaryAsyncFileLike", "ConsumeCallback", "ExternalOrganizationIdVerbose", "FileOpenMode", "FileOrPath", "FileOrPathDestination", "HTTPMethod", "Headers", "OpenFileCallback", "OperationStatus", "PasswordVerbose", "Payload", "PublicSettings", "PublicSettingsAccess", "SessionFactory", "SessionName", "TimeoutParameter", ] #: JSON data (parsed) JSON: TypeAlias = Union[Dict, List, str, int, float, None] #: Request timeout (in seconds). Can be a single number, None or a tuple. #: If the timeout is specified as a tuple, then the first value is the #: connect timeout, and the second value is the read timeout. #: Otherwise, both connect and read timeouts are set to the same value. #: A value of None means no timeout. #: If the timeout's value is :code:`...`, the default timeout is used #: (either :any:`settings.DEFAULT_TIMEOUT` or :any:`settings.DEFAULT_UPLOAD_TIMEOUT`) TimeoutParameter: TypeAlias = Optional[ Union[ float, Tuple[Optional[float], Optional[float]] ] ] #: Type used for passing HTTP request headers Headers: TypeAlias = Mapping[str, str] #: Request payload - data to be uploaded Payload: TypeAlias = Union[bytes, Iterator[bytes], BinaryIO] #: Callback function that is invoked to consume the streamed HTTP response body ConsumeCallback: TypeAlias = Callable[[bytes], None] #: Request payload - data to be uploaded (async variant) AsyncPayload: TypeAlias = Union[bytes, Iterator[bytes], AsyncIterator[bytes], BinaryIO, "BinaryAsyncFileLike"] #: Callback function (may be asynchronous) that is invoked to consume the #: streamed HTTP response body AsyncConsumeCallback: TypeAlias = Union[Callable[[bytes], None], Callable[[bytes], Awaitable[None]]] #: :any:`Response` or :any:`AsyncResponse` AnyResponse: TypeAlias = Union["Response", "AsyncResponse"] #: :any:`Session` or :any:`AsyncSession` AnySession: TypeAlias = Union["Session", "AsyncSession"] #: :any:`Client` or :any:`AsyncClient` AnyClient: TypeAlias = Union["Client", "AsyncClient"] class AsyncFileLike(Protocol): """ This protocol describes the bare minimum set of required methods for an async file-like object (open in either binary or unicode mode). """ async def read(self, size: int = ..., /) -> Union[str, bytes]: """ Reads `size` bytes or characters. :param size: `int`, number of bytes/characters to read from the file :returns: data that was read from the file """ ... async def write(self, buffer: Any, /) -> int: """ Writes data (contained in `buffer`). :param buffer: data to be written :returns: the number of written bytes/characters """ ... async def seek(self, pos: int, whence: int = ..., /) -> int: """ Performs a seek operation on a file. :param pos: `int`, position to seek to :param whence: `int`, 0 (seek absolute position), 1 (seek relative to current position) or 2 (seek to file's end) :returns: `int`, absolute position within the file after the seek operation """ ... async def tell(self) -> int: """ Returns current position within the file. :returns: `int`, current position within the file """ ... class BinaryAsyncFileLike(Protocol): """ This protocol describes the bare minimum set of required methods for an async file-like object open in binary mode. """ async def read(self, size: int = ..., /) -> bytes: """ Reads `size` bytes. :param size: `int`, number of bytes/characters to read from the file :returns: data that was read from the file """ ... async def write(self, buffer: Any, /) -> int: """ Writes data (contained in `buffer`). :param buffer: data to be written :returns: the number of written bytes """ ... async def seek(self, pos: int, whence: int = ..., /) -> int: """ Performs a seek operation on a file. :param pos: `int`, position to seek to :param whence: `int`, 0 (seek absolute position), 1 (seek relative to current position) or 2 (seek to file's end) :returns: `int`, absolute position within the file after the seek operation """ ... async def tell(self) -> int: """ Returns current position within the file. :returns: `int`, current position within the file """ ... #: This is used to specify a source file to upload FileOrPath: TypeAlias = Union[ str, bytes, BinaryIO, Callable[[], Iterator[bytes]] ] #: This is used to specify a destination file to download into FileOrPathDestination: TypeAlias = Union[ str, bytes, BinaryIO, ] #: This is used to specify a source file to upload (async variant) AsyncFileOrPath: TypeAlias = Union[ str, bytes, BinaryIO, AsyncFileLike, Callable[[], AsyncIterator[bytes]] ] #: This is used to specify a destination file to download into (async variant) AsyncFileOrPathDestination: TypeAlias = Union[ str, bytes, BinaryIO, BinaryAsyncFileLike ] #: Function that returns an instance of :any:`Session` SessionFactory: TypeAlias = Callable[[], "Session"] #: Function that returns an instance of :any:`AsyncSession` AsyncSessionFactory: TypeAlias = Callable[[], "AsyncSession"] #: File mode for :any:`OpenFileCallback` and :any:`AsyncOpenFileCallback` FileOpenMode: TypeAlias = Union[Literal["rb"], Literal["wb"]] #: Function that is used for opening local files (like :any:`open`) OpenFileCallback: TypeAlias = Callable[[Union[str, bytes], FileOpenMode], BinaryIO] #: Function that is used for opening local files (async variant) AsyncOpenFileCallback: TypeAlias = Union[ Callable[[Union[str, bytes], FileOpenMode], Awaitable[BinaryAsyncFileLike]], Callable[[Union[str, bytes], FileOpenMode], Awaitable[BinaryIO]], ] #: HTTP request method HTTPMethod: TypeAlias = Union[ Literal["GET"], Literal["POST"], Literal["PUT"], Literal["PATCH"], Literal["DELETE"], Literal["OPTIONS"], Literal["HEAD"], Literal["CONNECT"], Literal["TRACE"], ] #: Valid session name (see :doc:`/api_reference/sessions`) SessionName: TypeAlias = Union[Literal["httpx"], Literal["pycurl"], Literal["requests"]] #: Valid asynchronous session name (see :doc:`/api_reference/sessions`) AsyncSessionName: TypeAlias = Union[Literal["aiohttp"], Literal["httpx"]] #: Yandex.Disk's asynchronous operation status OperationStatus: TypeAlias = Union[Literal["in-progress"], Literal["success"], Literal["failed"]] class PublicSettings(TypedDict, total=False): """ Public settings of a shared resource. This type describes the input for requests that modify public settings. For the related response object, see :any:`PublicSettingsObject`. :ivar available_until: `int`, timestamp indicating the expiration date of the link :ivar read_only: `bool`, whether the resource is read-only :ivar available_until_verbose: :any:`AvailableUntilVerbose`, verbose information about the expiration date :ivar password: `str`, password to access the resource :ivar password_verbose: :any:`PasswordVerbose`, verbose information about the password :ivar external_organization_id: `str`, external organization ID :ivar external_organization_id_verbose: :any:`ExternalOrganizationIdVerbose`, verbose information about the external organization ID :ivar accesses: `List[PublicSettingsAccess]`, list of access settings .. note:: It appears that passing :code:`available_until` as an empty string disables the expiration date. Similarly, password can be disabled by passing :code:`False` or :code:`0`. This is not officially documented, though. """ available_until: Union[int, str] read_only: bool available_until_verbose: "AvailableUntilVerbose" password: Union[str, Literal[False, 0]] password_verbose: "PasswordVerbose" external_organization_id: str external_organization_id_verbose: "ExternalOrganizationIdVerbose" accesses: List["PublicSettingsAccess"] class AvailableUntilVerbose(TypedDict): """ Verbose information about the expiration date of a shared resource. :ivar enabled: `bool`, whether the expiration date is enabled :ivar value: `int`, timestamp indicating the expiration date """ enabled: bool value: int class PasswordVerbose(TypedDict): """ Verbose information about the password of a shared resource. :ivar enabled: `bool`, whether the password is enabled :ivar value: `str`, password to access the resource """ enabled: bool value: str class ExternalOrganizationIdVerbose(TypedDict): """ Verbose information about the external organization ID of a shared resource. :ivar enabled: `bool`, whether the external organization ID is enabled :ivar value: `str`, external organization ID """ enabled: bool value: str class PublicSettingsAccess(TypedDict, total=False): """ Access settings of a shared resource. :ivar macros: `List[Union[Literal["employees"], Literal["all"]]],`, specifies who has access to the shared resource, must contain only one element :ivar org_id: `int`, organization ID :ivar user_ids: `List[str]`, list of user IDs :ivar group_ids: `List[int]`, list of group IDs :ivar department_ids: `List[int]`, list of department IDs :ivar rights: `list[str]`, list of access rights Valid access rights: - `write`: write access - `read`: read access - `read_without_download`: read access without download - `read_with_password`: read access with password - `read_with_password_without_download`: read access with password and without download """ macros: List[Union[Literal["employees"], Literal["all"]]] org_id: int user_ids: List[str] group_ids: List[int] department_ids: List[int] rights: List[ Union[ Literal["write"], Literal["read"], Literal["read_without_download"], Literal["read_with_password"], Literal["read_with_password_without_download"] ] ] ================================================ FILE: src/yadisk/utils.py ================================================ # -*- coding: utf-8 -*- # Copyright © 2025 Ivan Konovalov # This file is part of a Python library yadisk. # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, see . import asyncio from collections import defaultdict import inspect import sys import time from .objects import ErrorObject from .exceptions import * from . import settings from typing import Any, Optional, Union, TypeVar from ._typing_compat import Callable, Awaitable, Dict, Tuple, Type from .types import AnyResponse __all__ = ["CaseInsensitiveDict", "async_auto_retry", "auto_retry", "get_exception"] class _UnexpectedRequestError(YaDiskError): # Used for testing (see tests/disk_gateway.py) pass if sys.version_info >= (3, 11) and hasattr(Exception, "add_note"): def _add_exception_note(exc: Exception, note: str) -> None: exc.add_note(note) else: def _add_exception_note(exc: Exception, note: str) -> None: pass EXCEPTION_MAP: Dict[int, Dict[str, Type[YaDiskError]]] = { 400: defaultdict( lambda: BadRequestError, { "FieldValidationError": FieldValidationError, "authorization_pending": AuthorizationPendingError, "invalid_client": InvalidClientError, "invalid_grant": InvalidGrantError, "bad_verification_code": BadVerificationCodeError, "unsupported_token_type": UnsupportedTokenTypeError } ), 401: defaultdict(lambda: UnauthorizedError), 403: defaultdict( lambda: ForbiddenError, { "DiskSymlinkPasswordRequiredError": PasswordRequiredError } ), 404: defaultdict( lambda: NotFoundError, { "DiskNotFoundError": PathNotFoundError, "DiskOperationNotFoundError": OperationNotFoundError } ), 406: defaultdict(lambda: NotAcceptableError), 409: defaultdict( lambda: ConflictError, { "DiskPathDoesntExistsError": ParentNotFoundError, "DiskPathPointsToExistentDirectoryError": DirectoryExistsError, "DiskResourceAlreadyExistsError": PathExistsError, "MD5DifferError": MD5DifferError } ), 410: defaultdict(lambda: GoneError), 413: defaultdict(lambda: PayloadTooLargeError), 415: defaultdict(lambda: UnsupportedMediaError), 423: defaultdict( lambda: LockedError, { "DiskResourceLockedError": ResourceIsLockedError, "DiskUploadTrafficLimitExceeded": UploadTrafficLimitExceededError } ), 429: defaultdict( lambda: TooManyRequestsError, {"DiskResourceDownloadLimitExceededError": ResourceDownloadLimitExceededError} ), 500: defaultdict(lambda: InternalServerError), 502: defaultdict(lambda: BadGatewayError), 503: defaultdict(lambda: UnavailableError), 504: defaultdict(lambda: GatewayTimeoutError), 507: defaultdict(lambda: InsufficientStorageError), # This is a special value for testing 499: defaultdict(lambda: _UnexpectedRequestError) } def get_exception(response: AnyResponse, error: Optional[ErrorObject]) -> YaDiskError: """ Get an exception instance based on response, assuming the request has failed. :param response: an instance of :any:`Response` or :any:`AsyncResponse` :param error: an instance of :any:`ErrorObject` or `None` :returns: an exception instance, subclass of :any:`YaDiskError` """ exc_group = EXCEPTION_MAP.get(response.status, None) if exc_group is None: return UnknownYaDiskError(f"Unknown Yandex.Disk error: status code {response.status}") if error is not None: msg = error.message or "" desc = error.description or "" error_name = error.error or "" else: msg = "" desc = "" error_name = "" exc = exc_group[error_name] exc_message = "" if msg: exc_message = msg if desc: if exc_message: exc_message += " | " exc_message += f"Error description: {desc.rstrip('.')}." if error_name: if exc_message: exc_message += " | " exc_message += f"Error code: {error_name}" if exc_message: exc_message += " | " exc_message += f"Status code: {response.status}" return exc(error_name, exc_message, response) T = TypeVar("T") def auto_retry( func: Callable[..., T], n_retries: Optional[int] = None, retry_interval: Optional[Union[int, float]] = None, args: Optional[Tuple] = None, kwargs: Optional[Dict[str, Any]] = None, retry_on: Tuple[Type[Exception], ...] = tuple() ) -> T: """ Attempt to perform a request with automatic retries. A retry is triggered by :any:`RequestError` or :any:`RetriableYaDiskError`, unless the raised exception has :code:`disable_retry` set to :code:`True`. :param func: function to run, must not require any arguments :param n_retries: `int`, maximum number of retries :param retry_interval: `int` or `float`, delay between retries (in seconds) :param args: `tuple` or `None`, additional arguments for `func` :param kwargs: `dict` or `None`, additional keyword arguments for `func` :param retry_on: `tuple`, additional exception classes to retry on :returns: return value of func() """ if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES if retry_interval is None: retry_interval = settings.DEFAULT_RETRY_INTERVAL if args is None: args = tuple() if kwargs is None: kwargs = {} exceptions: Tuple[Type[Exception], ...] = (RequestError, RetriableYaDiskError, *retry_on) for i in range(n_retries + 1): try: return func(*args, **kwargs) except exceptions as e: if i == n_retries or (isinstance(e, YaDiskError) and e.disable_retry): settings.logger.info( f"not triggering an automatic retry: ({i + 1} out of {n_retries}), got {e.__class__.__name__}: {e}" ) if i: _add_exception_note(e, f"Got the error after {i} retry attempts") raise settings.logger.info( f"automatic retry triggered: ({i + 1} out of {n_retries}), got {e.__class__.__name__}: {e}" ) if retry_interval: time.sleep(retry_interval) # This should never be reachable raise AssertionError() async def async_auto_retry( func: Union[Callable[..., Any], Callable[..., Awaitable[Any]]], n_retries: Optional[int] = None, retry_interval: Optional[Union[int, float]] = None, args: Optional[Tuple] = None, kwargs: Optional[Dict[str, Any]] = None, retry_on: Tuple[Type[Exception], ...] = tuple() ) -> Any: """ Attempt to perform a request with automatic retries. A retry is triggered by :any:`RequestError` or :any:`RetriableYaDiskError`, unless the raised exception has :code:`disable_retry` set to :code:`True`. :param func: function to run, must not require any arguments :param n_retries: `int`, maximum number of retries :param retry_interval: `int` or `float`, delay between retries (in seconds) :param args: `tuple` or `None`, additional arguments for `func` :param kwargs: `dict` or `None`, additional keyword arguments for `func` :param retry_on: `tuple`, additional exception classes to retry on :returns: return value of func() """ if n_retries is None: n_retries = settings.DEFAULT_N_RETRIES if retry_interval is None: retry_interval = settings.DEFAULT_RETRY_INTERVAL if args is None: args = tuple() if kwargs is None: kwargs = {} is_coro = inspect.iscoroutinefunction(func) # Suppress false type hint errors callback: Any = func exceptions: Tuple[Type[Exception], ...] = (RequestError, RetriableYaDiskError, *retry_on) for i in range(n_retries + 1): try: if is_coro: return await callback(*args, **kwargs) else: return callback(*args, **kwargs) except exceptions as e: if i == n_retries or (isinstance(e, YaDiskError) and e.disable_retry): settings.logger.info( f"not triggering an automatic retry: ({i + 1} out of {n_retries}), got {e.__class__.__name__}: {e}" ) if i: _add_exception_note(e, f"Got the error after {i} retry attempts") raise settings.logger.info( f"automatic retry triggered: ({i + 1} out of {n_retries}), got {e.__class__.__name__}: {e}" ) if retry_interval: await asyncio.sleep(retry_interval) # This should never be reachable raise AssertionError() class CaseInsensitiveDict(dict): """A case-insensitive dictionary. All keys are converted to lowercase.""" @classmethod def _k(cls, key: str) -> str: return key.lower() def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._convert_keys() def __getitem__(self, key: str) -> Any: return super().__getitem__(self.__class__._k(key)) def __setitem__(self, key: str, value: Any) -> None: super().__setitem__(self.__class__._k(key), value) def __delitem__(self, key: str) -> Any: return super().__delitem__(self.__class__._k(key)) def __contains__(self, key: Any) -> bool: return super().__contains__(self.__class__._k(key)) def pop(self, key: str, /, *args, **kwargs) -> Any: return super().pop(self.__class__._k(key), *args, **kwargs) def get(self, key: str, /, *args, **kwargs) -> Any: return super().get(self.__class__._k(key), *args, **kwargs) def setdefault(self, key: str, *args, **kwargs) -> Any: return super().setdefault(self.__class__._k(key), *args, **kwargs) def update(self, *args, **kwargs) -> None: super().update(*(self.__class__(arg) for arg in args), **self.__class__(kwargs)) def _convert_keys(self) -> None: for k in list(self.keys()): v = super(CaseInsensitiveDict, self).pop(k) self.__setitem__(k, v) ================================================ FILE: tests/__init__.py ================================================ # -*- coding: utf-8 -*- ================================================ FILE: tests/async_client_test.py ================================================ # -*- coding: utf-8 -*- import hashlib import logging import os import platform import posixpath import sys import tempfile from typing import Any, Union, BinaryIO from io import BytesIO import aiofiles import yadisk from yadisk._common import is_operation_link, ensure_path_has_scheme, remove_path_scheme from yadisk._api import GetOperationStatusRequest import pytest from yadisk.types import FileOpenMode __all__ = ["TestAsyncClient"] replay_disabled = os.environ.get("PYTHON_YADISK_REPLAY_ENABLED", "1") != "1" recording_enabled = os.environ.get("PYTHON_YADISK_RECORDING_ENABLED", "0") == "1" def open_tmpfile(mode): if platform.system() == "Windows" and sys.version_info >= (3, 12): # This is needed in order to work on Windows return tempfile.NamedTemporaryFile(mode, delete_on_close=False) else: return tempfile.NamedTemporaryFile(mode) def async_open_tmpfile(mode): if platform.system() == "Windows" and sys.version_info >= (3, 12): # This is needed in order to work on Windows return aiofiles.tempfile.NamedTemporaryFile(mode, delete_on_close=False) else: return aiofiles.tempfile.NamedTemporaryFile(mode) @pytest.mark.anyio class TestAsyncClient: @pytest.mark.skipif( replay_disabled, reason="this test is not meant to run outside of replay mode, it must be modified first" ) @pytest.mark.usefixtures("record_or_replay") async def test_get_disk_info(self, async_client: yadisk.AsyncClient) -> None: disk_info = await async_client.get_disk_info() assert isinstance(disk_info, yadisk.objects.DiskInfoObject) assert disk_info.user is not None # If you re-record this test, you'll have to put your account data here assert disk_info.user.login == "ivknv" assert disk_info.field("reg_time").year == 2017 @pytest.mark.usefixtures("async_client_test") async def test_get_meta(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: resource = await async_client.get_meta(disk_root) assert isinstance(resource, yadisk.objects.ResourceObject) assert resource.type == "dir" assert resource.name == posixpath.split(disk_root)[1] # Test convenience method as well assert (await resource.get_meta(".")).resource_id == resource.resource_id @pytest.mark.usefixtures("async_client_test") async def test_listdir(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] paths = [posixpath.join(disk_root, name) for name in names] for path in paths: await async_client.mkdir(path) contents = [i async for i in async_client.listdir(disk_root)] result = [i.name for i in contents] assert result == names # Test the convenience method as well for dir in contents: assert [i async for i in dir.listdir(".")] == [] @pytest.mark.usefixtures("async_client_test") async def test_listdir_fields(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] paths = [posixpath.join(disk_root, name) for name in names] for path in paths: await async_client.mkdir(path) async def get_result(): return [(i.name, i.type, i.file) async for i in async_client.listdir(disk_root, fields=["name", "type"])] result = await get_result() assert result == [(name, "dir", None) for name in names] @pytest.mark.usefixtures("async_client_test") async def test_listdir_on_file(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: buf = BytesIO() buf.write(b"0" * 1000) buf.seek(0) path = posixpath.join(disk_root, "zeroes.txt") await async_client.upload(buf, path) with pytest.raises(yadisk.exceptions.WrongResourceTypeError): [i async for i in async_client.listdir(path)] @pytest.mark.usefixtures("async_client_test") async def test_listdir_with_limits(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] paths = [posixpath.join(disk_root, name) for name in names] for path in paths: await async_client.mkdir(path) async def get_result(): return [i.name async for i in async_client.listdir(disk_root, limit=1)] result = await get_result() assert result == names @pytest.mark.usefixtures("async_client_test") async def test_listdir_with_max_items(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: names = ["dir1", "dir2", "dir3", "dir4", "dir5", "dir6"] for name in names: path = posixpath.join(disk_root, name) await async_client.mkdir(path) results = [ [i.name async for i in async_client.listdir(disk_root, max_items=0)], [i.name async for i in async_client.listdir(disk_root, max_items=1, limit=1)], [i.name async for i in async_client.listdir(disk_root, max_items=2, limit=1)], [i.name async for i in async_client.listdir(disk_root, max_items=3, limit=1)], [i.name async for i in async_client.listdir(disk_root, max_items=10, limit=1)], ] expected = [ [], names[:1], names[:2], names[:3], names[:10], ] assert results == expected @pytest.mark.usefixtures("async_client_test") async def test_mkdir_and_exists(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] paths = [posixpath.join(disk_root, name) for name in names] async def check_existence(path): await async_client.mkdir(path) assert await async_client.exists(path) await async_client.remove(path, permanently=True) assert not await async_client.exists(path) for path in paths: await check_existence(path) async def _test_makedirs(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: parent1 = posixpath.join(disk_root, "parent1") parent2 = posixpath.join(parent1, "parent2") parent3 = posixpath.join(parent2, "parent3") path1 = posixpath.join(parent3, "leaf_directory") path2 = posixpath.join(parent3, "another_directory") path3 = posixpath.join(disk_root, "directory") for path in [parent1, parent2, parent3, path1, path2, path3]: assert not await async_client.exists(path) await async_client.makedirs(path1) assert await async_client.is_dir(path1) with pytest.raises(yadisk.exceptions.DirectoryExistsError): await async_client.makedirs(path1) await async_client.makedirs(path2) assert await async_client.is_dir(path2) await async_client.makedirs(path3) assert await async_client.is_dir(path3) @pytest.mark.usefixtures("async_client_test") async def test_makedirs_without_scheme(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: await self._test_makedirs(async_client, remove_path_scheme(disk_root)[1]) @pytest.mark.usefixtures("async_client_test") async def test_makedirs_with_scheme(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: await self._test_makedirs(async_client, ensure_path_has_scheme(disk_root, "disk")) @pytest.mark.skipif( platform.system() == "Windows" and sys.version_info < (3, 12), reason="won't work on Windows with Python < 3.12" ) @pytest.mark.usefixtures("async_client_test") @pytest.mark.parametrize("use_sync_open_function", (True, False)) async def test_upload_and_download( self, async_client: yadisk.AsyncClient, disk_root: str, use_sync_open_function: bool ) -> None: # Ensure to test synchronous file IO here # see https://github.com/ivknv/yadisk/issues/62 if use_sync_open_function: async def sync_open(path: Union[str, bytes], mode: FileOpenMode) -> BinaryIO: return open(path, mode) async_client.open_file = sync_open with open_tmpfile("w+b") as buf1, open_tmpfile("w+b") as buf2: buf1.write(b"0" * 1024**2) buf1.seek(0) path = posixpath.join(disk_root, "zeroes.txt") await async_client.upload(buf1.name, path, overwrite=True, n_retries=50) await async_client.download(path, buf2.name, n_retries=50) buf1.seek(0) buf2.seek(0) assert buf1.read() == buf2.read() @pytest.mark.skipif( platform.system() == "Windows" and sys.version_info < (3, 12), reason="won't work on Windows with Python < 3.12" ) @pytest.mark.usefixtures("async_client_test") async def test_upload_and_download_async(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: content = b"0" * 1024 ** 2 async with async_open_tmpfile("wb+") as source: await source.write(content) await source.seek(0) path1 = posixpath.join(disk_root, "zeroes.txt") path2 = posixpath.join(disk_root, "zeroes_from_generator.txt") await async_client.upload(source, path1, overwrite=True, n_retries=50) async def source_generator(): for _ in range(1024): yield b"0" * 1024 await async_client.upload(source_generator, path2, overwrite=True, n_retries=50) async with async_open_tmpfile("wb+") as destination: await async_client.download(path1, destination, n_retries=50) await destination.seek(0) assert content == await destination.read() await destination.seek(0) await destination.truncate() await async_client.download(path2, destination, n_retries=50) await destination.seek(0) assert content == await destination.read() @pytest.mark.usefixtures("async_client_test") async def test_check_token(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: assert await async_client.check_token() assert not await async_client.check_token("asdasdasd") @pytest.mark.usefixtures("async_client_test") async def test_permanent_remove(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: path = posixpath.join(disk_root, "dir") origin_path = "disk:" + path await async_client.mkdir(path) await async_client.remove(path, permanently=True) async for i in async_client.trash_listdir("/"): assert i.origin_path != origin_path @pytest.mark.usefixtures("async_client_test") async def test_restore_trash(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: path = posixpath.join(disk_root, "dir") origin_path = "disk:" + path await async_client.mkdir(path) await async_client.remove(path) trash_path: Any = None async for i in async_client.trash_listdir("/"): if i.origin_path == origin_path: assert await i.exists() assert await i.is_dir() assert not await i.is_file() trash_path = i.path break assert trash_path is not None await async_client.restore_trash(trash_path, path) assert await async_client.exists(path) @pytest.mark.usefixtures("async_client_test") async def test_move(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: path1 = posixpath.join(disk_root, "dir1") path2 = posixpath.join(disk_root, "dir2") await async_client.mkdir(path1) await async_client.move(path1, path2) assert await async_client.exists(path2) @pytest.mark.usefixtures("async_client_test") async def test_rename(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: filename1 = "dir1" filename2 = "dir2/" path1 = posixpath.join(disk_root, filename1) path2 = posixpath.join(disk_root, filename2) assert not await async_client.exists(path1) assert not await async_client.exists(path2) dir = await async_client.mkdir(path1) assert await dir.is_dir() rename_result = await dir.rename(filename2) assert isinstance(rename_result, yadisk.objects.AsyncResourceLinkObject) dir = rename_result assert not await async_client.exists(path1) assert await dir.is_dir() for bad_filename in ("", ".", "..", "/", "something/else"): with pytest.raises(ValueError): await dir.rename(bad_filename) async def test_rename_edgecases(self, async_client: yadisk.AsyncClient, mocker) -> None: # Test a few edgecases, make sure the destination paths are correct # Path schemes must be preserved dst_paths = [] async def mock_move(src_path: str, dst_path: str, **kwargs) -> None: # Store the destination path for later checking dst_paths.append(dst_path) mocker.patch.object(async_client, "move", mock_move) with pytest.raises(ValueError): await async_client.rename("", "impossible") with pytest.raises(ValueError): await async_client.rename("/", "impossible") with pytest.raises(ValueError): await async_client.rename("////", "impossible") with pytest.raises(ValueError): await async_client.rename("disk:/", "impossible") with pytest.raises(ValueError): await async_client.rename("app:/", "another_directory") await async_client.rename("disk:", "not_a_scheme") await async_client.rename("disk:/asd.txt", "renamed.txt") await async_client.rename("asd.txt", "renamed.txt") await async_client.rename("disk:/directory/file1.txt", "renamed_file.txt") await async_client.rename("disk:/directory/", "renamed_dir") assert dst_paths == [ "not_a_scheme", "disk:/renamed.txt", "renamed.txt", "disk:/directory/renamed_file.txt", "disk:/renamed_dir" ] @pytest.mark.usefixtures("async_client_test") async def test_remove_trash(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: path = posixpath.join(disk_root, "dir-to-remove") origin_path = "disk:" + path await async_client.mkdir(path) await async_client.remove(path) trash_path: Any = None async for i in async_client.trash_listdir("/"): if i.origin_path == origin_path: trash_path = i.path break assert trash_path is not None await async_client.remove_trash(trash_path) assert not await async_client.trash_exists(trash_path) @pytest.mark.usefixtures("async_client_test") async def test_publish_unpublish(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: await async_client.publish(disk_root) meta = await async_client.get_meta(disk_root) assert meta.public_url is not None assert meta.public_key is not None public_key, public_url = meta.public_key, meta.public_url assert await async_client.is_public_dir(public_key) assert await async_client.is_public_dir(public_url) assert not await async_client.is_public_file(public_key) assert not await async_client.is_public_file(public_url) await async_client.unpublish(disk_root) meta = await async_client.get_meta(disk_root) assert meta.public_url is None assert meta.public_key is None assert not await async_client.is_public_dir(public_key) assert not await async_client.is_public_dir(public_url) assert not await async_client.is_public_file(public_key) assert not await async_client.is_public_file(public_url) @pytest.mark.usefixtures("async_client_test") async def test_public_settings(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: await async_client.publish(disk_root) public_url = await async_client.get_meta(disk_root) @ "public_url" # First, set a password await async_client.update_public_settings(disk_root, { "password": "1234" }) with pytest.raises(yadisk.exceptions.PasswordRequiredError): await async_client.get_public_download_link(public_url) # We will make the public resource link expire by updating the settings available_until = 1 await async_client.update_public_settings(disk_root, { "password": "1234", "available_until": available_until }) # As of writing, the endpoint returns only "available_until" settings = await async_client.get_public_settings(disk_root) assert settings.available_until == available_until # At this point the public link should no longer be valid with pytest.raises(yadisk.exceptions.PathNotFoundError): await async_client.get_public_meta(public_url) await async_client.unpublish(disk_root) @pytest.mark.usefixtures("async_client_test") async def test_patch(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: directory = await async_client.patch(disk_root, {"test_property": "I'm a value!"}) assert directory.custom_properties == {"test_property": "I'm a value!"} directory = await async_client.patch(disk_root, {"number": 42}) assert directory.custom_properties == {"test_property": "I'm a value!", "number": 42} directory = await directory.patch({"test_property": None, "number": None}) assert directory.custom_properties is None @pytest.mark.usefixtures("async_client_test") async def test_issue7(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: # See https://github.com/ivknv/yadisk/issues/7 try: [i async for i in async_client.public_listdir("any value here", path="any value here")] except yadisk.exceptions.PathNotFoundError: pass def test_is_operation_link(self) -> None: assert is_operation_link("https://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link("http://cloud-api.yandex.net/v1/disk/operations/123asd") assert not is_operation_link("https://cloud-api.yandex.net/v1/disk/operation/1283718") assert not is_operation_link("https://asd8iaysd89asdgiu") assert not is_operation_link("http://asd8iaysd89asdgiu") async def test_get_operation_status_request_url(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: request = GetOperationStatusRequest( async_client.session, "https://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link(request.url) request = GetOperationStatusRequest( async_client.session, "http://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link(request.url) assert request.url.startswith("https://") request = GetOperationStatusRequest( async_client.session, "https://asd8iaysd89asdgiu") assert is_operation_link(request.url) assert request.url.startswith("https://") @pytest.mark.usefixtures("async_client_test") async def test_is_file(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: # See https://github.com/ivknv/yadisk-async/pull/6 buf1 = BytesIO() buf1.write(b"0" * 1024**2) buf1.seek(0) path = posixpath.join(disk_root, "zeroes.txt") await async_client.upload(buf1, path, overwrite=True, n_retries=50) assert await async_client.is_file(path) def test_ensure_path_has_scheme(self) -> None: # See https://github.com/ivknv/yadisk/issues/26 for more details assert ensure_path_has_scheme("disk:") == "disk:/disk:" assert ensure_path_has_scheme("trash:", default_scheme="trash") == "trash:/trash:" assert ensure_path_has_scheme("/asd:123") == "disk:/asd:123" assert ensure_path_has_scheme("/asd:123", "trash") == "trash:/asd:123" assert ensure_path_has_scheme("example/path") == "disk:/example/path" assert ensure_path_has_scheme("app:/test") == "app:/test" @pytest.mark.usefixtures("async_client_test") async def test_upload_download_non_seekable( self, async_client: yadisk.AsyncClient, disk_root: str, mocker ) -> None: # It should be possible to upload/download non-seekable file objects (such as stdin/stdout) # See https://github.com/ivknv/yadisk/pull/31 for more details def seek(*args, **kwargs): raise NotImplementedError test_input_file = BytesIO(b"0" * 1000) mocker.patch.object(test_input_file, "seekable", lambda: False) mocker.patch.object(test_input_file, "seek", seek) dst_path = posixpath.join(disk_root, "zeroes.txt") await async_client.upload(test_input_file, dst_path, n_retries=50) test_output_file = BytesIO() mocker.patch.object(test_output_file, "seekable", lambda: False) mocker.patch.object(test_output_file, "seek", seek) await async_client.download(dst_path, test_output_file, n_retries=50) assert test_input_file.tell() == 1000 assert test_output_file.tell() == 1000 @pytest.mark.usefixtures("async_client_test") async def test_copy( self, async_client: yadisk.AsyncClient, disk_root: str, poll_interval: float ) -> None: dir = await async_client.mkdir(posixpath.join(disk_root, "directory_to_copy")) await dir.upload(BytesIO(b"example text"), "file.txt") await dir.mkdir("nested directory 1") await dir.mkdir("nested directory 2") dst_path = posixpath.join(disk_root, "directory_copy") await dir.copy(dst_path, poll_interval=poll_interval) copy_info = await async_client.get_meta(dst_path) assert copy_info.embedded is not None assert copy_info.embedded.items is not None contents = sorted([(resource.type, resource.name) for resource in copy_info.embedded.items]) expected_contents = [ ("dir", "nested directory 1"), ("dir", "nested directory 2"), ("file", "file.txt"), ] assert copy_info.type == "dir" assert contents == expected_contents @pytest.mark.usefixtures("async_client_test") async def test_save_to_disk( self, async_client: yadisk.AsyncClient, disk_root: str, poll_interval: float ) -> None: test_contents = b"test file contents" public_file_path = posixpath.join(disk_root, "public_file.txt") await async_client.upload(BytesIO(test_contents), public_file_path) await async_client.publish(public_file_path) public_file_info = await async_client.get_meta(public_file_path) assert public_file_info.public_url is not None await async_client.save_to_disk( public_file_info.public_url, name="saved_public_file.txt", save_path=disk_root, poll_interval=poll_interval ) saved_file_path = posixpath.join(disk_root, "saved_public_file.txt") saved_file_info = await async_client.get_meta(saved_file_path) assert saved_file_info.md5 == hashlib.md5(test_contents).hexdigest() == public_file_info.md5 @pytest.mark.usefixtures("async_client_test") async def test_upload_url( self, async_client: yadisk.AsyncClient, disk_root: str, poll_interval: float ) -> None: test_contents = b"test file contents" file_path = posixpath.join(disk_root, "example_file.txt") dst_path = posixpath.join(disk_root, "uploaded_from_url.txt") await async_client.upload(BytesIO(test_contents), file_path) download_link = await async_client.get_download_link(file_path) await async_client.upload_url(download_link, dst_path, poll_interval=poll_interval) dst_file_info = await async_client.get_meta(dst_path) assert dst_file_info.md5 == hashlib.md5(test_contents).hexdigest() @pytest.mark.usefixtures("record_or_replay") async def test_none_args(self, async_client: yadisk.AsyncClient) -> None: # Passing headers=None, _args=None should not trigger any errors assert await async_client.check_token( headers=None, requests_args=None, httpx_args=None, curl_options=None ) link = "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA%3D%3D?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a" # This is worth testing on download_by_link() as well, since it has # slightly different logic with pytest.raises((yadisk.exceptions.GoneError, yadisk.exceptions.InternalServerError)): await async_client.download_by_link( link, BytesIO(), headers=None, requests_args=None, httpx_args=None, curl_options=None ) @pytest.mark.usefixtures("record_or_replay") async def test_get_files(self, async_client: yadisk.AsyncClient) -> None: files = [i async for i in async_client.get_files(max_items=25)] assert len(files) <= 25 for file in files: assert await file.is_file() offset = 15 files_with_offset = [i async for i in async_client.get_files(max_items=10, offset=offset)] assert len(files_with_offset) <= 10 for file in files_with_offset: assert await file.is_file() assert [file @ "path" for file in files[offset:]] == [file @ "path" for file in files_with_offset] assert len([i async for i in async_client.get_files(max_items=10, limit=3)]) <= 10 @pytest.mark.usefixtures("async_client_test") async def test_get_last_uploaded( self, async_client: yadisk.AsyncClient, disk_root: str ) -> None: files_to_upload = [ ("first.txt", b"example content"), ("second.txt", b"this is the second file"), ("third.txt", b"this is the third file") ] for filename, content in files_to_upload: await async_client.upload(BytesIO(content), posixpath.join(disk_root, filename)) last_uploaded = await async_client.get_last_uploaded(limit=3) for uploaded_file, (filename, content) in zip(last_uploaded, files_to_upload[::-1]): assert uploaded_file.path == "disk:" + posixpath.join(disk_root, filename) output = BytesIO() await uploaded_file.download(output) output.seek(0) assert output.read() == content @pytest.mark.usefixtures("async_client_test") async def test_public_listdir( self, async_client: yadisk.AsyncClient, disk_root: str ) -> None: directory = await async_client.mkdir(posixpath.join(disk_root, "public")) await directory.publish() public_directory = await directory.get_meta() assert await public_directory.is_dir() assert public_directory.public_key is not None assert await async_client.is_public_dir(public_directory.public_key) files_to_upload = [ ("first.txt", b"example content"), ("second.txt", b"this is the second file"), ("third.txt", b"this is the third file") ] for filename, content in files_to_upload: await (await public_directory.upload(BytesIO(content), filename)).publish() public_files = [i async for i in public_directory.public_listdir(sort="modified")] for file, (filename, content) in zip(public_files, files_to_upload): assert file.name == filename assert await async_client.is_public_file(public_directory.public_key, path=file.path) output = BytesIO() await async_client.download_public(public_directory.public_key, output, path=file.path) output.seek(0) assert output.read() == content await public_directory.unpublish() assert not await async_client.is_public_dir(public_directory.public_key) @pytest.mark.skipif( recording_enabled, reason="before recording this test, ensure it's not a privacy concern for you" ) @pytest.mark.usefixtures("record_or_replay") async def test_get_public_resources(self, async_client: yadisk.AsyncClient) -> None: first_10 = [i async for i in async_client.get_all_public_resources(max_items=10, limit=3)] with_offset = [i async for i in async_client.get_all_public_resources(max_items=5, offset=5, limit=2)] assert first_10 is not None assert with_offset is not None for public_resource in first_10 + with_offset: print(f"{public_resource @ 'path'}") assert await async_client.public_exists(public_resource @ "public_key") assert [i.path for i in first_10[5:]] == [i.path for i in with_offset] @pytest.mark.usefixtures("async_client_test") async def test_get_upload_link_object(self, async_client: yadisk.AsyncClient, disk_root: str) -> None: directory = await async_client.get_meta(disk_root) upload_link = await directory.get_upload_link_object("test.txt") assert ( await async_client.get_operation_status(upload_link @ "operation_id") ) == "in-progress" await async_client.upload_by_link(BytesIO(b"test file"), upload_link @ "href") assert ( await async_client.get_operation_status(upload_link @ "operation_id") ) == "success" @pytest.mark.usefixtures("record_or_replay") async def test_streaming_requests(self, async_client: yadisk.AsyncClient) -> None: # stream=True should not break requests assert await async_client.check_token(stream=True) assert len( await async_client.get_last_uploaded( stream=True, limit=10, fields=["items.type"] ) ) == 10 @pytest.mark.usefixtures("async_client_test") async def test_wait_for_operation( self, async_client: yadisk.AsyncClient, disk_root: str, poll_interval: float, mocker ) -> None: directory = await async_client.mkdir("directory") operation = await directory.remove(permanently=True, force_async=True, wait=False) with pytest.raises(yadisk.exceptions.AsyncOperationPollingTimeoutError): await operation.wait(poll_timeout=0.0) await operation.wait(poll_interval=poll_interval) assert await operation.get_status() == "success" # Mock get_operation_status() to trigger an AsyncOperationFailedError async def fake_get_operation_status(*args, **kwargs) -> yadisk.types.OperationStatus: return "failed" mocker.patch.object(async_client, "get_operation_status", fake_get_operation_status) with pytest.raises(yadisk.exceptions.AsyncOperationFailedError): await operation.wait(poll_interval=poll_interval) @pytest.mark.usefixtures("record_or_replay") async def test_download_by_link_error(self, async_client: yadisk.AsyncClient) -> None: # Make sure that if the server returns a bad status code (e.g. 500), # download_by_link() will not write the response into the file # Sample link, should either produce a 500 or 410 error # In case of error it outputs an HTML page, rather than a file link = "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA%3D%3D?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a" output = BytesIO() with pytest.raises((yadisk.exceptions.GoneError, yadisk.exceptions.InternalServerError)): await async_client.download_by_link(link, output) output.seek(0) assert output.read() == b"" @pytest.mark.usefixtures("async_client_test") async def test_operation_error_triggers_retry( self, async_client: yadisk.AsyncClient, disk_root: str, poll_interval: float, mocker, caplog ) -> None: path1 = posixpath.join(disk_root, "test_file.txt") path2 = posixpath.join(disk_root, "copy.txt") await async_client.upload(BytesIO(b"test data"), path1) class GetOperationStatusMock: def __init__(self): self.call_count_since_success = 0 async def __call__(self, *args, **kwargs) -> yadisk.types.OperationStatus: status = await yadisk.AsyncClient.get_operation_status(async_client, *args, **kwargs) if status == "success": self.call_count_since_success += 1 if self.call_count_since_success < 3: return "failed" return status mocker.patch.object(async_client, "get_operation_status", GetOperationStatusMock()) with caplog.at_level(logging.INFO, logger="yadisk"): await async_client.copy( path1, path2, force_async=True, overwrite=True, poll_interval=poll_interval ) expected_message1 = "automatic retry triggered: (1 out of 50), got AsyncOperationFailedError: Asynchronous operation failed" # noqa: E501 expected_message2 = "asynchronous operation failed, attempting to restart it" assert expected_message1 in caplog.text assert caplog.text.count(expected_message2) >= 2 assert await async_client.is_file(path2) ================================================ FILE: tests/auth_test.py ================================================ # -*- coding: utf-8 -*- import os import pytest import yadisk confirmation_code = "5320215" replay_disabled = os.environ.get("PYTHON_YADISK_REPLAY_ENABLED", "1") != "1" device_id = "test device 123" # Recording data for these tests requires human intervention # NOTE: If you re-record these tests, make sure you change the # application secret afterwards and ensure that none of the captured # tokens are valid, otherwise you may end up leaking that data @pytest.mark.skipif( replay_disabled, reason="this test has to be explicitly modified to be run outside of replay mode" ) @pytest.mark.usefixtures("record_or_replay") def test_auth(client: yadisk.Client) -> None: token = client.get_token(confirmation_code, device_id=device_id) assert client.check_token(token.access_token) assert token.refresh_token is not None refreshed_token = client.refresh_token(token.refresh_token) assert client.check_token(refreshed_token.access_token) assert token.refresh_token != refreshed_token.refresh_token assert client.revoke_token(refreshed_token.access_token).status == "ok" assert not client.check_token(refreshed_token.access_token) assert client.revoke_token(token.access_token).status == "ok" assert not client.check_token(token.access_token) @pytest.mark.skipif( replay_disabled, reason="this test has to be explicitly modified to be run outside of replay mode" ) @pytest.mark.usefixtures("record_or_replay") def test_device_code_auth(client: yadisk.Client) -> None: device_code = client.get_device_code(device_id=device_id) with pytest.raises(yadisk.exceptions.AuthorizationPendingError): client.get_token_from_device_code( device_code.device_code or "", device_id=device_id ) token = client.get_token_from_device_code( device_code.device_code or "", device_id=device_id ) assert client.check_token(token.access_token) assert client.revoke_token(token.access_token).status == "ok" assert not client.check_token(token.access_token) @pytest.mark.skipif( replay_disabled, reason="this test has to be explicitly modified to be run outside of replay mode" ) @pytest.mark.usefixtures("record_or_replay") @pytest.mark.anyio async def test_auth_async(async_client: yadisk.AsyncClient) -> None: token = await async_client.get_token(confirmation_code, device_id="test device 123") assert await async_client.check_token(token.access_token) assert token.refresh_token is not None refreshed_token = await async_client.refresh_token(token.refresh_token) assert await async_client.check_token(refreshed_token.access_token) assert (await async_client.revoke_token(refreshed_token.access_token)).status == "ok" assert not await async_client.check_token(refreshed_token.access_token) assert (await async_client.revoke_token(refreshed_token.access_token)).status == "ok" assert not await async_client.check_token(token.access_token) @pytest.mark.skipif( replay_disabled, reason="this test has to be explicitly modified to be run outside of replay mode" ) @pytest.mark.usefixtures("record_or_replay") @pytest.mark.anyio async def test_device_code_auth_async(async_client: yadisk.AsyncClient) -> None: device_code = await async_client.get_device_code(device_id=device_id) with pytest.raises(yadisk.exceptions.AuthorizationPendingError): await async_client.get_token_from_device_code( device_code.device_code or "", device_id=device_id ) token = await async_client.get_token_from_device_code( device_code.device_code or "", device_id=device_id ) assert await async_client.check_token(token.access_token) assert (await async_client.revoke_token(token.access_token)).status == "ok" assert not await async_client.check_token(token.access_token) ================================================ FILE: tests/auto_retry_test.py ================================================ # -*- coding: utf-8 -*- import pytest import yadisk @pytest.mark.anyio async def test_auto_retry() -> None: attempt_counter = 0 class CustomException(Exception): pass def attempt() -> None: nonlocal attempt_counter attempt_counter += 1 if attempt_counter == 1: raise yadisk.exceptions.RequestError("test") elif attempt_counter == 2: raise yadisk.exceptions.YaDiskConnectionError("test") elif attempt_counter == 3: raise yadisk.exceptions.InternalServerError(msg="test") elif attempt_counter == 4: raise yadisk.exceptions.RetriableYaDiskError(msg="test") elif attempt_counter == 5: raise CustomException("test") with pytest.raises(CustomException): yadisk.utils.auto_retry(attempt, n_retries=10, retry_interval=0.0) assert attempt_counter == 5 attempt_counter = 0 with pytest.raises(CustomException): await yadisk.utils.async_auto_retry(attempt, n_retries=10, retry_interval=0.0) assert attempt_counter == 5 attempt_counter = 0 with pytest.raises(yadisk.exceptions.InternalServerError): yadisk.utils.auto_retry(attempt, n_retries=2, retry_interval=0.0) assert attempt_counter == 3 attempt_counter = 0 with pytest.raises(yadisk.exceptions.InternalServerError): await yadisk.utils.async_auto_retry(attempt, n_retries=2, retry_interval=0.0) assert attempt_counter == 3 attempt_counter = 0 yadisk.utils.auto_retry(attempt, n_retries=10, retry_interval=0.0, retry_on=(CustomException,)) assert attempt_counter == 6 attempt_counter = 0 await yadisk.utils.async_auto_retry(attempt, n_retries=10, retry_interval=0.0, retry_on=(CustomException,)) assert attempt_counter == 6 @pytest.mark.anyio async def test_auto_retry_with_disable_retries() -> None: attempt_counter = 0 def attempt() -> None: nonlocal attempt_counter attempt_counter += 1 if attempt_counter == 1: raise yadisk.exceptions.RequestError("test", disable_retry=True) with pytest.raises(yadisk.exceptions.RequestError): yadisk.utils.auto_retry(attempt, n_retries=5, retry_interval=0.0) assert attempt_counter == 1 attempt_counter = 0 with pytest.raises(yadisk.exceptions.RequestError): await yadisk.utils.async_auto_retry(attempt, n_retries=5, retry_interval=0.0) assert attempt_counter == 1 @pytest.mark.anyio async def test_auto_retry_without_errors() -> None: attempt_counter = 0 def attempt() -> None: nonlocal attempt_counter attempt_counter += 1 yadisk.utils.auto_retry(attempt, n_retries=5, retry_interval=0.0) assert attempt_counter == 1 await yadisk.utils.async_auto_retry(attempt, n_retries=5, retry_interval=0.0) assert attempt_counter == 2 ================================================ FILE: tests/client_test.py ================================================ # -*- coding: utf-8 -*- import yadisk from yadisk._common import is_operation_link, ensure_path_has_scheme, remove_path_scheme from yadisk._api import GetOperationStatusRequest import hashlib import logging import os import platform import posixpath import sys import tempfile from io import BytesIO from typing import Any import pytest __all__ = ["TestClient"] replay_disabled = os.environ.get("PYTHON_YADISK_REPLAY_ENABLED", "1") != "1" recording_enabled = os.environ.get("PYTHON_YADISK_RECORDING_ENABLED", "0") == "1" def open_tmpfile(mode): if platform.system() == "Windows" and sys.version_info >= (3, 12): # This is needed in order to work on Windows return tempfile.NamedTemporaryFile(mode, delete_on_close=False) else: return tempfile.NamedTemporaryFile(mode) class TestClient: @pytest.mark.skipif( replay_disabled, reason="this test is not meant to run outside of replay mode, it must be modified first" ) @pytest.mark.usefixtures("record_or_replay") def test_get_disk_info(self, client: yadisk.Client) -> None: disk_info = client.get_disk_info() assert isinstance(disk_info, yadisk.objects.DiskInfoObject) assert disk_info.user is not None # If you re-record this test, you'll have to put your account data here assert disk_info.user.login == "ivknv" assert disk_info.field("reg_time").year == 2017 @pytest.mark.usefixtures("sync_client_test") def test_get_meta(self, client: yadisk.Client, disk_root: str) -> None: resource = client.get_meta(disk_root) assert isinstance(resource, yadisk.objects.ResourceObject) assert resource.type == "dir" assert resource.name == posixpath.split(disk_root)[1] # Test the convenience method as well assert resource.get_meta(".").resource_id == resource.resource_id @pytest.mark.usefixtures("sync_client_test") def test_listdir(self, client: yadisk.Client, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] for name in names: path = posixpath.join(disk_root, name) client.mkdir(path) contents = list(client.listdir(disk_root)) result = [i.name for i in contents] assert result == names # Test the convenience method as well for dir in contents: assert list(dir.listdir(".")) == [] @pytest.mark.usefixtures("sync_client_test") def test_listdir_fields(self, client: yadisk.Client, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] for name in names: path = posixpath.join(disk_root, name) client.mkdir(path) result = [(i.name, i.type, i.file) for i in client.listdir(disk_root, fields=["name", "type"])] assert result == [(name, "dir", None) for name in names] @pytest.mark.usefixtures("sync_client_test") def test_listdir_on_file(self, client: yadisk.Client, disk_root: str) -> None: buf = BytesIO() buf.write(b"0" * 1000) buf.seek(0) path = posixpath.join(disk_root, "zeroes.txt") client.upload(buf, path) with pytest.raises(yadisk.exceptions.WrongResourceTypeError): list(client.listdir(path)) @pytest.mark.usefixtures("sync_client_test") def test_listdir_with_limits(self, client: yadisk.Client, disk_root: str) -> None: names = ["dir1", "dir2", "dir3"] for name in names: path = posixpath.join(disk_root, name) client.mkdir(path) result = [i.name for i in client.listdir(disk_root, limit=1)] assert result == names @pytest.mark.usefixtures("sync_client_test") def test_listdir_with_max_items(self, client: yadisk.Client, disk_root: str) -> None: names = ["dir1", "dir2", "dir3", "dir4", "dir5", "dir6"] for name in names: path = posixpath.join(disk_root, name) client.mkdir(path) results = [ [i.name for i in client.listdir(disk_root, max_items=0)], [i.name for i in client.listdir(disk_root, max_items=1, limit=1)], [i.name for i in client.listdir(disk_root, max_items=2, limit=1)], [i.name for i in client.listdir(disk_root, max_items=3, limit=1)], [i.name for i in client.listdir(disk_root, max_items=10, limit=1)], ] expected = [ [], names[:1], names[:2], names[:3], names[:10], ] assert results == expected @pytest.mark.usefixtures("sync_client_test") def test_mkdir_and_exists(self, client: yadisk.Client, disk_root: str) -> None: names = ["dir1", "dir2"] for name in names: path = posixpath.join(disk_root, name) client.mkdir(path) assert client.exists(path) client.remove(path, permanently=True) assert not client.exists(path) def _test_makedirs(self, client: yadisk.Client, disk_root: str) -> None: parent1 = posixpath.join(disk_root, "parent1") parent2 = posixpath.join(parent1, "parent2") parent3 = posixpath.join(parent2, "parent3") path1 = posixpath.join(parent3, "leaf_directory") path2 = posixpath.join(parent3, "another_directory") path3 = posixpath.join(disk_root, "directory") for path in [parent1, parent2, parent3, path1, path2, path3]: assert not client.exists(path) client.makedirs(path1) assert client.is_dir(path1) with pytest.raises(yadisk.exceptions.DirectoryExistsError): client.makedirs(path1) client.makedirs(path2) assert client.is_dir(path2) client.makedirs(path3) assert client.is_dir(path3) @pytest.mark.usefixtures("sync_client_test") def test_makedirs_without_scheme(self, client: yadisk.Client, disk_root: str) -> None: self._test_makedirs(client, remove_path_scheme(disk_root)[1]) @pytest.mark.usefixtures("sync_client_test") def test_makedirs_with_scheme(self, client: yadisk.Client, disk_root: str) -> None: self._test_makedirs(client, ensure_path_has_scheme(disk_root, "disk")) @pytest.mark.skipif( platform.system() == "Windows" and sys.version_info < (3, 12), reason="won't work on Windows with Python < 3.12" ) @pytest.mark.usefixtures("sync_client_test") def test_upload_and_download(self, client: yadisk.Client, disk_root: str) -> None: with open_tmpfile("w+b") as buf1, open_tmpfile("w+b") as buf2: buf1.write(b"0" * 1024**2) buf1.seek(0) path = posixpath.join(disk_root, "zeroes.txt") client.upload(buf1.name, path, overwrite=True) client.download(path, buf2.name) buf1.seek(0) buf2.seek(0) assert buf1.read() == buf2.read() @pytest.mark.usefixtures("sync_client_test") def test_check_token(self, client: yadisk.Client, disk_root: str) -> None: assert client.check_token() assert not client.check_token("asdasdasd") @pytest.mark.usefixtures("sync_client_test") def test_permanent_remove(self, client: yadisk.Client, disk_root: str) -> None: path = posixpath.join(disk_root, "dir") origin_path = "disk:" + path client.mkdir(path) client.remove(path, permanently=True) for i in client.trash_listdir("/"): assert i.origin_path != origin_path @pytest.mark.usefixtures("sync_client_test") def test_restore_trash(self, client: yadisk.Client, disk_root: str) -> None: path = posixpath.join(disk_root, "dir") origin_path = "disk:" + path client.mkdir(path) client.remove(path) trash_path: Any = None for i in client.trash_listdir("/"): if i.origin_path == origin_path: assert i.exists() assert i.is_dir() assert not i.is_file() trash_path = i.path break assert trash_path is not None client.restore_trash(trash_path, path) assert client.exists(path) @pytest.mark.usefixtures("sync_client_test") def test_move(self, client: yadisk.Client, disk_root: str) -> None: path1 = posixpath.join(disk_root, "dir1") path2 = posixpath.join(disk_root, "dir2") client.mkdir(path1) client.move(path1, path2) assert client.exists(path2) @pytest.mark.usefixtures("sync_client_test") def test_rename(self, client: yadisk.Client, disk_root: str) -> None: filename1 = "dir1" filename2 = "dir2/" path1 = posixpath.join(disk_root, filename1) path2 = posixpath.join(disk_root, filename2) assert not client.exists(path1) assert not client.exists(path2) dir = client.mkdir(path1) assert dir.is_dir() rename_result = dir.rename(filename2) assert isinstance(rename_result, yadisk.objects.SyncResourceLinkObject) dir = rename_result assert not client.exists(path1) assert dir.is_dir() for bad_filename in ("", ".", "..", "/", "something/else"): with pytest.raises(ValueError): dir.rename(bad_filename) def test_rename_edgecases(self, client: yadisk.Client, mocker) -> None: # Test a few edgecases, make sure the destination paths are correct # Path schemes must be preserved dst_paths = [] def mock_move(src_path: str, dst_path: str, **kwargs) -> None: # Store the destination path for later checking dst_paths.append(dst_path) mocker.patch.object(client, "move", mock_move) with pytest.raises(ValueError): client.rename("", "impossible") with pytest.raises(ValueError): client.rename("/", "impossible") with pytest.raises(ValueError): client.rename("////", "impossible") with pytest.raises(ValueError): client.rename("disk:/", "impossible") with pytest.raises(ValueError): client.rename("app:/", "another_directory") client.rename("disk:", "not_a_scheme") client.rename("disk:/asd.txt", "renamed.txt") client.rename("asd.txt", "renamed.txt") client.rename("disk:/directory/file1.txt", "renamed_file.txt") client.rename("disk:/directory/", "renamed_dir") assert dst_paths == [ "not_a_scheme", "disk:/renamed.txt", "renamed.txt", "disk:/directory/renamed_file.txt", "disk:/renamed_dir" ] @pytest.mark.usefixtures("sync_client_test") def test_remove_trash(self, client: yadisk.Client, disk_root: str) -> None: path = posixpath.join(disk_root, "dir-to-remove") origin_path = "disk:" + path client.mkdir(path) client.remove(path) trash_path: Any = None for i in client.trash_listdir("/"): if i.origin_path == origin_path: trash_path = i.path break assert trash_path is not None client.remove_trash(trash_path) assert not client.trash_exists(trash_path) @pytest.mark.usefixtures("sync_client_test") def test_publish_unpublish(self, client: yadisk.Client, disk_root: str) -> None: client.publish(disk_root) meta = client.get_meta(disk_root) assert meta.public_url is not None assert meta.public_key is not None public_key, public_url = meta.public_key, meta.public_url assert client.is_public_dir(public_key) assert client.is_public_dir(public_url) assert not client.is_public_file(public_key) assert not client.is_public_file(public_url) client.unpublish(disk_root) meta = client.get_meta(disk_root) assert meta.public_url is None assert meta.public_key is None assert not client.is_public_dir(public_key) assert not client.is_public_dir(public_url) assert not client.is_public_file(public_key) assert not client.is_public_file(public_url) @pytest.mark.usefixtures("sync_client_test") def test_public_settings(self, client: yadisk.Client, disk_root: str) -> None: client.publish(disk_root) public_url = client.get_meta(disk_root) @ "public_url" # First, set a password client.update_public_settings(disk_root, { "password": "1234" }) with pytest.raises(yadisk.exceptions.PasswordRequiredError): client.get_public_download_link(public_url) # We will make the public resource link expire by updating the settings available_until = 1 client.update_public_settings(disk_root, { "password": "1234", "available_until": available_until }) # As of writing, the endpoint returns only "available_until" settings = client.get_public_settings(disk_root) assert settings.available_until == available_until # At this point the public link should no longer be valid with pytest.raises(yadisk.exceptions.PathNotFoundError): client.get_public_meta(public_url) client.unpublish(disk_root) @pytest.mark.usefixtures("sync_client_test") def test_patch(self, client: yadisk.Client, disk_root: str) -> None: directory = client.patch(disk_root, {"test_property": "I'm a value!"}) assert directory.custom_properties == {"test_property": "I'm a value!"} directory = client.patch(disk_root, {"number": 42}) assert directory.custom_properties == {"test_property": "I'm a value!", "number": 42} directory = directory.patch({"test_property": None, "number": None}) assert directory.custom_properties is None @pytest.mark.usefixtures("sync_client_test") def test_issue7(self, client: yadisk.Client, disk_root: str) -> None: # See https://github.com/ivknv/yadisk/issues/7 try: list(client.public_listdir("any value here", path="any value here")) except yadisk.exceptions.PathNotFoundError: pass def test_is_operation_link(self) -> None: assert is_operation_link("https://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link("http://cloud-api.yandex.net/v1/disk/operations/123asd") assert not is_operation_link("https://cloud-api.yandex.net/v1/disk/operation/1283718") assert not is_operation_link("https://asd8iaysd89asdgiu") assert not is_operation_link("http://asd8iaysd89asdgiu") def test_get_operation_status_request_url(self, client: yadisk.Client, disk_root: str) -> None: request = GetOperationStatusRequest( client.session, "https://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link(request.url) request = GetOperationStatusRequest( client.session, "http://cloud-api.yandex.net/v1/disk/operations/123asd") assert is_operation_link(request.url) assert request.url.startswith("https://") request = GetOperationStatusRequest( client.session, "https://asd8iaysd89asdgiu") assert is_operation_link(request.url) assert request.url.startswith("https://") def test_ensure_path_has_scheme(self) -> None: # See https://github.com/ivknv/yadisk/issues/26 for more details assert ensure_path_has_scheme("disk:") == "disk:/disk:" assert ensure_path_has_scheme("trash:", default_scheme="trash") == "trash:/trash:" assert ensure_path_has_scheme("/asd:123") == "disk:/asd:123" assert ensure_path_has_scheme("/asd:123", "trash") == "trash:/asd:123" assert ensure_path_has_scheme("example/path") == "disk:/example/path" assert ensure_path_has_scheme("app:/test") == "app:/test" @pytest.mark.usefixtures("sync_client_test") def test_upload_download_non_seekable( self, client: yadisk.Client, disk_root: str, mocker ) -> None: # It should be possible to upload/download non-seekable file objects (such as sys.stdin/sys.stdout) # See https://github.com/ivknv/yadisk/pull/31 for more details def seek(*args, **kwargs): raise NotImplementedError test_input_file = BytesIO(b"0" * 1000) mocker.patch.object(test_input_file, "seekable", lambda: False) mocker.patch.object(test_input_file, "seek", seek) test_input_file.seek = seek # type: ignore dst_path = posixpath.join(disk_root, "zeroes.txt") client.upload(test_input_file, dst_path, n_retries=50) test_output_file = BytesIO() mocker.patch.object(test_output_file, "seekable", lambda: False) mocker.patch.object(test_output_file, "seek", seek) client.download(dst_path, test_output_file, n_retries=50) assert test_input_file.tell() == 1000 assert test_output_file.tell() == 1000 @pytest.mark.usefixtures("sync_client_test") def test_upload_generator(self, client: yadisk.Client, disk_root: str) -> None: data = b"0" * 1000 def payload(): yield data[:500] yield data[500:] dst_path = posixpath.join(disk_root, "zeroes.txt") output = BytesIO() client.upload(payload, dst_path).download(output) output.seek(0) assert output.read() == data @pytest.mark.usefixtures("sync_client_test") def test_copy( self, client: yadisk.Client, disk_root: str, poll_interval: float ) -> None: dir = client.mkdir(posixpath.join(disk_root, "directory_to_copy")) dir.upload(BytesIO(b"example text"), "file.txt") dir.mkdir("nested directory 1") dir.mkdir("nested directory 2") dst_path = posixpath.join(disk_root, "directory_copy") dir.copy(dst_path, poll_interval=poll_interval) copy_info = client.get_meta(dst_path) assert copy_info.embedded is not None assert copy_info.embedded.items is not None contents = sorted([(resource.type, resource.name) for resource in copy_info.embedded.items]) expected_contents = [ ("dir", "nested directory 1"), ("dir", "nested directory 2"), ("file", "file.txt"), ] assert copy_info.type == "dir" assert contents == expected_contents @pytest.mark.usefixtures("sync_client_test") def test_save_to_disk( self, client: yadisk.Client, disk_root: str, poll_interval: float ) -> None: test_contents = b"test file contents" public_file_path = posixpath.join(disk_root, "public_file.txt") client.upload(BytesIO(test_contents), public_file_path) client.publish(public_file_path) public_file_info = client.get_meta(public_file_path) assert public_file_info.public_url is not None client.save_to_disk( public_file_info.public_url, name="saved_public_file.txt", save_path=disk_root, poll_interval=poll_interval ) saved_file_path = posixpath.join(disk_root, "saved_public_file.txt") saved_file_info = client.get_meta(saved_file_path) assert saved_file_info.md5 == hashlib.md5(test_contents).hexdigest() == public_file_info.md5 @pytest.mark.usefixtures("sync_client_test") def test_upload_url( self, client: yadisk.Client, disk_root: str, poll_interval: float ) -> None: test_contents = b"test file contents" file_path = posixpath.join(disk_root, "example_file.txt") dst_path = posixpath.join(disk_root, "uploaded_from_url.txt") client.upload(BytesIO(test_contents), file_path) download_link = client.get_download_link(file_path) client.upload_url(download_link, dst_path, poll_interval=poll_interval) dst_file_info = client.get_meta(dst_path) assert dst_file_info.md5 == hashlib.md5(test_contents).hexdigest() @pytest.mark.usefixtures("record_or_replay") def test_none_args(self, client: yadisk.Client) -> None: # Passing headers=None, _args=None should not trigger any errors assert client.check_token( headers=None, requests_args=None, httpx_args=None, curl_options=None ) link = "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA%3D%3D?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a" # This is worth testing on download_by_link() as well, since it has # slightly different logic with pytest.raises((yadisk.exceptions.GoneError, yadisk.exceptions.InternalServerError)): client.download_by_link( link, BytesIO(), headers=None, requests_args=None, httpx_args=None, curl_options=None ) @pytest.mark.usefixtures("record_or_replay") def test_get_files(self, client: yadisk.Client) -> None: files = list(client.get_files(max_items=25)) assert len(files) <= 25 for file in files: assert file.is_file() offset = 15 files_with_offset = list(client.get_files(max_items=10, offset=offset)) assert len(files_with_offset) <= 10 for file in files_with_offset: assert file.is_file() assert [file @ "path" for file in files[offset:]] == [file @ "path" for file in files_with_offset] assert len(list(client.get_files(max_items=10, limit=3))) <= 10 @pytest.mark.usefixtures("sync_client_test") def test_get_last_uploaded(self, client: yadisk.Client, disk_root: str) -> None: files_to_upload = [ ("first.txt", b"example content"), ("second.txt", b"this is the second file"), ("third.txt", b"this is the third file") ] for filename, content in files_to_upload: client.upload(BytesIO(content), posixpath.join(disk_root, filename)) for uploaded_file, (filename, content) in zip(client.get_last_uploaded(limit=3), files_to_upload[::-1]): assert uploaded_file.path == "disk:" + posixpath.join(disk_root, filename) output = BytesIO() uploaded_file.download(output) output.seek(0) assert output.read() == content @pytest.mark.usefixtures("sync_client_test") def test_public_listdir(self, client: yadisk.Client, disk_root: str) -> None: directory = client.mkdir(posixpath.join(disk_root, "public")) directory.publish() public_directory = directory.get_meta() assert public_directory.is_dir() assert public_directory.public_key is not None assert client.is_public_dir(public_directory.public_key) files_to_upload = [ ("first.txt", b"example content"), ("second.txt", b"this is the second file"), ("third.txt", b"this is the third file") ] for filename, content in files_to_upload: public_directory.upload(BytesIO(content), filename).publish() public_files = list(public_directory.public_listdir(sort="modified")) for file, (filename, content) in zip(public_files, files_to_upload): assert file.name == filename assert client.is_public_file(public_directory.public_key, path=file.path) output = BytesIO() client.download_public(public_directory.public_key, output, path=file.path) output.seek(0) assert output.read() == content public_directory.unpublish() assert not client.is_public_dir(public_directory.public_key) @pytest.mark.skipif( recording_enabled, reason="before recording this test, ensure it's not a privacy concern for you" ) @pytest.mark.usefixtures("record_or_replay") def test_get_public_resources(self, client: yadisk.Client) -> None: first_10 = list(client.get_all_public_resources(max_items=10, limit=3)) with_offset = list(client.get_all_public_resources(max_items=5, offset=5, limit=2)) for public_resource in first_10 + with_offset: assert client.public_exists(public_resource @ "public_key") assert [i.path for i in first_10[5:]] == [i.path for i in with_offset] @pytest.mark.usefixtures("sync_client_test") def test_get_upload_link_object(self, client: yadisk.Client, disk_root: str) -> None: directory = client.get_meta(disk_root) upload_link = directory.get_upload_link_object("test.txt") assert client.get_operation_status(upload_link @ "operation_id") == "in-progress" client.upload_by_link(BytesIO(b"test file"), upload_link @ "href") assert client.get_operation_status(upload_link @ "operation_id") == "success" @pytest.mark.usefixtures("record_or_replay") def test_streaming_requests(self, client: yadisk.Client) -> None: # stream=True should not break requests assert client.check_token(stream=True) assert len(client.get_last_uploaded(stream=True, limit=10, fields=["items.type"])) == 10 @pytest.mark.usefixtures("sync_client_test") def test_wait_for_operation( self, client: yadisk.Client, disk_root: str, poll_interval: float, mocker ) -> None: directory = client.mkdir("directory") operation = directory.remove(permanently=True, force_async=True, wait=False) with pytest.raises(yadisk.exceptions.AsyncOperationPollingTimeoutError): operation.wait(poll_timeout=0.0) operation.wait(poll_interval=poll_interval) assert operation.get_status() == "success" # Mock get_operation_status() to trigger an AsyncOperationFailedError mocker.patch.object(client, "get_operation_status", lambda *args, **kwargs: "failed") with pytest.raises(yadisk.exceptions.AsyncOperationFailedError): operation.wait(poll_interval=poll_interval) @pytest.mark.usefixtures("record_or_replay") def test_download_by_link_error(self, client: yadisk.Client) -> None: # Make sure that if the server returns a bad status code (e.g. 500), # download_by_link() will not write the response into the file # Sample link, should either produce a 500 or 410 error # In case of error it outputs an HTML page, rather than a file link = "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA%3D%3D?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a" output = BytesIO() with pytest.raises((yadisk.exceptions.GoneError, yadisk.exceptions.InternalServerError)): client.download_by_link(link, output, n_retries=5) output.seek(0) assert output.read() == b"" @pytest.mark.usefixtures("sync_client_test") def test_operation_error_triggers_retry( self, client: yadisk.Client, disk_root: str, poll_interval: float, mocker, caplog ) -> None: path1 = posixpath.join(disk_root, "test_file.txt") path2 = posixpath.join(disk_root, "copy.txt") client.upload(BytesIO(b"test data"), path1) class GetOperationStatusMock: def __init__(self): self.call_count_since_success = 0 def __call__(self, *args, **kwargs) -> yadisk.types.OperationStatus: status = yadisk.Client.get_operation_status(client, *args, **kwargs) if status == "success": self.call_count_since_success += 1 if self.call_count_since_success < 3: return "failed" return status mocker.patch.object(client, "get_operation_status", GetOperationStatusMock()) with caplog.at_level(logging.INFO, logger="yadisk"): client.copy( path1, path2, force_async=True, overwrite=True, poll_interval=poll_interval ) expected_message1 = "automatic retry triggered: (1 out of 50), got AsyncOperationFailedError: Asynchronous operation failed" # noqa: E501 expected_message2 = "asynchronous operation failed, attempting to restart it" assert expected_message1 in caplog.text assert caplog.text.count(expected_message2) >= 2 assert client.is_file(path2) ================================================ FILE: tests/conftest.py ================================================ # -*- coding: utf-8 -*- import inspect import posixpath import os from .test_session import TestSession, AsyncTestSession from .disk_gateway import BackgroundGatewayThread import yadisk from yadisk._typing_compat import Generator, AsyncGenerator import pytest @pytest.fixture(scope="package") def gateway_host() -> str: return os.environ.get("PYTHON_YADISK_GATEWAY_HOST", "0.0.0.0") @pytest.fixture(scope="package") def gateway_port() -> int: return int(os.environ.get("PYTHON_YADISK_GATEWAY_PORT", "8080")) @pytest.fixture(scope="package") def gateway(gateway_host: str, gateway_port: int) -> Generator[BackgroundGatewayThread, None, None]: gateway = BackgroundGatewayThread(gateway_host, gateway_port) gateway.start() # Make sure the actual API token won't be exposed in the recorded requests gateway.client.update_token_map({ os.environ["PYTHON_YADISK_APP_TOKEN"]: "supposedly_valid_token" }) yield gateway gateway.stop() @pytest.fixture def disk_root(request: pytest.FixtureRequest) -> str: path = os.environ["PYTHON_YADISK_TEST_ROOT"] # Get rid of 'disk:/' prefix in the path and make it start with a slash # for consistency if path.startswith("disk:/"): path = posixpath.join("/", path[len("disk:/"):]) if len([i for i in path.split("/") if i]) < 1: raise ValueError("PYTHON_YADISK_TEST_ROOT set to /") test_name = request.function.__name__ return posixpath.join(path, test_name) @pytest.fixture() def disk_cleanup( disk_root: str, client: yadisk.Client, poll_interval: float ) -> Generator[None, None, None]: try: client.mkdir(disk_root) except yadisk.exceptions.DirectoryExistsError: pass except yadisk.exceptions.ParentNotFoundError: client.mkdir(posixpath.split(disk_root)[0]) client.mkdir(disk_root) yield try: client.remove( disk_root, permanently=True, poll_interval=poll_interval ) except yadisk.utils._UnexpectedRequestError: pass @pytest.fixture() async def async_disk_cleanup( disk_root: str, async_client: yadisk.AsyncClient, poll_interval: float ) -> AsyncGenerator[None, None]: try: await async_client.mkdir(disk_root) except yadisk.exceptions.DirectoryExistsError: pass except yadisk.exceptions.ParentNotFoundError: await async_client.mkdir(posixpath.split(disk_root)[0]) await async_client.mkdir(disk_root) yield try: await async_client.remove( disk_root, permanently=True, poll_interval=poll_interval ) except yadisk.utils._UnexpectedRequestError: pass @pytest.fixture(scope="package") def replay_enabled() -> bool: return os.environ.get("PYTHON_YADISK_REPLAY_ENABLED", "1") == "1" @pytest.fixture(scope="package") def recording_enabled() -> bool: return os.environ.get("PYTHON_YADISK_RECORDING_ENABLED", "0") == "1" @pytest.fixture def record_or_replay( request: pytest.FixtureRequest, gateway: BackgroundGatewayThread, recording_enabled: bool, replay_enabled: bool ) -> Generator[None, None, None]: if inspect.iscoroutinefunction(request.function): directory = os.path.join("tests", "recorded", "async") else: directory = os.path.join("tests", "recorded", "sync") test_name = request.function.__name__ if recording_enabled and replay_enabled: raise ValueError("Both recording and replay enabled at the same time") if recording_enabled: os.makedirs(directory, exist_ok=True) with gateway.client.record_as(os.path.join(directory, f"{test_name}.json")): yield elif replay_enabled: with gateway.client.replay(os.path.join(directory, f"{test_name}.json")): yield else: yield @pytest.fixture(scope="class", params=["requests", "httpx", "pycurl"]) def client( request: pytest.FixtureRequest, gateway_host: str, gateway_port: int, replay_enabled: bool, recording_enabled: bool ) -> Generator[yadisk.Client, None, None]: base_gateway_url = f"http://{gateway_host}:{gateway_port}" test_session: yadisk.Session if replay_enabled: test_session = TestSession( yadisk.import_session(request.param)(), disk_base_url=f"{base_gateway_url}/replay/response/disk", auth_base_url=f"{base_gateway_url}/replay/response/auth", download_base_url=f"{base_gateway_url}/replay/response/download", upload_base_url=f"{base_gateway_url}/replay/response/upload" ) elif recording_enabled: test_session = TestSession( yadisk.import_session(request.param)(), disk_base_url=f"{base_gateway_url}/forward/disk", auth_base_url=f"{base_gateway_url}/forward/auth", download_base_url=f"{base_gateway_url}/forward/download", upload_base_url=f"{base_gateway_url}/forward/upload" ) else: test_session = yadisk.import_session(request.param)() with yadisk.Client( os.environ["PYTHON_YADISK_APP_ID"], os.environ["PYTHON_YADISK_APP_SECRET"], os.environ["PYTHON_YADISK_APP_TOKEN"], session=test_session ) as client: client.default_args.update({ "n_retries": 50, "retry_interval": 0.0 if replay_enabled else 3.0, "timeout": (30.0, 60.0) }) yield client @pytest.fixture(scope="class", params=["aiohttp", "httpx"]) async def async_client( request: pytest.FixtureRequest, gateway_host: str, gateway_port: int, replay_enabled: bool, recording_enabled: bool ) -> AsyncGenerator[yadisk.AsyncClient, None]: base_gateway_url = f"http://{gateway_host}:{gateway_port}" test_session: yadisk.AsyncSession if replay_enabled: test_session = AsyncTestSession( yadisk.import_async_session(request.param)(), disk_base_url=f"{base_gateway_url}/replay/response/disk", auth_base_url=f"{base_gateway_url}/replay/response/auth", download_base_url=f"{base_gateway_url}/replay/response/download", upload_base_url=f"{base_gateway_url}/replay/response/upload" ) elif recording_enabled: test_session = AsyncTestSession( yadisk.import_async_session(request.param)(), disk_base_url=f"{base_gateway_url}/forward/disk", auth_base_url=f"{base_gateway_url}/forward/auth", download_base_url=f"{base_gateway_url}/forward/download", upload_base_url=f"{base_gateway_url}/forward/upload" ) else: test_session = yadisk.import_async_session(request.param)() async with yadisk.AsyncClient( os.environ["PYTHON_YADISK_APP_ID"], os.environ["PYTHON_YADISK_APP_SECRET"], os.environ["PYTHON_YADISK_APP_TOKEN"], session=test_session ) as async_client: async_client.default_args.update({ "n_retries": 50, "retry_interval": 0.0 if replay_enabled else 3.0, "timeout": (30.0, 60.0) }) yield async_client @pytest.fixture(scope="package") def anyio_backend() -> str: return "asyncio" @pytest.fixture def sync_client_test(record_or_replay, disk_cleanup) -> None: pass @pytest.fixture def async_client_test(record_or_replay, async_disk_cleanup) -> None: pass @pytest.fixture def poll_interval(replay_enabled: bool) -> float: return 0.0 if replay_enabled else 1.0 ================================================ FILE: tests/disk_gateway.py ================================================ # -*- coding: utf-8 -*- import argparse import threading import time from typing import Any from urllib.parse import urlencode, quote, quote_plus import base64 import asyncio import zlib import contextlib import json import httpx from starlette.applications import Starlette from starlette.responses import JSONResponse, Response from starlette.requests import Request from starlette.routing import Route import uvicorn __all__ = [ "BackgroundGatewayThread", "DiskGateway", "DiskGatewayClient", "main" ] YADISK_BASE_URL = "https://cloud-api.yandex.net" AUTH_BASE_URL = "https://oauth.yandex.ru" DOWNLOAD_BASE_URL = "https://downloader.disk.yandex.ru" RELEVANT_REQUEST_HEADERS = ["content-type", "connection", "authorization"] RELEVANT_RESPONSE_HEADERS = ["content-type", "content-length"] def get_upload_base_url(subdomain: str) -> str: return f"https://{subdomain}.disk.yandex.net:443" def select_keys(d, keys): return {key: d[key] for key in keys if key in d} def serialize_content(content: bytes) -> str: return base64.b64encode(zlib.compress(content)).decode("utf8") def deserialize_content(content: str) -> bytes: return zlib.decompress(base64.b64decode(content)) def serialize_request(request: httpx.Request, response: httpx.Response): return { "method": request.method, "url": str(request.url), "headers": select_keys(request.headers, RELEVANT_REQUEST_HEADERS), "content": serialize_content(request.content), "response": serialize_response(response) } def deserialize_request(request: dict): return ( httpx.Request( request["method"], request["url"], headers=request["headers"], content=deserialize_content(request["content"]) ), deserialize_response(request["response"]) ) def deserialize_response(response: dict) -> httpx.Response: return httpx.Response( status_code=response["status_code"], headers=response["headers"], content=deserialize_content(response["content"]) ) def serialize_response(response: httpx.Response): return { "status_code": response.status_code, "headers": select_keys(response.headers, RELEVANT_RESPONSE_HEADERS), "content": serialize_content(response.content) } class UnexpectedRequestResponse(JSONResponse): def __init__(self, message: str) -> None: super().__init__( { "error": "_UnexpectedRequestError", "description": "unexpected request", "message": message }, status_code=499 ) class DiskGateway: def __init__(self): self.routes = [ Route( "/forward/disk", endpoint=self.disk_gateway, methods=["GET", "POST", "PUT", "DELETE", "PATCH"] ), Route( "/forward/disk/{path:path}", endpoint=self.disk_gateway, methods=["GET", "POST", "PUT", "DELETE", "PATCH"] ), Route("/forward/auth", endpoint=self.auth_gateway, methods=["POST"]), Route("/forward/auth/{path:path}", endpoint=self.auth_gateway, methods=["POST"]), Route("/forward/download", endpoint=self.download_gateway, methods=["GET"]), Route("/forward/download/{path:path}", endpoint=self.download_gateway, methods=["GET"]), Route( "/forward/upload/{subdomain}", endpoint=self.upload_gateway, methods=["PUT"] ), Route( "/forward/upload/{subdomain}/{path:path}", endpoint=self.upload_gateway, methods=["PUT"] ), Route("/record/start", endpoint=self.start_recording, methods=["POST"]), Route("/record/stop", endpoint=self.stop_recording, methods=["POST"]), Route("/record/clear", endpoint=self.clear_recorded_requests, methods=["POST"]), Route("/record/json", endpoint=self.dump_recorded_requests, methods=["GET"]), Route("/replay/set/{index:int}", endpoint=self.set_replay_index, methods=["POST"]), Route("/replay/set", endpoint=self.set_replay, methods=["POST"]), Route( "/replay/response/disk", endpoint=self.disk_replay, methods=["GET", "POST", "PUT", "DELETE", "PATCH"] ), Route( "/replay/response/disk/{path:path}", endpoint=self.disk_replay, methods=["GET", "POST", "PUT", "DELETE", "PATCH"] ), Route("/replay/response/auth", endpoint=self.auth_replay, methods=["POST"]), Route("/replay/response/auth/{path:path}", endpoint=self.auth_replay, methods=["POST"]), Route("/replay/response/download", endpoint=self.download_replay, methods=["GET"]), Route("/replay/response/download/{path:path}", endpoint=self.download_replay, methods=["GET"]), Route( "/replay/response/upload/{subdomain}", endpoint=self.upload_replay, methods=["PUT"] ), Route( "/replay/response/upload/{subdomain}/{path:path}", endpoint=self.upload_replay, methods=["PUT"] ), Route("/status", endpoint=self.check_status, methods=["GET"]), Route("/tokens/update", endpoint=self.update_token_map, methods=["POST"]), Route("/tokens/clear", endpoint=self.clear_token_map, methods=["POST"]) ] @contextlib.asynccontextmanager async def lifespan(_: Starlette): async with self.client: yield self.app = Starlette(debug=True, routes=self.routes, lifespan=lifespan) self.client = httpx.AsyncClient() self.recorded_requests = [] self.recording_enabled = False self.current_request_index = 0 self.server_task = None # This is used to substitute real OAuth token values for fake ones to # not expose them # Keys are actual OAuth tokens that will be sent to the Yandex.Disk API, # values are made up values that will be put in the recorded requests self.tokens = {} async def on_shutdown(self): await self.client.aclose() async def update_token_map(self, request: Request): js = await request.json() # We expect a JSON object like {"real token": "token substitute"} if not isinstance(js, dict): return Response(status_code=422) # This doesn't look thread-safe, but it's not important for testing anyway self.tokens.update(js) return Response(status_code=204) async def clear_token_map(self, request: Request): self.tokens.clear() return Response(status_code=204) async def forward_request(self, request: Request, base_url: str): path: str = request.path_params.get("path", "") content: bytes = await request.body() authorization_header = request.headers.get("authorization", "") _, _, real_token = authorization_header.rpartition(" ") test_token = self.tokens.get(real_token, real_token) outgoing_request = httpx.Request( request.method, f"{base_url}/{path}", params=request.query_params, content=content, headers=select_keys(request.headers, RELEVANT_REQUEST_HEADERS) ) server_response = await self.client.send(outgoing_request, follow_redirects=True) response = Response( content=server_response.content, status_code=server_response.status_code ) if "content-type" in server_response.headers: response.headers["Content-Type"] = server_response.headers["content-type"] if self.recording_enabled: # Substitute the Authorization header to hide the OAuth token if test_token: outgoing_request.headers["authorization"] = f"OAuth {test_token}" else: outgoing_request.headers.pop("authorization", None) self.recorded_requests.append(serialize_request(outgoing_request, server_response)) return response async def replay_response(self, request: Request, base_url: str): try: serialized_request = self.recorded_requests[self.current_request_index] except IndexError: return UnexpectedRequestResponse("did not expect any more requests") path = request.path_params.get("path", "") content: bytes = await request.body() headers = select_keys(request.headers, RELEVANT_REQUEST_HEADERS) # Substitute the real token for the test one # Recorded requests contain a test OAuth token instead of the real one authorization_header = request.headers.get("authorization", "") _, _, real_token = authorization_header.rpartition(" ") test_token = self.tokens.get(real_token, real_token) if test_token: headers["authorization"] = f"OAuth {test_token}" expected_request, expected_response = deserialize_request(serialized_request) url_without_params = f"{base_url}/{path}" if request.query_params: url = url_without_params + "?" + urlencode(request.query_params, quote_via=quote) else: url = url_without_params if url != expected_request.url: # Try alternate urlencode method url = url_without_params + "?" + urlencode(request.query_params, quote_via=quote_plus) return UnexpectedRequestResponse( f"requests's URL doesn't match. Expected URL: {expected_request.url}, got: {url}" ) expected_headers = select_keys(expected_request.headers, RELEVANT_REQUEST_HEADERS) for key, value in expected_headers.items(): key = key.lower() if key not in headers: return UnexpectedRequestResponse(f"request is missing header {key}: {value}") if headers[key] != value: return UnexpectedRequestResponse( f"requests's header doesn't match. Expected header: {key}: {value}, got: {key}: {headers[key]}" ) for key, value in headers.items(): key = key.lower() if key not in expected_headers: return UnexpectedRequestResponse(f"got unexpected header {key}: {value}") if expected_headers[key] != value: return UnexpectedRequestResponse( f"requests's header doesn't match. Expected header: {key}: {headers[key]}, got: {key}: {value}" ) if url != expected_request.url: return UnexpectedRequestResponse( f"requests's URL doesn't match. Expected URL: {expected_request.url}, got: {url}" ) if request.method != expected_request.method: return UnexpectedRequestResponse( f"requests's method doesn't match. Expected method: {expected_request.method}, got: {request.method}" ) if content != expected_request.content: return UnexpectedRequestResponse("requests's content doesn't match.") self.current_request_index += 1 return Response( content=expected_response.content, status_code=expected_response.status_code, headers=expected_response.headers ) async def disk_gateway(self, request: Request): return await self.forward_request(request, YADISK_BASE_URL) async def auth_gateway(self, request: Request): return await self.forward_request(request, AUTH_BASE_URL) async def download_gateway(self, request: Request): return await self.forward_request(request, DOWNLOAD_BASE_URL) async def upload_gateway(self, request: Request): subdomain = request.path_params["subdomain"] return await self.forward_request(request, get_upload_base_url(subdomain)) async def disk_replay(self, request: Request): return await self.replay_response(request, YADISK_BASE_URL) async def auth_replay(self, request: Request): return await self.replay_response(request, AUTH_BASE_URL) async def download_replay(self, request: Request): return await self.replay_response(request, DOWNLOAD_BASE_URL) async def upload_replay(self, request: Request): subdomain = request.path_params["subdomain"] return await self.replay_response(request, get_upload_base_url(subdomain)) async def start_recording(self, request: Request): self.recording_enabled = True return Response(status_code=204) async def stop_recording(self, request: Request): self.recording_enabled = False return Response(status_code=204) async def clear_recorded_requests(self, request: Request): self.recorded_requests.clear() self.current_request_index = 0 return Response(status_code=204) async def dump_recorded_requests(self, request: Request): return JSONResponse(self.recorded_requests) async def set_replay_index(self, request: Request): self.current_request_index = int(request.path_params.get("index", "0")) return Response(status_code=204) async def set_replay(self, request: Request): self.recorded_requests = await request.json() self.current_request_index = 0 return Response(status_code=204) async def check_status(self, request: Request): return Response(status_code=204) def stop(self): if self.server_task is not None: self.server_task.cancel() async def run(self, host: str, port: int): config = uvicorn.Config(self.app, host=host, port=port, log_level="error") server = uvicorn.Server(config) self.server_task = asyncio.create_task(server.serve()) try: await self.server_task except asyncio.CancelledError: await server.shutdown() async def main(args: list) -> None: parser = argparse.ArgumentParser(description="Yandex.Disk test gateway") parser.add_argument("--host", default="0.0.0.0", help="Server host") parser.add_argument("--port", type=int, default=8080, help="Server port") ns = parser.parse_args(args) await DiskGateway().run(ns.host, ns.port) class DiskGatewayClient: def __init__(self, base_url: str): self.base_url = base_url self._client = httpx.Client() def __enter__(self): self._client.__enter__() return self def __exit__(self, *args, **kwargs): self._client.__exit__(*args, **kwargs) def close(self): self._client.close() def start_recording(self): self._client.post(f"{self.base_url}/record/start").raise_for_status() def stop_recording(self): self._client.post(f"{self.base_url}/record/stop").raise_for_status() def clear_recorded_requests(self): self._client.post(f"{self.base_url}/record/clear").raise_for_status() def dump_recorded_requests(self): return self._client.get(f"{self.base_url}/record/json").json() def set_replay_index(self, index: int): self._client.get(f"{self.base_url}/replay/set/{index}").raise_for_status() def set_replay(self, json: Any): self._client.post(f"{self.base_url}/replay/set", json=json).raise_for_status() def is_running(self) -> bool: try: return self._client.get(f"{self.base_url}/status").status_code == 204 except httpx.ConnectError: return False def update_token_map(self, tokens: dict): return self._client.post(f"{self.base_url}/tokens/update", json=tokens).raise_for_status() def clear_token_map(self): return self._client.post(f"{self.base_url}/tokens/clear").raise_for_status() @contextlib.contextmanager def record_as(self, filename: str): self.start_recording() yield self.stop_recording() recorded_requests = self.dump_recorded_requests() with open(filename, "w") as output: json.dump(recorded_requests, output, indent=4) self.clear_recorded_requests() @contextlib.contextmanager def replay(self, filename: str): with open(filename, "r") as in_file: recorded_requests = json.load(in_file) self.set_replay(recorded_requests) yield self.clear_recorded_requests() class BackgroundGatewayThread: def __init__(self, host: str, port: int): self.disk_gateway = DiskGateway() self.client = DiskGatewayClient(f"http://{host}:{port}") self.server_thread = threading.Thread( target=asyncio.run, args=(self.disk_gateway.run(host, port),) ) def start(self): self.server_thread.start() while not self.client.is_running(): time.sleep(0.01) def stop(self): self.disk_gateway.stop() self.client.close() self.server_thread.join() if __name__ == "__main__": import logging import sys logging.basicConfig(level=logging.INFO, stream=sys.stdout) asyncio.run(main(sys.argv[1:])) ================================================ FILE: tests/import_session_test.py ================================================ # -*- coding: utf-8 -*- import pytest import yadisk from yadisk._typing_compat import List import typing @pytest.fixture def available_session_names() -> List[str]: return [typing.get_args(literal)[0] for literal in typing.get_args(yadisk.types.SessionName)] @pytest.fixture def available_async_session_names() -> List[str]: return [typing.get_args(literal)[0] for literal in typing.get_args(yadisk.types.AsyncSessionName)] @pytest.mark.parametrize( "name, expected_class_name", [("requests", "RequestsSession"), ("httpx", "HTTPXSession"), ("pycurl", ("PycURLSession"))] ) def test_import_session( name: yadisk.types.SessionName, expected_class_name: str, available_session_names: List[str] ) -> None: assert name in available_session_names assert yadisk.import_session(name).__name__ == expected_class_name @pytest.mark.parametrize( "name, expected_class_name", [("aiohttp", "AIOHTTPSession"), ("httpx", "AsyncHTTPXSession")] ) def test_import_async_session( name: yadisk.types.AsyncSessionName, expected_class_name: str, available_async_session_names: List[str] ) -> None: assert name in available_async_session_names assert yadisk.import_async_session(name).__name__ == expected_class_name def test_import_unknown_session() -> None: with pytest.raises(ValueError): yadisk.import_session(typing.cast(typing.Any, "notreal")) with pytest.raises(ValueError): yadisk.import_async_session(typing.cast(typing.Any, "notreal")) def test_default_imported_session() -> None: client = yadisk.Client() async_client = yadisk.AsyncClient() assert client.session.__class__ is yadisk.import_session("requests") assert async_client.session.__class__ is yadisk.import_async_session("httpx") ================================================ FILE: tests/recorded/async/test_auth_async.json ================================================ [ { "method": "POST", "url": "https://oauth.yandex.ru/token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1jUEOwjAMBH/TSy+JHSfpIW+pnNiFSKhFrUGC10OFOK5mRnvZebXZXnct/LDrtvc3W9/WuW2iQ7t1/eIuxVGeMGBNkSm4jCwJJo+oCD5UwuH0CyE48PTvDm27WvE5iiySkaAGWrTGmgKD5yVFp9QG0Wdvet6YHjb+5ugBP1eBMxQ=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "274" }, "content": "eJxFjk1TgzAARP9KJ2eZCRSs5ZZGC6WVitgWvWT4CJBGISWBAo7/3eLFve077L5vEKcplZKomtMK2DMwQIIKNCXZBpAjFO66YKpPXv26MxBatT538ErL3PfLCEtcEbYUzxvm9yIAdzNAe8EaKgmb5ua6Nb+HEN54Q/MbLv+fdNv5rLjBhi6JMlmYpLIdmXsd5Ro2j4cl3fbHjYO56dKHJPReRhnFbXqmXaEryU5sxBBG45p87a8Zf9PNQ6G4sgyxkK1YWJf87J/WV/vRwbrQ9q02fLhlrULsZQZGk+ifCFGDoJNNQuOGNuDnF6qFWdU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "POST", "url": "https://oauth.yandex.ru/token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJxVjk9vgjAchj/NvJHQfxQOHEwXcZjMJU4lu5CW/opYRUYLDj793MHDju+TJ0/eupetL/3UQdqD6cGdSn+z0C7+rRS9kGV2aS1uplEV2tW0bP+QM/kINhD0sE9g83N4y4Sla4jVLv+YXSGH6gxjjbxrjs0swrCYV+V1e9f2E9F97a1nuONu6Dj7Nuf34+r+iL5mAnXBdgimr/Xp5nci11gsF9WlgcfVRqchixNCieKRZDSMidQcJ4gQIBhRxchTdVD14FMUR1obHROGFWUGVKQ4lRhJw6MQWPULADJV4Q==", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "274" }, "content": "eJxFjkFzgjAYRP+Kk3OZCVKcwi1EEVqKheIIvWTAfhKaKhhQAk7/e6WX7m3fYffdUL7fQ9uyrhZwQvYMDZiRkkwpXiIsCHkPrtFUV891HMwJcS6hWFNH+/Sy84g5PbHKal79KlRNhB5mCFRTSWhZNc0ZumksMMZ3LuFwx/z/SbfftlG8wdhwE6f16Me3LYQasSGJpxc6pRnVuXuIH1dggib8cFFkV2WmFuF5UMAxTtP18MWCuVJXd3f2gS1T3rOOO7gem4wx+VT2dlceE54P2nYXqLJfXiwn2bT9JPonwrqhgcmmgFyCRD+/2LhZRg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1yrsOgjAUgOG3cTNpe3pjYCjEeEMSdHIivRy0wQAKGvXpDYP/9iW/9R7HsZ76Frv0Q2pzMXNuX5HWmFPxqmaudv2xYMZkz7Jd59kybM73L7nmXR2T4bCN5XuoFv4WsZvqGFIidAIcnJJWcKLBBsUSCoDAKHcC/uuI/oFTSrUMoQkaBHNcNOikU9wyahslCQr/A/7tMyY=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "16" }, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } }, { "method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1yrsOgjAUgOG3cTNpe3pjYCjEeEMSdHIivRy0wQAKGvXpDYP/9iW/9R7HsZ76Frv0Q2pzMXNuX5HWmFPxqmaudv2xYMZkz7Jd59kybM73L7nmXR2T4bCN5XuoFv4WsZvqGFIidAIcnJJWcKLBBsUSCoDAKHcC/uuI/oFTSrUMoQkaBHNcNOikU9wyahslCQr/A/7tMyY=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "16" }, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } } ] ================================================ FILE: tests/recorded/async/test_check_token.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_check_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVYbklpSkTchMRRH/3XF1zzmb+zGhYjSdCSKFO2tdyqvfUpnaNy0er3aB2OfO+omjreC8Vgc+FZJw/LfmcG72twddlHuwqIjO4AJcHCRHLGZjZkjIXm/u115VMJdEAi0jJcb3B61VL3w=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth asdasdasd" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_check_token&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_copy.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwVjEEKwkAMRe8y0J02qLuCiKD1At24KmEmZYrTTpikYpHe3bj6773F/7pYaHCNi6osDYBPeQl75LFecQ70qWdSeB8gjPKCQpKX4kkujBrP/1adrtWxfeLNuCNRE7XpfebV7dxEGnOw/8e9M1WaOKGSlQGT0PYDWPwsuQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "148" }, "content": "eJwdjUEKwjAQRe8S6E4b1F1BRNB6gW5clSGZkmDaCZmpGMS7O7r6773Nf5tQcDKdCSKZO2tdotVvIce2wuLx1S4o9rmzPvLDFmRai0M+ZZBw/LXmcG72/R0uygOyqIjO6ChXZR8LOqFSR6F/MxszowTy+nm7DqqCc04gqGWCxPj5AlDENIc=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Ffile.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFESgiAQANC78O+yIglyDi9AsWZS5OBiatPdm2b6fjPvLcZMg3BiZJ4XJ2WZ708fKLd2gnBbIuw+BdogETutm79X7POVWCpUGg2aHhFbVYOpOygcwCe7vXzZ1+kSU1y747ENZ3OQruIv1mixsfYkPl/KJimJ" } }, { "method": "PUT", "url": "https://uploader68j.disk.yandex.net/upload-target/20240707T000621.719.utd.an8xwauyvjcknkv9zmxfb7ze4-k68j.40803885", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVShJrSgBAB9kBNI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Fnested%20directory%201", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "169" }, "content": "eJw9jsEKwjAQRP8l0FO1oXoLiAhWf6AXTyVktySYJiHZikH8d9eDnmbmzRzmJWzGWShhiVJRUhofV9jq5LqqA+CzC0jy0Utw5S4zlrhmg+WYNNnDlzX7U7O73PSZ/YiFOBDLZGKq7MFlNBRznSj+WOAeof1XbS82YkGyEfjIdRg5Ei7Ja54JNWtf8P0BBwc8Aw==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Fnested%20directory%202", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "169" }, "content": "eJw9jsEKwjAQRP8l0FO1wXoLiAhWf6AXTyVktySYJiHZikH8d9eDnmbmzRzmJWzGWShhiVJRUhofV9jq5LqqA+CzC0jysZPgyl1mLHHNBssxabKHL2v2p6a/3PSZ/YiFOBDLZGKq7MFlNBRznSj+WOAeof1XbS82YkGyEfjIdRg5Ei7Ja54JNWtf8P0BBys8BA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy&path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_copy&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK20wwBT2Rsv4AUGOhOIQBtajcZ4d1n+t/lfM+2ipjdTKSn31o5LfIYzp7n68BbkXW1S7AtsmPPDxiQ7lzlu2eKlHQCbBjAgOegImQjQD+r0Miozda16V9PI6Mn5WkAbJQ/sJGBw5mRWKVMMx/t2vR9ZZE0LFzlEecny+wNI6TCq" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/395b134413d3701673a77138bf0f9cfaa765f8027ca387082e1f4f781a0ed3d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "7136" }, "content": "eJztmWlv20YQhv9KQKD6Utva+xAgFHLsJE6Uw4kTKC4KYY9Zi7VEKuRKthPkv3cpXy3s+GikfBKgi9RydueZdxbEy2/ZECYWvAefdb5ldVnFrJNlG1keYVJnnT+/ZYWZQDpXQB3BP/F5BS6W1dkTnEbBaR7Sdd83MleBiU2QjCDCNpHcROKA4A4SHcJ+R6iDUBpfQV3OKgfDvBnJOBeSY0k6xggrvabKEckoN8aC0CwwjoUNzjNsnTQgODjNmSHEUEIURjQQYTjCLoWelD4P+b0rmJo4SkN8Xh932p/NTvo+SJm1Y/oYunJ61r7K8Pzw1rxdOZlAEVMadYNtWuXzlP3wMr1l5zad2XHuVhQ+FS+eTWEBpVrUaJ7XeVlknRQeEa21YpRihND3jR+rgSxRDZSkn44o4xVjnirrrAiAtQmOQVAKqHeYGGuIR0wTrgUFQBgowigNkr9SDeSRalhCbnep4afDP0QNaboLNZgi5vO8mtXDOpo4S+lnbgymSBfW+dcUBZPH4XHEU4aRwI4QpilO6zYoqZQzYNpaxKiQhhkUREDMKWMJtlRbxT1Qy6W5B89Ph094Ljog5GPYiqfxwbrn9+p+CcnfqfvrFUzyCQwv6hzhNLanY5NfVu18259V4/TnKMZp3Wm3fXlSjEvjodpqmmXrzBQeTreqWXvaKARO2t5zR9J6hTfeC0OlU1wRj1mSmwFqHLZJY0ITSikKQVkFQUspAhcKHHftvAjtt3Zn8/WnATUH71886718ow/Zu77eRX9P4WTWj2J39vFwtzcfH21zezo6nG5jXvQ+fn77fp++exODmG8f6vghL0t0tr0ny8P+9Otos/cb3UmvP2a5717BbjX1a0rZvSxkKyU2Les8JrV382KcF9AamXrUbY3zSR67qOXKIjZCbsB184k5gt/Is7S0o1aiA9XwvxPE42LenTf7w4Vidnaf9T72D7KmcdZ0l0O31Qi2OxgMPrRcVU676Bp3c3LNegWsb0O9Jr0C0reAXnNePuebmNeUl0/59Q3Kr9eUl065f4Nyf015+TvzTcyDNedV3GvcAnpNejV30LehXrP+JfcbT7Pvf20sHIUHYW4O2wQrrIKQ1BrJjHeUaC6IItoLwpD0imrGiFRaM2odt55qToiknFrJlXJtIZQGg3F71hPsbDB1iL85fqdf8OP0jl84sfXwVYGfu53Dl88P3j4lfg+29WzQ++LIyf7J3oCmaWy5j8b1Efu0Z/pVeP/K7kOcMz+D/f8B2sRo3Kjxiu6C3fgVifXCsbgVdlhQxqQ1SqedYYE6RTFwzHQQWlqLvdMEUc8B0dYEfG7OI/vSzRazX5YLojnqBoWBaANaKYu10NpYr4njWid9I4DGTrmK0fhmF1EaK+q8H9a9s4reebR3+y/Hrh4ZwkW6GoFmiWqCLUJAVGtiuAzeWx+YJMoKpD3yMoCAhF0HowO22nLLGUotxrMru3TRvUkKnjcH92vmNmOVa9oYq2kvWKDKOgRtZGUINaTf6PEpN6sro0mbN702Lm8MubYvf2hMIkqDJ4Q5g5mX2kpKQRJKEE+bAAmeooSHKC+wYEpKy6i0Lu1FTAZJdJPuw54IrMi2f6RHv4R07zShfzb8Qzx6dP7E5h9plcsX" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK20taVQ9sYLeIEZZhqIQBs6Go3x7rL8b/O/ato5qUFNIqUOWo9LftIZytx8YCN+NxuLfllNc33oXHgHmfNWdZ98b8gla4wPYzB4IRvAcIiYIhrrTUhtdNyha7EbLWAk8H1HHp0lbtVJrSxTpuN9u96PFF7LAsKHJFgq//5/tTFi" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8f480d3f10046c60b2d16a0e69bf9b01406f593e7b35b7c1ab9da487d4b31de5?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8f480d3f10046c60b2d16a0e69bf9b01406f593e7b35b7c1ab9da487d4b31de5?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_device_code_auth_async.json ================================================ [{"method": "POST", "url": "https://oauth.yandex.ru/device/code", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJxLzslMzSuJz0yxNTC1sDQ2MU4yN0s0NTGwME5MMTeyNDQ2TjU2MjRJMjVWS0kty0xOBSktSS0u0YZwtQ2NjAG8WxSf", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "154"}, "content": "eJw9jtsKwjAQRH+l7LPYtGma2p8puWx0QdK4SYsi/rspgo9zmDPMGzzu5HBxq0eYG9BeoRp9LzuLgwmdlX7S00WEAe0otIRTA/hMxJgXitWQQlREsSDv5l6BqnHLyP/JR3BXR0kf6o5MgZwptMZl46MPt1JSntv2Zc68tb8/8PkCLyYweg=="}}, {"method": "POST", "url": "https://oauth.yandex.ru/token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1jkEKwzAMBH+TSy6WJVnOwW8JliWXQGlLYgr9fVPaHncZZvey19tYx+vhxfy5NV/b3Xxq183PfrMSOC9IqJIqU8hYTeICiI4RSBmnD1/E2DlZRFCn2kHRsuQldHJNQfAvPLztPgrkZNYtI0cl7iejQjVC7ZKCc5t+X8794ceYv3GGiG9UozdY", "response": {"status_code": 400, "headers": {"content-type": "application/json", "content-length": "103"}, "content": "eJw1jMsJgDAMQFcJOTuBe3guoQ02IElJ20MVd5cqnt/nQnY3xxWQesvmclIT01BYk+iOC3xGSFyjS5lw2ltlh0wV1BoMbvDnnGBYd6BSDonvDO8HpfImFQ=="}}, {"method": "POST", "url": "https://oauth.yandex.ru/token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1jkEKwzAMBH+TSy6WJVnOwW8JliWXQGlLYgr9fVPaHncZZvey19tYx+vhxfy5NV/b3Xxq183PfrMSOC9IqJIqU8hYTeICiI4RSBmnD1/E2DlZRFCn2kHRsuQldHJNQfAvPLztPgrkZNYtI0cl7iejQjVC7ZKCc5t+X8794ceYv3GGiG9UozdY", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "274"}, "content": "eJxFjslugzAARH8l8rmRQECacHMpoGKUsJQ04WKBMZjdtUmzVP33Qi+d08wcZt43yAihUuJpbOkAzBW4KxhWcFGOQqWFMPa/wiXa3pj1fDakUUWc3o7QRUnlprSMIpv6pJw+K/C0AvTGa0Elrpc5TTU0Q9O2cy9oOdfs/0k11bjo1LxOiD5YMX9JTXEOGfW8wHr0TkF6dMGqlidVEwkFrxmGfkfGyA3Yx+jZiDFFkceG70ZdN+D7YXNp15LxAdJePPdW5J+7PTQdyzm8npC8GmhfvG1Ot2C7K64L6B8Inu6cLjQ5zQQV4OcXsaFZJA=="}}, {"method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoampAAAcj1rSZxVAGKUgGZefRREeLcftqg"}, "content": "eJwDAAAAAAE=", "response": {"status_code": 404, "headers": {"content-type": "application/json", "content-length": "137"}, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr"}}, {"method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1irsOgjAUQP/Gue3ti4GhAzERFiA6sJA+bgmioNAY/Xtl8EznJMd6j9vWp2XCOf+Q3gxmx5U1mYxpq1e9Z3Fa7P3xE3+la9u9L+ZYnodjh7FpCqx8TM/h4G8jzqkfQ06EzoCDU9IKTjTYoFhGARAY5U7Af93Qr5hyqmUIMWgQzHER0UmnuGXURiUJCv8FS/Ez0Q==", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "16"}, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ"}}, {"method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoampAAAcj1rSZxVAGKUgGZefRREeLcftqg"}, "content": "eJwDAAAAAAE=", "response": {"status_code": 401, "headers": {"content-type": "application/json", "content-length": "99"}, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4"}}] ================================================ FILE: tests/recorded/async/test_download_by_link_error.json ================================================ [ { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } } ] ================================================ FILE: tests/recorded/async/test_get_disk_info.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1268" }, "content": "eJyNVNFq2zAU/ZXh16ZESuw4zgds7H3vRrUVR1iWjCVn60qhzWAddDDYy2CUlUI/IHTNlrZLvkH6o125XZO1L36xse45555rn+sDryDv4jHjNFbsPfVGGIX90MfDnt/xSsLS+Ek96A+GIYpwD6GOp6UmPFYlSaDiBygKcTAYoGHHq2gWa1bAsddDONxFeBf7b3Aw8vGo199BaISQBwIVUZMHZdBjKnY9vdGYcEWbZ5YWYEGQjKbxWPKUVjFJ04oqFZMkgdsjuFYAefDSjyIcRUMcoX7HU/tK0+KBDfgDT6ZC5pwoJVjOwGLKVD7qmguzth/N0szNnf1sVvbULF7YY7OwM7Psmh/m2qzM2tyaOzO3x1BYAfbWLGGOTMqM05ZKrxrwDtCYUJpkFSlaMl8/4jveNJdCk1y37Wq+mu/gfgUPc3ML1wWIEK1JMtkonIPCCdTW5qphmysYdm1+mYUb1n4BSkEYr+q2Tc+AffMCbkt7BORUvhVcklRt+N+A+dMe2Q/mt3uZXeeqLDlLiGZSbAHP7RG0eWpnDN97T8q8paGX/+AQC5kwwlvy3OAQNioyWm0olwC+Afipm3DRZMI5u3YOwe0cWAnhVKRki3QG6Zk19fteQL4C6gwOFvbEGUvI9twX8Frmzk9TqigVaiL1/4BGbGU/wQgze+rcloCRSld0O1yXrt5EeG7+3FvseofN6lRuL1puLaiVnOzHgjRQNs3FFI5rt7meHwSDMMBhzw0va6GrfTiFxDTrnEwY3+w3lxkTjwqHzxa+rPcgCM8WXXBWMA11UmtZly5QMRVkj9ONdEWnTEGA4I8W9lAQREHQD6MAB/7hX6naRCs=" } } ] ================================================ FILE: tests/recorded/async/test_get_files.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=0&limit=25", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "36722" }, "content": "eJzVneduI8m2pd+lgNt/5vBWeNNAY0AjWpGi6CRxMCDC0nvPi/Pus1Pdd07NnColCUnV3YUCZEglMyP2/vZakRGR//VlvAvz7Zdf/9d/fTGL3fgw3uy3g+3O7Pbwyy9uFsziyz++bMeX8OVXTCgm//jilvN5WOwGYw9v+a8vq834YHZhsAnb5X7j4H1fGOdCcizJr1xiGRBVCHtGkWSMY8e1VtgYQrXT8L1EMSKpNReUI4JQ4D4qGjD1Nhj47NXezsbukw7/z398WZh5ctDsoNdkhdaClC7PxdGY1fs4+1w7d1oTYmVXLUtj2831XkpjNVzCWYXTOMLVw9+7TYDL93AIgrDMIPiPO1j9yvCvWP4PhH5FCN7/36cPrfbRDTRf+nEcp57BfDwPg915lVysWa2gTc1uvFx8Xbpd2GW2O7iMObwtjmfJO0a73Wr769evfnlczJbGh81/+vF2+p9ns/Dh9J+b/dfkx6+IWYWDRJbB6aGgnPMyGssInLjDyVfrlGY8BMyI85FppbGlXBLtnFL2qxAqBBb118W2XJmG59rCtEqrznmBuuPW+tF0qXsgp1JjsmhMy6NFNpMt9Gq7OM6ykl/HfnF834iH6s6IklkMVs1OrR/FjoeXfWl37PeO/0EL8P9/7sf+t//b5r8kl5j0+m+39PkvcL2r5XactNlvZrczbpRkwS8jsx399stsPB/vfkO/uOVil+RG0s6/fdPK/0GK37bzL9CqYTP4/04rybLfXpPslxG8ohH0uldSB2WdRg5ZZyEALEIqSMHpL/Pgx+b3j/JmZ37ZTReH3w7kl7Azw980YZoGISiRwUkVhRFERsW01o55FJLMMrsRdHXSkb9+vVu4zXkFgfw1v/Tha3a7DXM7O3/N0fm2UUUuO2zh4bxCh6JwoJ3xc7NQZZ1VIXs49Fvj7T43LrbQ1xuT6F8XkJwGXEKCmpEhXCQ5AqEluVQEYxYpFQK5EHgw2AvjtGIIB+QiIjF6SiOJlBjJlGXSJ2nkkgv848ivIQ2f5jn8cEW7bMJhvIVOA+Il8UoZk1Ih+Cf++Y8rMMnQbYwUNnj4hOg8DgFOSBgq4WvkDDJIK0gTDmfII2SJw8xYgS0ijjG4aiS85CmMfPfhv2HkbEgWeTfbx0KYL3txddzhS/7oz3KUOZXUfX/7slwVWIbkyf0HMvIDGujPZKRTKFikjEICIYcddcxRS3SA+CY4MCcA9xxFHaNVTjjOFAS1I1IDPbF1KYzsjpbD8macDZPs4X58V2jQ7aGz77wEdWovBueXCq3c18+H8qh0b02+uRwsNp1plS2x3srOOObTGHlDn/8sRjL0CsgQrHTcWukNiYFTBFTwTnjLoIR6mwJIiCqOmGLCRR9DRJ4TZESgwgWlIlKfAshCqTVGueXdY5W0TWl9X++27w1rnqvZ3hqvOsY2Qm8tmwVb1eLrjen2Jk29hcgiyHGuIWU8QQGxEKTHXCkoOMgiSWMMlDoJeUMFh5DUzFKqmYE8Uj+g6RWN+D2aakGUYlfRlIsbaRpo9KBAogjGOmSgbCrOjTHSKKy4CF5jDVIEU2o8VNioggrIQEpqpJ33aTR97+H/RdNCMyPMU3ZwMuRYrOb948A87Z/anX67KXp1IjrDdbu5eVwUQmvykTR9fwP9mTQNPEqlHOJIBuME4tHRAOAMFiMLNFUKRayNUFogiFtsPQbJ6QTRnnHNTQpNnyV5bLdzu+5Dbj8v8zZfjIrTuShPz4N7w+erzqh3P7lvNLN8DiJi93Juj3vbHn/ITjrkmU2Gw7dpekuf/yyacvFKU4sJRIWHqqqoskQSp4XnTgXisY00vk3T4JUSECiGkygdMdRhGql1IN28R5j9+TS9Md3epCnxUWvsvfAgPhWocoM0CgIAKqUXjFiqDZAW6Em9RMExC0FHwfSYaJni6Ac0vaIRv6tNFWKSXEVTjNhtOIWLA10dBCgYHcNrCQGNTcCWGK68Bt0dA0FSAdCBFpF50NDWec2RsFJHkYLTdx/+XzjN9Q/yZIbTrLmzovkCDX6nmmbUnfn7yM81X28dH0/Cz9ToLns1TnUqTj+ggd7Eqf5cnEqBhODBB0h1pI2hikIUAkujkJpbwhEmHBwVdQ5JT4z2ATs4miNCEsLTxGmnWVx2MqdNhXUu2S42x36tl9np/PNhMr5MHy90Puzvs7y8sS9PpZWuZC+91fJ587AuTLJ0ullk38bpLX3+0ww8Yq88hQTGv9fXCJLecwNtCE1roIsJw9y+zVNuhbMBzCwY1RC0sFxrGwn0ABgE+lfg6Y359iZPLZRxYzR3IEy50CBMuIgQavATiBLPlIP245b6oCSnEHxMeVAoHqy7AGLyH/D0ikb8Dk+1hoPqK3lKbjT7yMEJSDCoAIEIupkwTQjkEhQUD/pKIwfooMzAKQuQLVGAEYRGwskgmiWWpPD03Yf/F0/zq9Z+lGts2CJk/IDtyVYzlekve9mNaDyvouoat2kdS739/cO1PCUolacf0EBv8fSbM/gksw9GK1gQoBBH2FjDqVNCgz4QVmjpJbyMOSHWOQ/lgZAIdgkCL4JdArHKU3hq/H5cP24qT7pebsyr5fqFtJ/M2rJZe1xcq0oz1+1NSOxmQjGfIRexmAxJrTvZrg/4nt89DVLM/i19/vMGRP9w+4ohsJkOM2gmpLFlAFQoVzxpRx7C2zwlYGmENVDTgMeRYWqoZYFwJSOjBtM/n6c35tvbbh8CCqgJLs5gK5FCQhq4UKMJZI10SFDqhSIEhagDAbHqIuBVReM00cDIH/D0ikb8d54qpAhi+kq3f6s+DVFoAbJbeBIgz2LQPjkZS1lgzDpqQowW1DQkpFOSRItAzvjAGfhFgZxM4em7D/8NT0kYMXXoLPHgNNlXc5mX6Z1aWvXsK71CR8/sclfYitMA5x7YfqA7QvdPm1YzlHmn1bjkGo3H3367mrM4lbMf0HBvchZ/LmeZCSC6k2E+UAYuUVbIWAtcZc45o0UQimom4VWtFKM6YI+ldtKCAieYpunWMLo7PO9auUk1MxsX9v0eHvr144zxC/aNXKm3ydc6FbVempdKHtUm2UdydxllqpdSVMX6rltP4+y7Y+H34/+0IYI/NC0iFGnOXUA0Gb32IjCNBUg0ghHwg6eMuIJthpDiYC2YgE8ApwR2GGLQe0J9JH8BBl8a4n5auPAn1KyI/HKS32nXR+v2qJedbp52D7SVQ7lGqbB/ePz6QQn9Jsh5UJyDo+CBGoWiZoFjkD1EJcNfERscpNLBWumspcQ7ip1MzAUF3yZRkD8atk3vie+AHCvGBdZXgVzfKoy15MhzpKAyYdD/cJ0RQepqJTgJDvCE4RrhKk2EcoWtBSvlnOTceqhXktgUkL/78N+M20q1bpBl9IWFHVQ29Uk1iHLpVDh27V3Ap+5TodI/v7QeQ2tlRtv6AGeECAN26bLLICza2B0/FOQf0HB/JsgtdsjBBUQNVcaDxAeZAnIhIgFRHaxjUKSALBYHjAIKAXyiUQJKEIS3Dk6mzSBgbhAaq0Y/2z/dl6prFM7dh9HL5cUVfKd+Mo/lVZ/Gx/wQFWvzXvuMS+djeNlXm2y5nQ+HuceU8dx3x8LPBbn+Q0wjj1wyycQjar1X1oM2ZMEZKPWAApcyOJHoSWkR9R5iD0x1BNlAoRp4IQkLAv3NQP5BCf0myAPENGbKGmhk8C+YIRWcRkRELoIClUVsVJCiRCOswf9SzaFFpTIKqi1D7Acgv6InvgdyzQjh9CqQE3zjDbjAlOOcQBSh5G4SYaAdo6BcE8MFQ4HYgKPlEb5ohCj8CJqNckPB7UtrcZoif+/hvwH58CGOy51xfzSZb6dmeeSP51Hhsabw/DGTbY+XVTS3l0a5vanyx6LK0/rkeB7K+yIfs82a4cktipykK/L3N9ybICefC/KkmEgKFkJ5KhFT0ohINGPYMZYM2iBOHJWMEQ5RD3KDB2GpN5YoymQ0PgXk9hj8fbfeQ83hfau7Pl/KOjds0ruXqixPSy/TWeW+MjHL7nDsp436bMH4/KSnobu4mxbbT4unlJHk98fCzwU5pOUryEkEzwN1UfPIJE5m4UUCgeTBxYWAuHkb5NYDYzBwwnAvqZTaaquYYToEEAfG/N1A/jEJ/fZQNaYhOIoscUZGbowHbY6UCzQaYZNZak5AVHtOuQUn7V0y3wIQriHgqdb4ByC/oie+A3LCEAZ/cN1QNVU3jq04nkhEBBpRIx7BVERIZA+lS4OA9HB2INacsqAzfdTidTyIgc/WykvQdK93Od8i+bsP/83EtCAfHoq6MDOoehxenqrnnfDTI7O5+qQo1+VJsV05N8kO+0XlamKzVGJ/QAO9SWz2yZN3naCIgPSzzsdkXI8TiKzIHbNgJ7gRjhAnQaJQJQNcKU6UIYPLlBGCT6C0iWnIFFx+E0rPubjMrcrzXrazmKFVe/qsF0+j5os9rqrGDbKLB9q5H+3nL9G1W26XK56zUVeLKcS+pc9/2lg15NgrlqOWiMvIoDEFYmBjsATjFUGlRchuj97GsoGCj2UyeVEYoDpRPmF5EERYH6O3fzMs35idb+IXbCIK0gqJrEimxQurpQBUIqQZOGHjjXNEaGORtyQZHKTRa6qEpAp+qX80j+2KFv8OfjnCWPHrBkQwKPLb8AuGgBDpvBSKM8wJqCoNZs0EriS8BWoLAy8cHBh5rzmUDMIBOhyMP44BkzQh/e7DfyOkBz2w06OMeskMd3tXOW62/enuOczK7V2vGVZCZ2r1wWW4f5zZbt4Wjg8T+SCXi2zY0+N08lC7RUinY/kDGu7PxLIE7Y8t6GijJcSZJUAVF4jAVioCX31ANiiGgyIgF6x24BcDxK1k8IoSMW1ou5mZv8x6p8PoNNXVPl00a+1dhuFCf9edt9GBTpqTmJ3l6qK+GhRLk1rt2CqXQqmUU5dq2TfTRkTeHQs/V0gnefmKbIPAhaAIlTqoGKJzAaw1ijKAw0KcpdxflFAxoV5SL6BmMugpEOCU2aAVJzEw9zdD9gdl9JsoN9JGIDLVCJIR6A3w9lb7iCB4wQXHyIRXBAPQsaOgoBBFVIjg4I+oAvz/AOVX9MT3UA7Mp/JKlJNbUR6MEVCeDNKa8kgxmGFHpCHOWUkZtaCmKHFg3pgJkNiCUAwmWeIYDY4u6rQxkfce/ptZdJm2n7cH8/myUhAvg91snN8fM6WKb/h99eSa4+IE0+qZZkrV5WV8HrJOo7ZVZ1vqQZo0kN1nr0c5TUf5BzTcWyinn4xySxnwGmhCEdNGaI4Tl4CIUipxd8BxTY0nASXTBFFi3rEm0UrnkIIkYSko79dnVXnHn2aVc+7RbgbNhdCx1dW11kMo8Z24B5A9lc75+iL7UHek2NzamSaL6rLu17UMPqRMVn5/LPxklJM/UK594myU5FAcFag6FQVSXFFHfMBCpNymVIxgHrUz3tJkboM1QWCnsQ0EaIT03wzlH5TRb8+HlmCAIZadwcEGShlnhhJDEA0O9JcBbeIcS8yjjoxSEF00CCeV98B+zPyPRrfTe+LfUQ6VhBHJ0HVr9fStgyJKOgncERYzCbYfkhj8MgdzRxhmhkSqk3egEEVEBox+cj8VEl2BIcFIubT1Je8+/DeqnILtnrHVoeqwYe3hy6WJJERkubLZr8gEXH1NomNVnNaEFl5y/fN9viznfXR/WHQWuc6Z33Cf8gqUf0DD/Zkoh9BL7pGRJKyxUN5GCqcomYLg9jJiQwNBYDdltBDooCPl67h3Mj0qIOZC2rqTvZ241pK1N7lFpnws2VElexaFLaTffFzblmiG5emmkLm0c9Uzvhf7dbV1P6/29egRsYlbpqnyd8fCz0V5kpevKKeaBgMxgwXR3BpQi9xhqJTg1bRlPm0WNcYaxCTIRgwSPipDFEDCwC8j1xz93WacfFBGvz3AYjCXgTGIcU0lKHNI10g59kowJy113CGBlTBGC58s70eSBe9iMNApIN1/NBU7vSe+h3IF0p3Iq1BOxa0LrxVj5nVGWDCIwRVKYTzWUSGOVOIasHAIu2AhublJluLg6EFWAp245MK5NJS/9/DfjG/T+LSkbdLqcn9hqlMqlcuTOBs3FsV8tY+bjeFwvFgvC26E+lcjW6Qj+/0N9CayxSePb1MTCSfeKe0pdd4LMAnJpOGowQyCMOFwQdHp6ITRcFFWg32AC4OKhHgUJAXZrc0clfP0VO0+5QsqzsKlZMo9vPOnRmEhCo49nXom9Np0uu6cJ6E3L5MOqr5sO6XxoNXRMW3h9Q19/rOwnOTYK5aF4hSkm5ME4AC+TGhHfTLUzaS3WKUsFsTWGS2pZ9ZHqanlMTqKY7JoE2zQqxz8O2H5xux8+/ZiDEozwwKSoJJICOBeLJjaKBUOjCMJ0GSCROadhG8UmMqogoZXiGGW/gi/V7T4d/ArKRKKXDdPhIpbV8KAL5bW6mS+itOg76kXUQgCloArsPzMQtoGbwyxBnxxoCQacNLea6pDMGkzt999+G9mbqPMw6m3Ee37eq44rBwn+mWMm7n+tl+ha7u2Lnsuj059s+sM0dX0TV+o/QEN9CZ9P3mhNkhkbokyyiTbNHgITwZePCiTTFaBFwTlyTRUJDRWYBh99MrB5blkHppDOm1iX5vUe73RqDnZiXxHDp+Lc1Qa7dc4jmTrftLP3JVGxZNpZjfo0qxO2sfavt1Tk7N/qRR3mfqinzL2cUuf/zz6/g5fDKYaJZtdJLcGNMVABYgNgoLCUKDTNgZS4MCRN0CZgGMEjGAOxc8BZYiRyOG/AHxvy7c3eUoFVHdwaTgSHYUl0WtrnA/Yes4C1DMPuaRAChgHioZTHDDI0eQWkQWdIOmPRibSG/G7POWgLNR1IxO3bnyhuMCBODh3jiLSBGSYFEFHycCpMkKYh5de90wCj+oIxBBV4GQpB11uLU5bWfjuw3+7EuZOdiovpxey6JY3s3Kso35H7e/uHk+FyVO5qM/juhJiftDPZewyhd0o98BlElfbWrnUK97fMDDBVLrKfX/DvcXZb87gc+bdwekbbVGyv1BQHkoG1kCGaAOUe2Apwkh4LA2cKcIUJ1PtqMZeWIUZRHjaLA7zcB5tnmoPiIdh7bmDQ+7McEE+s5ywp7tDuSfDfZP3L9XzpdVGhbvnYPfrvhGTjSXusjunzOJ4fyz85IGJP3bLAOMguCcO3AO2FDwz4tyLEOzrsk54U8pqRGtphGqeTPlVIN0iJkkvqGS0Syj5F2DwbSthPiSh317S6CVnMTDFI4qegyF12KCIlfARGhNsh1fJEpVoLKVMc6nBkwjmkJAhuB8OMV/RE/8Gco4RYsmmXdcJY6JuA7nhjCS78iCSmAAvvAXeGGmSTT4QWFNqQVEpbMDdJnMbmIdTNtwzA69ZhtOE8bsP/w3It3KbedL0rtScNOe+VpU8N6pMCmNMeL1xB83la/lMtcLzon4dsAkQMxXYH9BAPwb2/3MGn3NT0EStHQSxQppyy+ALKAkkUSKEpRSYMx8gjqEqJbObXAw2YbZTnIHk4zQF2LHBWq1Nf0dD2D2v8scDcbuCehg891fHPUN63A+5UXk/y+3KVq2l8LNmpzhznSqeZWw5P0oTxjf0+U8TxkS9Qln5ZHNAKNEestOHyHGyA0QkImrMoXy/DWWk4S9BEyJDNWdgVawQYK98svCcUPEXGJUo3I8rL038jNvDsuk/ysqo79WMVGOLl/i+uWjz+ilz1yqux6XwtVDtjprjJ+hVsZA1zp9rhcf+MAwHqo4yVXSQPbI6lHc73tgB7jPFSy3qdtltT3f7bn0/utCGJePmdL/vnc10VBz2y+dlo55fzb7emPZv7/IpIEWTmXoUA7CjlxSMLkhpgxAILaipkBpWGIGsd9TiCF1jYnROgYIHROsfYP2Kvvx3rEPmCUQlv25djLh1pToFLYacC6AWvEMucMeCSrbbUww0hOTWE5zYYS6VBK4p5pRx3GMTQJlSlTYH5L2H/wbrcU/Z8Wnl7+fTTOYxt5jsio+zSxxu/UO7e+qgp3Zg5oBK9/H5aqxfsf7l/Q30JtY/ef2LjRgMuKYgPCJ3xhjsAlE46CCSK0jmsXBNvQpaUWq5AdvhNDKaai+FRCoF6+5hzVTLTea1mr8Q1gC8LdfbR+3kjAxGUub7bMAKx/tYrx1kuY+eWtl2c9a+l0+FpdgMTBrWb+jzn7bGRfx+D5B7iynRgVJlFQLz4izRwlObZDfGKTPzvIouaWOrnWOYAHA8FFTQ7pRiEWL8C2C9tsrkepX8ZIDamC4brNFcrKrLTmFVzfTvZw2x3fXr50y1sOw9fL0xOd+ELwK9lNxSBb0UmHRGcpnclCegr4PTjFHvOMgUocXrugCWTFRiNLntoyBRJfkBfK9o8e/AlwitJblu2yV1q6QmVgupw+tG6jgEqkEb+mQHSWQjuAZOiYOmMCwS7iF5GbMS6o0OHq6Z0LSxkXcf/hv2TnrMtB5mnU5uMBlYFCtT4RaNyWidK+juiSyGLi8DX+NKGN4/li5P/afFoWwOAzJkarJTB0SfK54OZPMwvytOuqX+ne+2pleOl1zF6Q9ozD+T09whSgWCgmIpExZkNXDbOGZiUB60OQvaIoq89pFQjYhTyd64LtnT1mPP0iZymAM/55t7UD/zY+kw2V0GTubu1sVcyw+KDPczmR2q1qcZmZX7JZGYxNPTIIxckRwy6+PzJm3nkM+Jj584gqJ+1+qUIwbN+/vy/2Rb7BAw0TI4JxNbj1MWLkZJiWQMG4Y8cYAaizimAZS+Bsx8zu72tw2gtKJbbAfyodCddu9ke3J6YYuMm+96aJpM9Blmzlv85Mv9+ebua+EwqLWGa5s7NzfT1bRyDPR8bIs6Xo1emoc8vozbD8z2yGQ6Onz9RES8WS0EdJgLkOaQ08QrogIX3mgOvQXfk2SEW7gQkbPJsgSnrSNY4WT6lrFgwH60qdQVXfm9apG8hq6b5HfzCExgXCkM2DLwKRExgrVTQjKQc1p7ABbwTAZBhYCWANNjobBFwZlREa6dhzSp/t7DfzPHr/ocGueJ3io3XrV93jzjSjlWQ2m0L9q7R8jPzmBXWpPx0F+5SR8AmF6xVP3dDfRmCaCfWwKiE1FGA4RXAs6JQHgiFahyGBMr4EwFxchLrpySHCqAkx6UJrMhchApXKftOVJ4eOBns9SPjXbFNIfbYqU7FaCIztFmMs0HOus/dktslfWn3vOxPj273mI2Gfcedq1if58fp+0hfUOf/+wRGK5iYJ4QC21vkqfVQAElERRj8vCXiHXapqfaKxZQMlVBUaxN4ptMVEQI68Hv//lUv3EE5qbkfHuxjPdMy6ggVQIodtBfgEIEv/WWwu8AxxxzUOvcYBBjYDGTDf9csiVQ5BGs6I+m5aW3+HfgyzBVYHM/Z16IABsSJElurTkIJikFNzZYzqShkItIefQ6B4ZConpJQ5RQNZSw3DlvNU4bJ3n34b/R6kOxW7C2MlUZ60u3H+2aztcy4aH94goT0yMkPKpcK+ZXdLfvrAe6e9y3au28u+TEjo4Hp/FknpuvDneF3uVx+bRtqsJj6Gyv1+rpk64/oDHfBPUnT7pmHgIuWig3BsgiQSN4wUEhaC55IimUZMlIeoRLoAgEpUvmoFqspMcUG4XThsrjHRMdvaPZPO9dutljtmwifjkUJqi2GveHojfIti7P4+FxOdvM2kdMu1vXO9xVJwM82D/JNK3+OfHxE7X6f884kRSD4zfOu+C0NMJJiRlUdyMiCjxtYJ2S4AgUBh2dB4nnKVfEcYahNzUx9K8w4+Qmsb475Ip3RZXV2f76qcls+zhxsjEfzU7jwbqe80u+aDe7RzE9P339REa8WS+0T7bZ4cmyJ1Axrw/AsDGAc+eco0AgnXAMBjojuhijcS5hO3SpUyYiyK8f1IsruvJ79YIKgsR18whvXVqpIM+JkmDPEUKWseQRdDG5OOGsY5JoTKS3SHBsEGNUEaq8iBw55T1gInUS93sP/+3d0l6pZdR417/UL2Wsy/l8ccBceF4VV8dqtlte5VvZdenBsgdR4bqVWRZC4Vyrrztr5U0le3hROl8VbLF8XLeCnT/SPPBbfWS5+IDG/DPLBXGgPSOEPhQ4R8Agaqu0FsngpgomKGIgbiXSRCGvKdeJgEqezcEjlESD0+6smu5MVXf0sdlq3odidnJY5cYKb59WGSJ78fgo2GRyuCxKOzVtHO8yyzhBbtirDZq75vjluHpImwrzOfHxE8vFH8svaUie75TciLU6IomoUMoGipPtRZFiKdVCMumCwNBx8MfJ2m0L/ADVIrSXGKm/wp5UN1WL5Xw86M4e7kjM19h+hNu5+6Uarbrzyd2lOhlOx7WXHum4xaG7+fqJiHj7RkBAlAgbBPIx+QNNJQo4Oh044kyAm2fQhZYa5q1Mhus81RGUoqeUYf/Dp4Nd0ZXfqxaQngRd+fwFfmO5YJ5jLUWgOtn9nEZpHfgeboyNlCczhSy4JQaOHzksGZPMsWS6vaDMELiQtAfSvvvw37oLmpvNjzizzl+y3X6u7u8K1aJ7GnRbzexL7ZBb9aez8zx/KLkdDXgvm+FJVwuVnmKX2XNlHu75ZBcuMzJulSfFTdu3SngQX64vFzy1XHxAY75ZLvhnrw/ihCNrlNKIekNB2bhgIfYVdV4lE4JJZAwT7ixUkuAVVDuVRKcH20GZSNto5SXsi6uu2p/sOvfUGZgXIOBa3GXCuTUcRJlvPMXCtlhr7uadneao33nwOXtQInd/1uRpnFYuPic+fuZ6ff57vQCt4ZKnCFoNjSmFSOZogQWNWlqVbGqaMmgUIqZQx020iHFvnRdaYh1lpMn+9n+BJ+XcVi/WJtYAx/X1jndG2/LLBg/RStVp6XE0ndTo89P++HyiB/lQU18/kRFvuwsshFQq8ugDiEEMtpBbS0KUmhmcrP2LyabTICRd0JZSQqB3NFYOCoyPP5yMeUVXfqdeCIK1VteNRt1cL5KnuUUtNE3uiZtkDNMi5zjlHC5KQ1X0QD0VnRIInJbFXBjsNEIJSqDWsZR68e7Df1MvxpYPL7lsub1k7cOluM/d1XLU5vvH4nnvuvqiT2M+Ws8fwr5eXrx4mT3ekXIxhwfyvF9tbWXXCMcDLk/LldW8yMaDWsW1ph9aLz6gMf/MegGnJD2Kwr3OPQmceIGMdsyogBU4bbAdIKM8Y5xpBH5C0JhsBeCloAqBGk7b4VaWhqdnW2wdeq49pp1t+7HZn1Zzi/aRiOyog6fd7GN/vp/tSr3WZelyfjHNTluzxexpxiarYdpo1OfEx59QLwSVwnkLhQIDKahlxie3HLGnLgJ/XMqTKp1QydMbieBEgG8lUPNBkVCMMMSZ+Ss8CeimejG2w8mlbXvbVWieHp9D8cUXhdyN/KaA7/POXh5euicxy+az66+fyIg36wWGfvGBJ3eMsTBURXDqxoGESp4riD1yRpnIpIbUo8macxKSJyRi5pUIICF/+LzM9K78Tr3gyeDllZvm3jrRyCWL8YgKimCabCmGokvKmY8u2SUEiAW2SjvrUbJVJbzLJs+rMSGZkJLMR0nbs/Hdh/+mXCxOzVZ2XOnL1ng5jo1lo3E+bp/6uNe6P9Vys9W5wqa5abP42N7nINLnxQYx5fzdguEmO7UuaMa3hcmeXY6zsSINPevVW2Z+95Hl4gMa888sFwTCTRCBpQpgrY2RUDNcUJIIIpN9M0JM7pcjTnHiKxQTFhGI3WB9slMYS3tScauMrfbPj+fzw0MotZusVjM7ZVX2odW4rIqsmD37GS4ez9vBYjTPPlb2i7uwa48gVyrVOCqmlYvPiY+fP9FIJNtnaijTUJwNlGtP4R+oVZVsJGekTHMXAmNmAw7udW2B4ZEyrBVlmjAv/3b3LpZi1n1uZfn6RZhtr50dzU7tpwMc9HFVqAwOGd/bMTpoNXf48PUTEfH2vW4adCRWS2K5RJproDuOmAMOkg2UCQ2SQwc44hSFFIPagRniXnAWEUH+R2sCrujK71UL+HjFrtuCBt+6mZhWAcqX9ogQ4VyycxRzySTyxANx/7pGiCZbyOOoKChmQQjjBM4/eEIc4COlXLz78N+Ui1mpfRkuWKY2H7hNrSIfUCY3eWCVeru8n592j8NpLxsK+LmR9yqqcXuhl9P6qTtyFO3PY7KZz9rNx1lnpnPVjpq9rMLZiGP3+nKRvlvNBzTmm+Xik3er4ZpaY6NAWkbtiQjBC+oMOGnFoSAgcELMU2led+7QOnpQORDIOnlIiCEmdf3A5tyab3Blu5l25gjnwnJ7RJXVk+qi1vHufP/kBpM6bnf00rafyOrlvCxmm43ZUty1n2npoZ1WLj4nPn6mu/jvHcekdtwxiQXyQUQmRHSYBqccDl6lrewFU8gsFdAxTPAgkwdlJ3OibXAY+kf87erFrJ4v7zedy8P0qfNkJu3M42N+s9iGQf1wv3lpHE+ddv65bLOVbfHrJzLi7S3LkIVaLiJPnqME+ZAsIiJI0Ui0ZCIm0/mSO30EI588QFpwhLiyUDko5JAzP3okxxVd+Z16IVEyZkX++b//8eU1Nr/8Svg/vixj3Ab4Hv3z/wAMTU/T" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FA_VP4DRn2GzXFhi4MZ1AXKyTRj2b7U8oGibUBVYGi8go&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FAlg2nCclufDemoVfpwt1zCwdy7h-xG8LZsYopD4-2C2L&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDP-6aWA_xa2wFJCdQ_aWuWSTZSP6VM26TgqSPrQnDeRj&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FBZv7xagkAaEb6PY68eE8PahUldLf5yKdMRwQx6dl8hEA&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCpRuhBNr4ne-d_4u2s948-ZoVAr6NXpf8UacrRwGVuLO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FC2eh48vTo1_xjuJB-YkE8ob8XdIVDT9lbotDs6x_1BO4u_9T69ZxrRPeH5TRNzBNNQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD78qN2ofdDnb_IrMjJe6HGxDwUbEe1xUWDIZyYRQeRpahsM_1-66e_4zU4z_enS1cw%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FDgOfiHTiZhjmskaow5QyhDQK81mQ-ASioJ0mbzNHSrJ5QF8C3Mjwyg7LF5i4rq41jQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FAe7OOF9Dla0JwgzWJyt6dkw4bBMjF7qHjFSIyP2t1dnI&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD_VcDdh-8Y-gtucIwrsZktXelHStVPep69-KM_zguQlbUCbDwOj7O7onAeu3wkjOKQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FB-SdmS_mmoID6Y_tliCuw-GIdNduJxcPiFj13Jy3-GJoziyg4TNKs8ybGV5a3N0buA%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD3foBl4pvJc1a4SgYzP07sNJHIrup2jf38K70wJ6xq23DYBZyLCH7mZ0LvnTnBTy5w%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FA3fWo3S2RU5dz48TGGHHjfliNnFCJZ1PNgginqoDch0Z&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FC0-OxVr6SLMBFgIwj9Yi1PBZsZI3qbqbcAyHhxZatTg0&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FC2E7TIYxY2nUHrlHfM0ZT8uEEQxDjWHF9yiM866mv9XH1c-DthBO57PDJ4sKHGVFLw%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJUhPiW1l-6n7K55XKDQZgeg_8M0-J0v7V2pvHtt5Nt6%2FC-FzKf9SHcsxEuUMuhz3Nb2iPkuuVyakhFgZHyoNMCpl%2FCs7s-W93EGPjPmdKJ75BhIjDi125MNE149dKC-JI5C6M&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDKp-BVICj_0S13oN4NPnpJoTDpJ-ZLlN6stZMy-JDoVO%2FCfu34wWpdLmk--QBnjtFQlzfgsdOSUxT0WSe4av0GLfX&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDv_KRgqbByPrkpkIwe3ywS6M1phYPvC1ziSO4bV2jkhv%2FCjV4aROlTTB_j_b0fIk6cnNjhqBD9Ux2ngcC7e5q1IegLQGzWZWnvHav_2g48jt8v03XId3_7PvmEFjUGZEdURk%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJXeNyj9s8cipSdCaX1IHfJeGhuFbEQpplT_tGq2igdO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDtvBFEF8A9AZqWP4bSwjc7Nmhlxi_qMBdo5nSPUw6kyW%2FCg6tn4S8aJ7fMocuhtPcdK-eOSYcDjaV22eQ8BRfCp3tuTq_9UwuRKSCczB6t3i_xijmBmpvEDVzQoWsP8DQeTs%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDomi_UlOE2fCK4uh1SBLo8hpUmjEzJjgkiKYV2TcnvUr%2FCsVGRa8itZzMzH19HCCF_4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDqafKe03Mqt5ThsHYr1g0p8M3GQhkjK3XWuwXx3v7OK8%2FCg3Blmw1-qCzAUZBMdEDJFcW_URPAYKvBpZklymCvGct3e1u7PeW9JDIV84zlXImeL5jtezl2iRHjFrSdRG1_fY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDibgjzSbVspePxQXeFYdF67thdrD1LCcbzOYUx6lACAq%2FCib5gzBAHSo4SvzFuBEKB3bCZwFyucU9z9xi5hqmOeuMHnYd7AwE2HFB1_7yupsbItNewv1HkHIpmF4i_KIcRkY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDo6lUXRA5qY6asVSAhlxSWv1pTQpDI_v-dVt43_RPt1v%2FCnxPRAiIZ7RioifNoNNywsWZ1VRLxKBlpyI4kBkPFQSuBmsNmFN2aHCEn41P4xRz0l5sDju4zwli82N9lVMRamE%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDlMCHurTzOkWTWajS-QQCrnse_MvLrYNwxTSCXHbAIsF%2FClGSzgn4-Km_crKI7O0-BjO4IMSHumxtQgkVAeD1XNCd8f8iSn9okMxUhc30uyi2rmlSPQlTl9BJT8lYpeya6wU%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=15&limit=10", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15421" }, "content": "eJzVW2dvG8t6/i8Crr/EvJpeDBgBq1gk9iIxCIip5LKXJSny4Pz3vPRJco3AFiXYsnNgAZZYZnfe8pSZ2T9ukjQsdjef/uOPG7NMk0Oy3e9Gu9Ske3jxxs2DWd58vNkl53DziRL18catFouwTEeJhw/8cbPeJgeThtE27Fb7rYNP3TDOheRYkk+GM2IcsogEJKUX3lJFjDSISYIIQ9SaYBU21EROqGQ+YmK4ZwbeswxLuPJ6b+eJe6fh//x4szSLy6D5ndxlBpoW75rT5sLXqpLnJpVpIcGEP9SLmGlfy2eqFZ4XD3BX4TmJMHv4vtsGmL6HIQjCMoPgB3ex+sTIJ4b/DaFPCMHn/+f2IWo/O0CLlU9icvUOFskijNLT+jJZs15DTE2arJa3K5eGNLNLYRoL+FhM5pdPTNJ0vft0e+tXx+V8ZXzY/tMnu9k/T2bpw/M/t/vby5+3PPIoBJZSMWUlDlhhrLEVXnnHNY2KOM+IM1x7JzlSKGKBkTEyuKAQI7dCqBA4JrfLXbkyC4+1pWnfrbunJeol7U2ss3Z7O0xpCOnjOn88EJcWVGP0OFwf9wzpZBhyk/J+nkvLVm2k8PNmtzR33SqeZ2w5Pxn/gxbg59/3if/8vzH/cJniJeuf35LzDzDf9WqXXGL22aSpcZNLF3yYmN3k84d5skjSz+iDWy3TS29c4vz5qyj/g5S+jvMHiGrYjv7PbV167DO02IcJvK48BNY4ErzQyofIMbfCRSKixtxF+mERfGL+upA3qfmQzpaHzwfyIaRm/Blp+CYLFBmqOZMxWCGChzQqhggV/tJXJp1Aoi9p/HRbXLrtaQ1lfJtf+XCb3e3Cws5Ptzm62NWryGXHbTxeVOhYFA60mzw2C1XWXReyh8Ownez2uaTURreFu3aCcqtiq0o65m5z/9Dr3BvWPFWz/Q1ed42th/5GNgu2qsVt4T6pPDXxI+6My2bYkpXJ0Ks5qcY2v+P75rLDH54zxXZpk9yF20K1N2kmA8iqWMoa54+1Qms4DuORekCZKjrIPlkfymnK66m4zWdK51rUnbLbPRf3vYf95EzrliTN2X7fP5nZpDQelk+r+kN+Pb99Y9v/K+iX0EHYL9A4MYSLS1cLaFFLoIWxFjp6SSnhWiGDUHCcc++NssIIZL2jFkdIjYnRORWwVRZpGOu/R/7ShHA1z+GPV+RyGw7JDsrs5hPcsNKUcYG5QFTyPz++AtaJYG+D9UCDQ8i5QA32DrnAHQvKSUYVi9hKbj3BEQnNpZLogg5OGcc9NoExTtUVWP/h4b+C9bin7DhY+/vFLJNp5ZbTtNSan+N45xud3nMXDTqBmQO6u4+Pr4Z1chXWf0KAXoR18s6wDgXGvYVSIkJAIVuDCJSzxYSSGKW00gIqOSgy7KEaqaQCMJ97FyUxmqArsO4aG6babrqo1fyZsDrA22qza2kn52Q0kTI/ZCNWON7Hh9pBlodo0M52mvPOvRwUVmI7Mtdg/Q05/1WwDi32BdYhqpgSHShVViGqsbNEC0/tpbsxDi/DulfRUQ350M4xTABwfLCRe0IpFiHG/wewXltncv1KfjpCHUxXdVZvLtfVVbewrmaG9/O62KXDh1OmWlj1G7dvbM4XwReBXjKKatBLgUlnJJcImo5Ez4PTjFEQJNEroQVAZATVFVBklGHhFDSqJN8B31dE/BvgS4TWkpBXga96q6QmVgup4dpIahwC1aANPZLBIBuZwpwSB6EwLBLuuTOMWQl8owMIsQD9e01S/+jwX2HvtM9MuzHvdnOj6ciiWJkJt6xPJ5tcQfeeyXLs8jLwDa6E8X3r7jwYDpaHsjmMyJipaaoOiD5WPB3J5mFRLE17d8Oi77Vnn38iTv+EYP5OnI6IM0EMsI201HiQhgC7hGljsTYENIcWESrWcRxBh0vjjObRiahs9EBN13DaHPgp39yD+lkc7w7T9DxyMlfclHJtPyoxPMxkUlR9mGVkVu5XRGISnwejMHElcshsjo/b4xWcfp/6gCv+KlRXf2l1yhGjGlkMTA9ggl0ImGjwOA6MXMT4ZVC3UVIiGcOGIU8cQI1FHNMASl8DzITfD+r5dnTL3Ug2Cr1Zryg70+cntsy4RdpHM9desXHmtMMDXx4utsXbwmFUa483NndqbmfrWeUY6OnYEQ94PXlqHvL4nHQazPbJdDY53L4jRLzIFgIS5gK0OfQ08YqowIWH5oBswe8EQJwJFyJyViBjnbaOgLW1CASahS6z32GLV6TyW2xxeQ+hV7HFm1dgAuNKYYAt0GU0guXG2ikhGVFYaw+ABXgmg6BCQCTA9FggNsAMZlSEufNwTar/6PD/ootC9THUT1O9Uy5Zd3zePOJKOVbD3WRfssUW9Gd3lN5tSDL2jVdTAL0u1X88QC9SAH1fCkCaU4k01QYAh/mL71OUgwnVIFOsY0rGL14waA7MQJi3niIF/8FcJCL8CgW0Co0GP5mVbtU7FdMc70qV3kyAIjpFm8k0G3Q+bPXu2Drrn/uPx4fZyfWX82nSb6Tt0nCfT65I9bfk/FevwHAVIaCEWIi94YggjQiJoBiJ8zFi/TKqc6u9YgFBWqiiQMfg/IyJCgyV9eD3fz+qv3EF5k3N+SL4Gu+ZllFBqwRQ7KC/AAoRvOothdcAjjnmoNa5wSDGtKLSSFDhHofIo8HuO+D7ioh/A3wZpkpq8TrwFeht4CvAhgRJmAVpAMUkpeDGBstBilFEHFIeKW0YgAu+LBeFKIE1lLDcOWhgfG2d5IeH/0qrj0W6ZB1lqjI+rNx+kjadr2VCo/PkClPTJyS0VK4d82ua7rubke4d9+1aJ+/OOZHSZPScTBe5xfpQLPTPrdVg11SFVujuXq/V2VWg/gnBfBGo2fsCtRUBZiERptSAj3TcicB1YMpiiljgxEh8WdV3SCLvGENYex4jBefKIlTetaXyWGSiq1OazfP+uZc9Zssm4qdDYYpq62Q4Fv1Rtn1+TMbH1Xw77xwx7e1c/1CsTkd4tB/Ia1r9ferjF2p1COEXWJcUg+M3zrvgtDTCSYkZsLsREQV+bWGdkuAIEIMGQwUSz1OuwGcxjI3XxFD8+2H9bWI9PeRKxZLK6uxwM2gy2zlOnawvJvPnZLR5yPkVX3aavaOYnQa374gRL/IF9AEigiMFQs0pjZ0gNgZw7pxzFIjhCsdgIBnRxRiNcxdsh5Q6ZSLSmn+HL16Rym/xBRUECfoqvpDkbXShsAErIgOUKkKWMQXIFS+TEw6UnCQaJJu3SHBsEGNUEaq8iBw55b30X4jxJbr44eG/3i3t37WNStLh+eFcxrqcz5dGzIXHdWl9rGZ75XW+nd3cNSxriArX7cyqEAqn2sOmu1HeVLKHJ6XzVcGWq9amHeyiRfOA3+pn0sVPCObvpAvFI1YBKi4wbL3lIRoLrIEYJxwkP7BJNNFpeDUyKHJsjbVWg9Kh6lL88trSTm+uqiltNdvN+1DKTg/rXKLwbrDOENmPx5Zg0+nhvLxL1ax+LGZWcYrcuF8bNdNm8nRcN7LXdlbfpT5+IV3AL1+WdoIWRF02Yq2OwMxUKGUDxUF6kBvsCltIJl0QWGkNX2aBQdoYBdUitJcYKfN3Y4vVIhn15o0iifka209wJ3e/UpN1bzEtnqvT8SypPfVJ1y0Pve3tO0LEyxsBAVEibBDIx8sXNNjjgKFVAr+sloKbZ5BCSw14YHlZrvNUR1CKnlKGASG+wxavSOW32IIoMI6v2wjA/I10wTzHWopANSEo0CitA9/DDUAC5TIEZ8EtMeckclgyJhmoSkGioMwQmIi5Qhc/PPzX7oLm5osjzmzy52xvmHvwxUK15AajXruZfaodcuvhbH5a5A93LqUB72UzDHS1UOkrdp4/Vhbhnk/TcJ6TpF2elrYd377Do/j0errgV+niJwTzRbrg70sX5HJgiETFDZhZaxH8C5g44D2NI6gcUEJSQTcAZjGLkFZMgu2VzqEgOY3sCl2Ep7AvrXtq/2w3uUF3ZJ4AATeimAmn9ngUZb4+iIVdqdZMF91UczTsNnzOHpTI3Z80GSTX6OJ96uMX0gU07xe+AK3hOAJTB84uSiEuZ7TAgkYtrUKWX1s0ChFT452JFojeW+eFllhHCQYwBsn+bnyxMbEGcPywSXl3sis/bfEYrdUDvWtNZtMafRzsj4/P9CAbNXX7jhjxsrvAQkBrRB59ADGIwRZya0mIUjODJRcuSlCMICRd0JZSQiA7GisHBOMj899bjbqeym/whSBYa/W61ag384UHOopaaHrZEzeXNUyLnOOUc5iUBlb0gHoqOiUQOC2LuTDYaYSIcsB3nF3hix8e/iu+SCwfn3PZcmfFOodzaZ8r1nLU5ofH0mnvevqsnxM+2SwaYf9QXj55mT0WSbmUwyN52q93tpLWw/GAy7NyZb0osWRUq7j27KfyxU8I5u/kC3Y5oRYNE54hsBWEMmZAyRATnKTOuOANipziiL03giESI7+UqFGKWkPjFb6w8m78/GhL7UPfdRLa3XVazeGsmlt2jkRkJ10862Vbw8V+nt712+eVy/nlLDtrz5fzwZxN1+Nrq1HvUx+/gS8ElcJdzlBZDEhBLTP+suWIPXUR8Me9zBfBCRXB/BHBiQDfSlywoEgoRhjqzNC/G18kdjw9d2x/tw7N59ZjKD35kpDpxG8L+D7v7Lnx1HsW82w+u7l9R4x4kS8w5MUHftkxxsJQFYmDPFFwFtQ57JEzykQmNbTepakcCc5rjplXF8uO0Xf44hWp/AZf8MviJcfvctDIYY4kUUERTKHRFYruQmc+OiMBKRAGW6Wd9Ujyy2FUYi3IYxMoFchK+9dS6At08cPDf0UXy+dmO5tUhrKdrJJYX9Xrp+NuMMT99v1zLTdfnypslps1S63OPgeVvijViSnni0uGm+y5fUZzvitM9+x8nCeK1PW8/9A2i+LPpIufEMzfSRdQlKBfDZQo6FkvPJdMUSFJkMZab8Jlq05gqwgHS+0vdy3grqNn1AHNAN68TBftMrbaP7ZOp0Yj3HWarFYzqbIq22jXz+sSK2VPfo5Lx9NutJwssq3KflkMaWcCt1WpxknpGl28T338+oNGAlPltHaMI2qMvqxZUApqVTkijZHymrsQGDPwhcF9ebbA8EgZ1ooyTZiXf7u9i5WY9x7bWb55EmbX72Qn8+fO4ACDttaFyuiQ8f2U0VG7meLD7TtCxMt73TToSKyWxHKJNNeA7iCqOMCBlzwSCvYbEuCIU1RTAdyBGeJecBYRQf57zwS8IpXfYgu4PBj/17kL9cZnArQKQF/aI0KEcxHwi7mgsL54IO4dih7uzjuNo6KgmAUhjBO4/+AJcZFdO5f6w8N/RRfzu855vGSZ2mLktrWKbKBMbtpglYdOeb94TlvjWT8bCvixnvcqqqSz1KvZw3Nv4ijanxKyXcw7zda8O9e5alfNn9bhZMSx93q6EFfp4icE80W6EO+81y0vT8JcTnAwYRkyxlIH1QwuwxoFt22D0IzBu0bQSDiCefuAIbyMUKjiq88PbE/txRZXdttZd4FwLqx2R1RZD1QPtY/F0/3AjaYPuNPVK9sZkPXTaVXKNuvzlSh2Huldo3ONLt6nPn6lu1B/PW1ApXbcMYkF8kFEJkR0mAanHA5ecXGFL4hnlgpAGCZ4kD44cjkTbYPDkB/xt+OL+UO+vN92z43ZoDsw006m1cpvl7swejjcb5/qx+duJ/9YttnKrnT7jhjxIl9EZIHLBZhtcBA62stDRAQp6BItmYgA9vRyVIpg5EEmSsER4soCc1CPwXrg7/HF9VR+gy8kuqxZkT//8+PNl9qEt9DHm1WMu3D5nf/5X3Mnrag=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJUhPiW1l-6n7K55XKDQZgeg_8M0-J0v7V2pvHtt5Nt6%2FC-FzKf9SHcsxEuUMuhz3Nb2iPkuuVyakhFgZHyoNMCpl%2FCs7s-W93EGPjPmdKJ75BhIjDi125MNE149dKC-JI5C6M&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDKp-BVICj_0S13oN4NPnpJoTDpJ-ZLlN6stZMy-JDoVO%2FCfu34wWpdLmk--QBnjtFQlzfgsdOSUxT0WSe4av0GLfX&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDv_KRgqbByPrkpkIwe3ywS6M1phYPvC1ziSO4bV2jkhv%2FCjV4aROlTTB_j_b0fIk6cnNjhqBD9Ux2ngcC7e5q1IegLQGzWZWnvHav_2g48jt8v03XId3_7PvmEFjUGZEdURk%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJXeNyj9s8cipSdCaX1IHfJeGhuFbEQpplT_tGq2igdO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDtvBFEF8A9AZqWP4bSwjc7Nmhlxi_qMBdo5nSPUw6kyW%2FCg6tn4S8aJ7fMocuhtPcdK-eOSYcDjaV22eQ8BRfCp3tuTq_9UwuRKSCczB6t3i_xijmBmpvEDVzQoWsP8DQeTs%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDomi_UlOE2fCK4uh1SBLo8hpUmjEzJjgkiKYV2TcnvUr%2FCsVGRa8itZzMzH19HCCF_4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDqafKe03Mqt5ThsHYr1g0p8M3GQhkjK3XWuwXx3v7OK8%2FCg3Blmw1-qCzAUZBMdEDJFcW_URPAYKvBpZklymCvGct3e1u7PeW9JDIV84zlXImeL5jtezl2iRHjFrSdRG1_fY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDibgjzSbVspePxQXeFYdF67thdrD1LCcbzOYUx6lACAq%2FCib5gzBAHSo4SvzFuBEKB3bCZwFyucU9z9xi5hqmOeuMHnYd7AwE2HFB1_7yupsbItNewv1HkHIpmF4i_KIcRkY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDo6lUXRA5qY6asVSAhlxSWv1pTQpDI_v-dVt43_RPt1v%2FCnxPRAiIZ7RioifNoNNywsWZ1VRLxKBlpyI4kBkPFQSuBmsNmFN2aHCEn41P4xRz0l5sDju4zwli82N9lVMRamE%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDlMCHurTzOkWTWajS-QQCrnse_MvLrYNwxTSCXHbAIsF%2FClGSzgn4-Km_crKI7O0-BjO4IMSHumxtQgkVAeD1XNCd8f8iSn9okMxUhc30uyi2rmlSPQlTl9BJT8lYpeya6wU%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=0&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4067" }, "content": "eJzFlmtvGskShv8L0vJl7dD3CxI6wibGcYiDARPbR0eoL9UwtpnBzIBNovz3rfHeoqPd2FayGzQSM9DT3fXWW0/1p0ZWwbJstP/7qeHyKttm6005KytXbfDHRrgFlzf2GmX2ERptyjhle41QLJeQV7Ms4pBPjdU627oKZmsoi8064LiGkFJpSTVrS001EG4IjYITLYSkQVprqHOM22DxXpOUiLZWKi4JIwRkTIYD5dGDw7VXG3+bhX9o+s97jdwt60m7s+lQ9EY563+8OFpk4t0V7V683U1G18zrc1P0M39+ML3sZ2Ze4K7gIUsYPb4f1oDhR5yCEar3CV50Qk1b0DbVPxPSJgTH/759VO17C7QsYpayJ3ewzJYwq3arOli3WqGmrsqKvFWECqr9ssIwljgsZbf1iEVVrcp2qxWL+/y2cBHWr2JW3rzauTzCw6v1plU/tkAz6qONjEhLPA9EmeTByCi148kxwWwQ3CWgwWhDrFAaQ9OOkMi0MrSllAGQ1Lfy8vjNDVy8zd2ov5rscnKeje7O3DkP79lD//Q6P705XuTd/W5v+rZKWVf04126OsoGp2l7UjnVd/lsNZy8vUqqknC56Vf3V9P7n3gPr/9sstj5Q/NmHWKd9c5Lct7EeFdFmdWadVxVubCoq6C5cOWi07zNllnVIc1Q5FVdG7XOnS9U/okdfalzE1WF9ez/tlVXWeexyJoL/McSzHo02oLxwZJAfPBoAE+IAa0kby4hZu7XpaKrXLO6ybedLWtC5eYdy4TloBRnGoI2STnFdDLCWsxIJFBXlqsWmOo6ke3W6zysdys0cuuwiNDqliUs/e2udcCX5ekJCd35iM6Xb/hc9bZ8kl0Meydisup1t9urUVZuDrKjEWm9sIj+DKDeBoZQo2bhmFR1jQhvtNSGUSoS50qRgE4BR6NywRpBKJCQCEspcp5Y4sxpYbzQsS6jUAf428yPlsbVosSHZ+iyhm1WYtKQeMIay4XQ6F38qM97z8CkIC9jpPIQcYUUIgXADSnHNX4nKQL11gRjJO5QJpFsoMJ5RT1hQQiMmqio5ROM/Obpv2Dk7Zzlh+F2k3qwLKZpdV/Rj4f3cacX+w99M7gqL4tVT+yzQzb4joz8DgL9SEZGEyW6yGvGeLQ0UiG5pzRGQSXzgXAmPE3WJa1DMFQgI7kTJLooldBePsHI80UxP15nXbjubgfZ694pL7eTzeQSzMM4n+0u3/A3g3e77fGiP/DucFjM8vXk5kQU1JZ6kqXDpxj5gpz/W4wU5BGQAF4H6b2OjiWQnCAVYlDRC2yh0T8BSHSVJMIIFVJMkEiUjDgFXAUwJhHzjwCy1x9l5KB4fXbCxq5/N3h3Ph44MdyddKd3dDVx/hSmd3rY8ydWtV5Ybl+lafRBBUaClBZLBvs1EAGgI5XGYMMhnmieEnAeNNYNV9JQaYXn3AqHdWT+hqbPEPGvaGoVM0Y8i6ZSvZCmwFN0XiQFDovLYds0UjqHhw5DjVSAJWgZooRzF7HDJgMGiBOBW2JDjE/R9Fun/5OmveG+ch+6swfH7o9ODuPZzH3YfBhPrsZDNX3H1GR+Nx6uz/IejK6/J02/XaAfSVNm0F8gvRboMOo8cYCg1IhKtF9wnAWmEf4sglBKAWHUQVRIWDwuJy71EzS90OxsPD6ozt8fbJbHcizzxdHNUh3f7GYDJ5eryWI6uB6cDrtyiYeI6nI3zqblVL7vXk/Yhbiez79O05fk/N+iqVSPNPWUoSsidlXDja9FtCrKYIBFisqlr9MUojEKjeIkSzowxwPlifuAR7cYCRU/nqYvLLev0pTFZLGTRxXx8GnwVO6IJaAQoFqj2Zjn1iFpkZ48agJBeDQd1wybvBdGkr+h6TNE/MuzqSFCs8//22s8mqLR5nuNIqUS8JZ8/gWJLuHK" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=3&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4233" }, "content": "eJzNl/tv4kgSx/8XpOWXC0O/H5HQCgJJIAkhhJBMVivUj+pgXgbbkITR/O/Xnt27He3d5qGZ2TvJP9hWu7rqW1WfLn+qJAUs88rhL58qZlUkuyTb5pO8MMU2vqy4BZhV5aCSJ3uoHGLEDiouXS5hVUwSHxd8qqyzZGcKmGSQp9vMxVUVxrmQHEtyqCwnRoIAi3QA4QhyyjLilTRceR1ICECQVIIo41FgnnlkndccCSt1EHHn9dYuEveDzH8+qKzMsjTaut/JJ/Mwb5qOFYOPQkFHDcz0ZuHPA38+8xfDx6sn4Rdq2mlGr+ApCTH6+L3LIIbvowmCsKyheOERVocMH2L9D4QOEYrr/+V+VO17C7RMfRKSVz1YJkuYFM/rMlizXkdNTZGkq3rqCihqeRHDWMZlIVmUK6ZFsc4P63WfPq4WqfGQffBJPv/wbFYenj5k23r5WJecuOAw8gG4NARRL8BZqbz3isdovBTMCmkkYl547JhEQTNHlWfBBerrIgoNHEN9lZ9253B3tjLDk/XoeYVukuFmNDhOR7WnrMtG++YNNo/3Z+NaoY/udrNkP7/a0+XD/bbJTzP78fZkrbvN/Xid3mWXm/asSefZqvkTbcfr523iG//WvFqGWGa98Z6cV2O86zRPSs0apiiMm5ZdUJ2afNqoLpJlUjRQ1aWrouyNUufGVyr/RI6/1rkaVYVs8ie3yh5rxBarTuN76Qi2DhmHguPMcyOpA6+ixpgwzG11CT4xv23kTWGqxXy1a+xIFQrz0OBWOAtMekEJgBaWa20D8cQIxylmZV+ZYhoTXabxsN5Zuex5Hcu4fpR6qDfzHJZ28Vxv0WXe7yHXfBjih2WXPoj2jo6Su0G7x0brdnO3ux8m+baVHA9RvX0yTFAr7Vz1yLU52Zxf3FyfGzZ47jXHG7weGduH8UYO2ranRf2d/fZHtKXPMd6SSVNDuIjPFvFgjObOE8SFBmO5CNrHxuFGYc+Ui/pxSz0oySk4wpR3HntBpFACeLT1u+Uv1R938zw+vEHEDHZJHvMb0ci00pQxqXU0qsnng7fwlKD38RS56IDEFkUIBMUEYZoQIqSP4WqkNYotpygz0WWhsQsiOBJFwkozboklr/D0m83/wdOj9XA7bfUztoKan7AtyTVTtft03MxE/24d1I1x2fDxZLw9v3wrTwl6laffQaCXePqVBz+EpxAU4hiBQgaMD8758oYYLh1SmCmOqPM0hIgGBREG1HrEnSOBEIoCqFd4avw2uXjMurf64rS/7J1e7Mn1rdlYtrhOjjeqO2jdjGck3NTg+KhG9mI1eyBnN7N8s8PnvHM7eXyZp+/J+d/GU4K+8BQUQ6I8qxi2HGlsWQQqVZT7eMxygJd5SjRxwhoZGYNCYJgaahkQrmRg1GD6v+fpO/vtRZ56pUOkJnHeYCuRQuUJHpjRJHZNrERB4zmvCEEQNBCqjQsRryoYp4mOjPwLnr5BxP/kqUKKIKbZm3jK3zufQhBaBJDCE1AiTmDal85YyoAx66iBECwJUkfkK0mCRYR7D5yBxQI5+QpPv9n8VzwlMGVqN0rx5Gm27bVqH+cdlVp157vj9kgvbFq0c/E0wa1Ltp3okdD3T9lwAKd8NOzvW/3+VaPxZs7iVzn7HYR7kbP4x3KWYmwMBsOIQ4CUihMVI9JiFBRhJp4LXLGguaRBSxeYdoQA83GABRMIkNfmVph2dnfFsDXr1RZJe3s/xg9+c7VgfI99v3Uyzo7ORl21Sc3H7hE6mzWvSGc/rfX2J0EdXxQ3F69x9ptr4Tf7fxeD+e8zLYqHlObcAaJgVZyrgGks4ohGMIr84C8zWBBflhQPQjIRd4h/SsGyWIPeE+oD+T9g8L4vzuftPb9Fg644SmdHhXb3aHM9HTfn2W1xSYct1OqftLeXV/Xv1NAvgpyD4nGcYByoUeWfVyzZOPaQOEdICDh2gFQarJXOWkq8o9jJ8ueC8tiQCORfgPwNmfgvIMeKcYH1518PKl9Kq3JIDyppCDmUt5//CfhcGfU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=6&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4401" }, "content": "eJzVl2lvIkkShv8L0vBl3U3eBxJagTG2aXwAxm57tUJ5QhmqCqjCGLf6v09Uz+5OazXjQ+0eaSQkyCIVlfnGG09GfqklZUiLWvNfX2omK5OHZLMtpkVpyi08rLllMFntoFYkT6HW1AQd1FyepiErp4mHCV9qq03yYMow3YQi324czKoxzoXkWJKmlhx5jhSlHgdjA8cRaaW0EpwEF4PG0llnrYlUG2xt8Mo5ybn1WltJLLx5tbXLxP2k8F8PaplJq6BdqdbnJI++m9np6ebsvh/EyfFjdzexRwE/Tm66p3f729EwjFZmXpxN8QchwpQ9TdjTNGRj7HatFqw2PCYRVIG4bhNAFg+hCcLyA4IPvsKqyXCT4H8g1EQI5v93W6DmewuX5j6JyYsrSJM0TMv9qhLBrFagtSmTPGvkrgzlh6KEbaQwLSbLasa8LFdFs9Hw+S5b5saHzUefFIuPe5P58Phxs21Uw4ZGlEnrDWE+IKow1soQEjzyigVLmcXURqSMUdhb7T2xRlJYOZGUkkhMQwgVAie4kRUnp4vw+VNmRserq32GJsloPWRuGs5X53ftu8fBcX+Nwn5yMb99unVdf3X2aIYnqzsah4cz1PuUXo/3+Hi/C7fb/iXLi3Q26wx/oV34/HOb+Nb/NK9XW6zc0PpxL/wWvw5arPIiqfRsmbI0bl5VTn1uinmrvkzSpGyhusuzsqqnKget7zLwC+l9n4M6KB420/9bclWXLSjL+hyeI4+cVth4RK33ynpmNAvOOCWdis7W0+AT89uLvClNvVxkD60HUg+lmbUUElJaRL0H71muI7WUSi+8kIQFUXllZco5mKBKcbNxlLnNfgUWbxzmPjTaRRFSu9w3OjQtzvvItWcjPEtP6Ux0H+hV8vmy22dXq2774eFulBTbTtIboUb3eJSgTn407JOxOV4PzibjgWGX+377eo1XV8aeh+u1vOzavhaNw6dzMVh0n/gNujwVh/n9YandHVqP59ftxeamvKCjDuqcH3e3F8PGOxX075JVGwfRKhjODeECxgExjZmyBkTGlmOGVHAaERG5CEpqQ2xUUKJEI6yJxFRzUFQqo7gLDDGI9Z/I38oL3uY5DF6RiU14SAowSa2JmVaaMqawZoRw+vXgFSAnWLwN5IEpxzkBFyEFeyOMRBsF5ZoYLhgKxAYcLY/wpRGiMLTMUW5oVAACi18A+Q+H/w7ks4uYnFwld/P7tFiYfMeH+3l3+EnhdPihPU7yPkrt0/nJeNPnw546pGf3u/1MDno8YZs1w/fDN4CcvAjydxDuWZCTnwtyxqxjguoAa5M4IBeowEIJSzRHgUdkmMCIezBehCCwS6+5l4LB1gxx7gWQ213wg8nZNbqcDUaT9f7pRHdml/Toti9PFse3i+Xp4PTe5JNZ4hfnZ8uM8fRRL8IkO1r0xjfZTfsFkP+wF/5akENZfgM5HIFgBBQ0j0xCgXMRCRjJs8BCQNw8D3LrgTEYOGEgE1RKbbVVzDAdAhyxxvzdQP4+Bf0syKEfCcFRZIkzMnJjPA8UKXB7NMIKgZwT3ljPKbeBMe9AU/iXaQvztMZ/AvJXZOIPQE4YwpzjV4EcU8XeRnLHqxYRQY+oEY/c0siQ83B0aWggoT0zGkWnLPSZPmoRGaaGBey18tIhx9ELJP/h8L+TvB3kxUVPd5cG9Xezp5v+vhR+sWO2c3bfk+uT+974dH9JSuyz01cTm71I7HcQ6Flis59LbIOQ1QFWqTUyysMdwVodvfdUKLhIkGioRhYL8DN0KQ5p5IkR2jhddeiMvEDsCTJdd7gJx587Me+sTtLr9lW2RKvx4rPObuaXt3a36hs3bWcX9Gow36a30Y1Hruz09u2o+70XiP2WnP9VVK5q7BuWo5aIy8gidwLBPcZhCRevCF1ahOr26HksGzjwsYwI2jgDVCfKVywPggjrY/T2b4blN1bns/iNWqEgrZDIihiRFFZLAahESDO4CRtvnCPgUYu8Jb7CcPSaKiGpgoda/Ql+X6H4H+CXI4wV11//fVD75qFakx7U8hiLAD/F118BpgBUpA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1439" }, "content": "eJy1lGuP2jgUhv9LpOZL6cROfImR0CqQwgw7HSgwl3a1Qr6CB3IhMUyZ0fz3ddq9VPulqrQr+UNsnxyf9/F5/RJYp4s26P/2EvDS2ZNtju26ddwd/WIg95qXQS9o7bMO+jBJUS+QVVHo0q2t8hEvQd3YE3d63ei2OjbShwUIY0IxpHFfYsWYADQWDGCDRWIQkAoiwKSkKkWcASNTQXCsDCMGwYQjDRVLFZVAYuCPro9ib+X/lP61F5S86JJmms5mY5bvOZg+bZ7vp2dH1O4JieGHxzE9XD6Ol1fneeygKq98VfqLNV69/1822stXPkUMIH0H/IArmPYR7MfoLQB90Kn4q3xP7b8GVFTKGvvDCgpb6LU7151YXteeKXe2KqNKOu3etc7LKHyYsfsuYutc3fajSFVP5b7iSjcXyra7izMvlf5y0RyjbhpxhZmQLAUxTKGIqUlihIwGMQcMUgK1ZknMOSEQa5IizBTkPMaUAKwlNioiJNUaxzgq28urnX74teSLSb06l+DWLg63gOdy1OjJw9BUw/qyuMtW5R7Uy90DK++380/iqZ5yuc7KWbK63h6LT0YuF9INx+fMsOk4e5PkfvxytGrwN/Owk9jd+uBn7jz0euuqtR2zAXeOy23ngnDL2+0g3NvCugEIZVW6zhsd58F3lN/E4+85h56qbtb/Kqsz2aDzWLj1G4ZRgKlBBksCkBYSUqGVURQbmlAFwkIry7+dpLjjoduVp8EpDrXjmwHnmEBqAFGEIwrjVGntmZOYCGWMEp2xuNv6m+7usR+9L2Vzrn0fR6NK6ShrW12I/TkaJkV7MwUy2yzgprhKNiQ/JSv7MM+naFXn2en0eWHb49COFyDKJwsLhtX7j9N4ySeH6w+3y2uO5udpdneA9YqLG313oPNcTBmJRs835HqXP+N7ML8io+px5Jj8DA7L7V22a+7dLFkMwfBmkh9nH6OfdOc/aDqBHk73hG194xE/N75dNRWEAkGMAZQIRgkTKQAMMYq54lLGhHEBlIiVUDgxiiUpoUnqF1nqc/2Z+atX/GkKd576MfFGn2zru8G/pIilLEEoxQDCFLPX33vB1x7yW72gMqbV/pO9/gGfMryI" } } ] ================================================ FILE: tests/recorded/async/test_get_last_uploaded.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwVjc0KwjAQhN8l0Jt2UW8BEcGfF+jFU1m6W1NMm5DdiCK+u+tpvm/mMB8XCo/Ou6CaxQMMMVVaY57aNy7Er3ZhhecGaJIHFJZUy8ByyKhh/++a3bHZXm54Mu5Y1EQt+jtrH9Gg5piQmNzKzawhkZ1dz52p8pwjqk1+xCj8/QHnfDH+" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Ffirst.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEsOwiAQANC7sO/wtaScwwsQGKUFazudJhLj3XXh+iXvLQrhTQRRmLcjSHlu7Rkzkl8gz0eFHteML1iRg3P2zwNHuiNLo4xTXqurnpSxFsw4wskZpkK9tD2VTmpvlOKjLjPuKg319zpjvTYXLT5ffm0pAg==" } }, { "method": "PUT", "url": "https://uploader7j.disk.yandex.net/upload-target/20240710T190233.266.utd.9hryhlqchyr0qlrcamkjieq0c-k7j.42371251", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Fsecond.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsOwiAQANC7sO/wKWQo5/ACGKBosRCY+onx7sbE9Uvem+UeE3MsE7XhOD9aqT7EruwK4TI2ePk9xCfskZzW898n8n2NxJVQWqAUJ7kINWuQRsFBAbzN5W6uZiSUxdTlnPsttUe10/aLtUXEWSD7fAGhiihv" } }, { "method": "PUT", "url": "https://uploader28g.disk.yandex.net/upload-target/20240710T190234.152.utd.a8hlv5j5sf71l5o9bhrmfpwo8-k28g.48777307", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Fthird.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFsOwiAQQNG98N8BBpoC63ADKNMWq9jwUmPcu5qY+3mS+2Jrppk5tta6F8d52y83HygrXCDEssHTp0APSFSd1urvQ/V5ocpRoBaTFAdpBaoRUFhoNYAZT+U+ydn3SNhS79eo9Plo+rD9xtqi+Ybs/QGhYShq" } }, { "method": "PUT", "url": "https://uploader32g.disk.yandex.net/upload-target/20240710T190235.209.utd.85csw71favie2unvvmi34jb8v-k32g.49282822", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/last-uploaded?limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3483" }, "content": "eJy1ln1vE0cQh7+LJfxPQ7w7+27JqgJpwAUVQnhJUlXW7O5sfCR+ie+cOKB89865lNAKcCKCZNm+3dPszvxmnpmPnaqhSd3p//mxg9OmuqgWy3pUN9gsebGTzginna1OXX2gTh9gq5NmkwlNm1GVef9jZ76oLrCh0YLq2XKR+KWONsY6Ix30KUWhwduCslA03mN2NpWsoEApToLRIHNSEHLx0aGwNrmgkkAdbQ6FD54v41mVfpL5663OFCet0WZcLfJ2s2r4SFpVhV3jzbQg9i3zPgjQD4V7KMVrafsC+sr8IkRfCH7/37txSO7b+8ksV6XaeINJNaFRczVfe0Krpjc/w6qVrVRn7dq4aeZ1v9fLs8vp2QwzLbZzVZ9uX+E002p7sey1j72okpYyFBsNePDFaKGs1kJm0slniTllSsaHlALycnTKOwSJCJ4iYc9aT+TJ96b10+EpHT6b4qsn89dXU/GmenVOTTqHOT55937vZFdbMX9lj0cH1Zv08jgq97hc+azrR9PV+agcPnu7vJxd7sH5HxDfP9q5fPRip758oHb58+uyyoPPUe62LrYiDj5L2GVn5rO6aqrZdIBNg2ncZmx3jPV40D2rJlUzEN00mzZtHrdhG7RBewB767B1OUi0GP3vlLYABgDdMS/7UMASR8aqlDWQzlqqoI2WlBzm2J1QrvAfy3mWluvTm9PpxeACutTgySBRFNkWgzZxhKUPITqjSAElSNalNvGxGbN0rTD93hHu8u9rqptew1+jE2pGZ8h/lvO1nrn3ZQLfHN8a+HSBtojHCMa2a85rwXkJxnCKKpcU8YoVJQRW1ZvgkyrknS8CfVDFOAo56aBdFOiCYVufrK8TjE/MpoXFZq8WdFHVrEunz1EVFpwyxjnjnbveug2A1N0AZJJjbcgjBaNQguZSCzELIUIRjrKPwhVlZeJn0KloJzzflPeKVyDFBgD9sPkbANXECXk3AumNBLoH979LIH3fBFLZeBs4MUGRRmeMJA1MIHI5eGcjFvRApsTsCzAwDWhMRRSbwWpf9AYCHY9Gu7PTvd8P01uF4smRNvuHL1EfDOXuwQ58yHYUns8h779Yjd59uMrDy9XRxVEzP6iSaNwxzDcQ6EbDn4ggtUZQRAhIObZqekc2SqcDosw2oUuBNiOIdSfUXJ06RiW00Emh9pp7kwyagO6OoP+k8EYGOT4jGGetjNokMNx6sgCfuKmoUrBAdNxtuFOiBqFcLDIyYq3OmdNWGvoGg27h1tcYZKQ2Xt6KQdLcjUE2O2Fckaggq0iCuWiN1sRDAXcQpz16rjuTiDEctVagudGiNDFkYJyqDQz6YfM3DCrVom7uhCC1EUH34P13EaTuG0FFJm+cBytJGq+ygxiARJJRxIh8QxTc3dBHntgAsk85GAYoYchtGosNCEr4TD0/v/TD5Tt1nI9pOTw8KU9heHQwfrl/sPvb4vBxpVMIu5PhavK7q0bvzyfDiTkyO3E/Pz6F/e8j6LOEP49A0qwJZHkYcIKrhls7GM+uG0hogsyRKzXjZgJR4RnE8bzAFaq8TcSzRiajmGpB8jh5dwJ9mcAbAYSQidgJtGB9AJMx8CQiMDoN3GjaNggEJRqdCFTWIZRoLfLEBABBqG8A6BZefQVAXAsi+HD911ZnrU2nr67/BnifKJA=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/b3c4119f6b52828f540364401de4c8d1adcdec589cc9a401b7387a21aa28ebea/668ee8e8/nsHIkeXKnaRGpTyn0UiRqetcq2paGWjFgD460pR6Z_SiUcPZb37Cfy8d4sBnxq_fXKVuwowF2qN2bjBAwBOAsw==?uid=455675172&filename=third.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=22&hid=89f26e64463cd42e4d41394541ec7adb&media_type=document&tknv=v2&etag=ceb0d6f5a6c3641899b753e32ec2c67c", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "22" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/3d5869fa223e4a7551e42440e7d9876bafa82e5fbd8f2a06524acf0f6d2648f4/668ee8e8/nsHIkeXKnaRGpTyn0UiRqZ__DokFJXcV3a0GY45QXPa4SI1DSA2zd6_9Lp2dQOx_WzydIwxYvYtpSic0t7Z2pw==?uid=455675172&filename=second.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=23&hid=ba29aedb9bd087e6b1749aa1d6ca7c9e&media_type=document&tknv=v2&etag=f36ea43e34bb30404c3a4842f2194e2e", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "23" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/f1c8578261e1583d72b92e0c1b0bba443a0c36a8bb7a22d8cd951c0ea9d5c250/668ee8e8/nsHIkeXKnaRGpTyn0UiRqcaK3Lqw8IuW3ZdZeuIXgfH2IYShPQSDErXCi4c99DmIxmJ7i_jqmIm5Y5AbQdCk2Q==?uid=455675172&filename=first.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=15&hid=647b704582c6258c2552ca591db1b9da&media_type=document&tknv=v2&etag=ef06f76f53a4386cea89de53db991bea", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "15" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAURdG9MNZSSim0c+MG3MCH/0gbayEFjca4dzu8Z3K/Yt4RxSTmWnOZpAxrevKZ8tJ8aGO8mw1VvpTkpdxlytipLmkrMtqgXUBrO1hjWzgP+B4DDxR9N/pgR9OPvjWdVzrCaR25V4bs4BTASpzEA3VOfLyvl9uRFY+8UsUhkdaC3x/D3jIQ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f7c38ce072e7570e8beeb4e6d6afb29bc79549b052b13fe833fd415a7681eed1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f7c38ce072e7570e8beeb4e6d6afb29bc79549b052b13fe833fd415a7681eed1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_get_meta.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "132" }, "content": "eJwVjcsKwjAQRf8l0J12UHcFEcHHD3TjqgzNrSmmTchMRRH/3XF17jmb+3GhYHCNC6pZGqI+psWvOY/1m2ePVz1D6bkhP8qDCiQtpYccMmvY/1u1O1bby41PtluImqihu0O7Ccpu5Qwhefu4nltTxZQjK6wMHAXfHxgALkQ=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "597" }, "content": "eJy1kc9OwzAMxt/FVzrNzfKnyZlH2AUhVKWpAxHLUjXZBJr27nhIXLjAAS62FX3+7F98gZHyRPNMM7gL1LI2cAAdpEa5gnt86uCQcuJXgR2UGCtxzeXi2wtL51Rf3fbB33PeU23bxmF8pjZmap6NWmn+wB3XDo4+E7d8V9BbijycBSvVcloDjYm3AamUNqo3wlllxIRWzGpQAXVUMZCJ0s5eahGl8cNOE+7EMFhjvIkD6T5OAW3U6NH2PCSs5NsNEgQKuUGz6XHfayeNk/YO0SGyKpc5xfSj7LfsoeRMx8Y49fa7y5rOvMT4hfnXjMtpOqTwT/Z8nva+0Cf2CrdbnVNN5QiO7VHvELXtrRwGef0AcGeugQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "597" }, "content": "eJy1kc9OwzAMxt/FVzrNzfKnyZlH2AUhVKWpAxHLUjXZBJr27nhIXLjAAS62FX3+7F98gZHyRPNMM7gL1LI2cAAdpEa5gnt86uCQcuJXgR2UGCtxzeXi2wtL51Rf3fbB33PeU23bxmF8pjZmap6NWmn+wB3XDo4+E7d8V9BbijycBSvVcloDjYm3AamUNqo3wlllxIRWzGpQAXVUMZCJ0s5eahGl8cNOE+7EMFhjvIkD6T5OAW3U6NH2PCSs5NsNEgQKuUGz6XHfayeNk/YO0SGyKpc5xfSj7LfsoeRMx8Y49fa7y5rOvMT4hfnXjMtpOqTwT/Z8nva+0Cf2CrdbnVNN5QiO7VHvELXtrRwGef0AcGeugQ==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_get_public_resources.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=0&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "2605" }, "content": "eJy1lcluG0cQht9lAPNiSdP7TBMgAosSKYlWaEnUYgYB0avYImfRLFxs6JBccslD5BFyyTmvIL9RehRbsg1HtuME4ADTmGJ11f9/Xf06cJVJyqD9w+sgr+XcqcnMrIN2MD6ZHr2qt/lydbDaDpfj2WDM3ej55eBqWe9cFeXAPpvF2zYa466LD3XvfKl6eDxYx0eHwB5LeR0eMJknx+vhQZaO8Fl2ke6Iy04n2AhSkRi/w6AuSuOXZuVs0H59sxEUpszqQpmJ0/47oZRFFEaoraUlRAmkiKHaAmMRkUZEFkAhNUFC6RhqACWHgBMmOIi0oloSYgFnsYV+k7e91cXcZ55WVV62w3AttNsqZ6EOh1ejXQM411cnOX3m45NMO+tMUwcCkG8CuonhCEZtCtsIPAWgDYAPU4UR1WejclFNfYh25awdnkxFYcJ3zassSUxa+Y69B96Cwi18wsk7Jf4nGf6f9N7Bap2bu06LoLFz4UqXpUEbUspJFDHKWRMb32x8RFt6sa3S/tyul/1dvN5b9eXz6fpcXY77CF0UyXJ40Td7s3M43uu68frFcPdymuS7Mx0hhy+6h/AR2j7j/B4eTrqgu5idpvzF5QOdt7/d/v7mp9s/b/9484t/+7l53vz6RbhKxmNorKQ8AiTihhgLYoFiiyOGfBhE1AAFKYPMi4i8yNgKFhEhIxQJIRss6rLKkkleZLkpKmc8HGk9n38KOMQb4HDcBvE9cB/Qi/AmhJuAjxBoU9pG/NNc/mPDX4Pof9D6Y4h+c/pHEGWcU4Yx4jGDAN0hKtLKLVxRl5OyElXt2w/U3Ij0ocq/6dXzp4qeHYRpvjsfXcVdO6hG3dPzHeLi7+txb76SSZge1Gont9fnucmv+vbsaTesh2x/N33F9L+nd3t+ZvfSFTjrXUJ99EBvLysSuLWQH/D62LDC91CU7pXPgCKIHhnISGiCWSyJlFxAyJilDEUaYUG5HwdeP80Yg8pAxCGVBlgGtY2k1UKZ2H5uwD5U81Xz8durenQ+fmt6b0HiEjN5S2BlVlWYz4VreLJubt5zWGfLdJ4JbYqt5nRurUWqzWqrqMNmGTKDGEcQxSzy1TBANSSxr0ZK6t9jrhG3QkArgOFSRdoigYRRAGrClCI4ZP58UKVomJZ7+zNzMUjFcT8frVNw6o6vX8bP3f4qX9RUFNf7k1hND0+H6+OxkMyOiqt6NHz20o3rdIG3T+pJPz07L8e9vZODTBB91Fu+OHqCd/zvu9rpzr1+rabFBs/OOzhbvpc8K13lD2BHVJVQ08br1lSU005r7hJXdUBLZWnVENCo1mk0e4J6d6q1vEammHy0SYNvp6G3NfUfpGVIChMTJmmMAJZGwThCjFg/JQzWrcRoJx5yt6pZuugsUMtU/gBi6M2NjP8/93ZjLx3DVACfBEPvO3vkag/fO4EPe7x1vTllU4Eo82sILZJYEW+pMkziSPgJR6S1llpioNEExpgAYf20YyRWHjaPG/bXMCYRiaPgfqLdIeR309QvvqD092dfRCAGHlqKmL+mb37cCO7kD9p4I8isLY1/BTd/AStKJLY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=3&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3970" }, "content": "eJy1l2lPG0kQhv+LpeVLAPd9WLJWhMvG4TbnamX1UY0H47HxjA0myn/fGkIWwiZAjpUsazzTrqqut+qpno+1rIRhUWv89bHm8jKbZZNp0StKV07xZi1cgctri7Xx1F9loTeAOd6kG+Zq533/prW7caaGt8drdKbnre1NerL6rn/y/qwb2Htonx+a4e58c9JJF5vX7ODD2sZ8f+Wiv3FaXNe3lB8PD+a7W6O8y49Hp/mau2g2H/1MJ1fop1+W46JRr89dzJaLQT3W78z4eibczWWx3YMbXJ+7IeDK9k5aYoTaJUqXmF6+y8b4DG6zVGt8/LRYCxNwJURc+LioS0mDigbn7whpEILri+wObSkrDSd0sTaBYjSdBOhl1R+FlEpLqlkjOuO59i6RFMAnlxh1RsooOTE2uUgD8zEKp0WkxgsrNbWGAXVMgbBeoqfhKGYpezWgMBoOIS8xAJTiY208yWa4jd6XwH53VA+5/3/MowrDbAi9cj6uLLvxGH25Mhvl9c9qpewKnmgeRzf51chFmCzHrBgsz10e4XZ5Mq1XP+vRaY/eQLiQArMycUYJEcAUJdF6EmRIMgRuqcOYtXbGUKWYITIA+EjqSlm8DrKeF632AE47uTvYHHfnOTnKDq5TV02Go+2ro9OtzkTcFodbenvkzYpdbQ93Vvda887+xXU+WT8rj6fcrA5383Uti9Osp093/d5J9+YPvoafP6dZbP6bxIVqi1XBNv9brgu4q/GoyKqENF1ZutCvpF/ou6LfXLjKhlnZJAthlJdVQVRJbD5J4R9so7KBKYNJ75nPqqqbD0W90MdnVDqpWHDG6ZSU0IpI7aKUDMVjDujCEGLmPvvAChxjPRQQF8pBPmvO2AKU2KqYbOejYlRzGrUJJHotlOLBcU695lU1ubKPelZqNeqHfTeB+je79NFbhZt//VX92HdMKrzrlUlBB5WSEZp5iCIqTqSDlGwiEZL2hEQuI7dE4JemJCnHhfEqBhIS2nqwf19k6DPKqvVe38QEZlmBCa41qNQSY5dCCau5Vp8W385LO77bMfm0e7a3+mE7XHSLjf5sxYk4DneXreF0Z9KyZ+365UUnN/Hd9npnzqYbl3uDw6wzYO3WSfh5Xp5v0ikcqenKnA7txbd4yZaIepWXuEh2qW0w2yD6GS+11UYT8n1eGsp88l6T6BzBlvVOeplAABcWy476QJOMUUUWdTSJKGxiwQWnXDCZ7mX4Dy+/HdCP8PI3RPUSL3/Z/O/mpRVAmaNgvNRAguY+agVgtFYUQ4sqSJUsQsEAwjJGC8EBwlURSiCJV3h5YG740cmlPij8+T4NrZP1nbXzD+czD63srtstzfXY8pGbZNzovalsnbLu9Ym7ubvYWopjONi9eCsvv5Tr/8zLh6K+56VEDSklVsUkBdOKK6pEtFKCIDrZN/EScUVJAGkN8kskD8oKjXOLWW9kUvI1Xj7p0jfwMimvjSVeERQ0cGaoo8FSC5AkMCtssIYoH0QC4gDHNorsk3CCA0gS3Hd4+YZNfM1LRRDIlEpLlf0RXvK7zl5pVk4mO2qwSrX70B4NuIbxnKnjd7fl7mb98LKYH09Zwr/rm1l/UG6P2kdrN+0duV8cn/88L2flaei8V92iO7mOT3i57QbwkItvU5KJJUKXKKmgRGSD0WeUFNXMeOFMiY+ZJEr7AFaCcozhbPaEYxdiT0OKBgwTgqKOgaA3LEhOsaM5GgAKzxn5/XB+6Ez561G9eKb8VfPPGFnCbVm/XRo+avVjjGRKW0sTJQwiIzJ5qzi2kfU0Wc6VoDZ4i8cP4TlIQRkFmQwP1FgQ0nH5CiNdW58P0sa5yrdtN41XD5Z6rZk7uuxene3fhlXfsyT4fNSZZdPNvfL89s6llY0z1mXl9Q5bD2H/ZUZ+KdGfIGOVOETiY+peION9Id9zMXIitE546PfOGWIj84GrhPqFqEhyT7k4zQc52vwaikQrgWMQlzIcPyoK4oQBSYWiAmcgPIfikyb8CoIPxp8SEAKXAFzjewmNUcaAH+JDYAKHG047xiXDygqgI85b6n2UTujEBcrnPDXfIeAbIn5CQE2NkMYyKvGlxIhPfy/W7tNfa/DF2iilAqrLT/8AaP68XQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=6&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "8403" }, "content": "eJztmMlSG98Vxt9FVWZjg+48qIpKYYTEIARiNqkUdUfUILUadUtIcnmRbLLJG2STR8gm67yC/UY5bfibwYBHsqLUqpK6W+fe/s53fvfqvK8kRejnldqf31dMWiTjZDjKT/LCFCM4WXG9YNLKm0o2sr3EnZyHKZzsm7X9Bs2LWe9AZqtxvTVaOaImXGCH7TTrdUUoujv1Bt1OT08PSKc9E7uXrXaaNFpkP2zI7YvqurBZf2e6tT5I9+jB4Citm9PFxZtxRsMejNMtiiyvVatT45OF/Lzqq+woO4xveweFLgrUgftT0w9wp8l9DRO6MLZwLkySWKm9//Cm4obBFMHDDQQROo/wPNZ7mNSwqGH+GqEaQnB/nswgBpGYvKkMQz4YDV04ScpfMc6F5FiSmrGK+WBdsB4xho3BWGjrSAzRY6UU5o5LizzyAjOnrRXCE0GMsBQ7xiIM0x/4JCYPz4aTL7Nxg34/pAVMAPR/X8mGyRie4eSPif3uWV0L/jzhIQX9pB9OimlWRi7CpKhmPZOUjopJL9zKsR9cpr2B8WG44JP8fGFqUh8mC8NRtfxajUQRpJ0QxjoJo5pIhERcam5wdJ7DIbhEkWlBbITp2BB0IFEGiaSMsSqERtw5UU3z1bXzcLSRmp1mtjdN0X6yc/FOtZK1STYecTO8WDtRrru5vzXdOTZWxL3h2Whva+ldcjxKx/Tt7uikmR4c5seN1d31gWG+07jc7ryidTj+NEr84hf95spHLA26CPZ8RZeuDDoHz5MN8qRIBumiKQrjumW+57om7y7O9ZJ+UiyiOTdIi9IFpXKLpW6vSOOzcnOgUxie3BuotPBi6eC5LlwAAYg1QTFhOchGbXBYSSJYdJgH6uf6wSfmJvZccZ6OF8dkLhRQhhR7QmWA32vINxUgGuUGQRCKJeS3NI0pupC7MjO16m7XDEN1YzTMQ/VOHd6Mcp37sta6hnAB3zGOxFLHRCAugGGkUTgwG2PkkQUcPMOKMmSiDkww5ajhhmuKraZMMiUh1nXkz0aC0TyHL98x+WEYJzmIX4HCkwxTjBBhVEFJfnjz/QxcXZ3krw+qg8FWY/WisT0xw8322ehwp5n2xfJ2WxfLk4393deoPT7eEtbqZqqPtkw2q+63jzd9/+DnGXjWPRqvt3e6WyeDMDu9YeB5mYGFWZI9ikCs5zGZR2oP0xqWNazvIRBTDi/8OAWFxd5KjaH6pGCYWBTKH0C2hFNGGc6h/JkMjiMZSJBWQB61Q55SxK2w9yn4+IR+hIK/YVZPUfCXw9+joMkyGMuU9V+9ytaPoZB76632mnsXKZLROGGNJ4aCjR0hUQEeFVyVUOmSAhQlhNJBhGgVkPFbKNxtbLK8Wc+TZEXWT3sbRND1ZgxTm+q0G1dXLjpndOKTfpOeZ71G6/LtttaXqK/aa2d5HVmx9DQKv7j0Jzh4SznAYRnjcRhee/kzD4MlRhEHojEAiAqwgDAOCwnGznuB4m0egvEysEEe/F0qci2todQbFUo7lIzSQdJAFIc1wIeHqXi7Ju/g8GaYO1DUhrAIS2vU1HoDq6wUXiGsBDOmfAioGKVkdAxzWJqdopoGAX6LOvJAHoPid8z9FhS5hEWDUYY1R4rKH4HiTmeyv9yb9VRm29Wxvpger63aolVPNu24czjIcaNfyHzndX2veqqnk252PCoOe6xJNsdDAvvQn4ViUn3XHJh3rdZ015Ne7/IGih//iRf8wE2eYiLi8xTtIVFjuobkPSbCmiORfhyJzElKuNIS8gaVaTm1jMSosIQsSmlhy+I9ppQwQjwkwlgoVc0x0U5K5PADSHxkPo8xZJz6hUEW0km/FwfDviny+UGMiQvw3KOypBYuB0OfDQcO/Jakp/3ewh9XfhC0v+FZnwLtL4f/cJW0qz8zd53yOFOz0vrhssoABIIjzwjsZWErgkIApFoaOKdGeq98jExZ2EjRspaw14JTpQkTXNgQUTVJAa04HV+c1jvJ+nDaW2r7tcZsYg+X7GTlbLl36GOro1bXp4xno/m9y2nacSed+dny8X7LLbmOGI3JjEVxttzszOutpXCADsdk9+IbRH1VR6/02yub34FqkvaSNDwF1KRvTgOg9CwLpw+y9BqBN/VUX2ks7bf2KiUVXhT+fQrPfV60jo6OdufccJAtohvJy5Mvej+T3g/J/aL2M6n9gNgvWj+P1l9L/aL08yi9+ZXSmy9KP4vSra+Ubr0o/Tyk/lrqoxetn2sP8oDYL2o/3w77Iblf9P6/7UOWKx/+8qMtTyWoQzyCwIzDH34qlHPIC8dlUMhohSNFWnnmg2ExRq9IsJAK7AWJESH0rZbn23fL+cFGUW9ezC5s0h5uNburTT3uzdbql7ydN2cn+7PDA1XfXItLcv7Ar9TPz4fH6+tne+JohZjLnxT7Z7qev9DteaJbetXlumqWcioYd8YiFyAqixIFgjnmhhMOLr7dLP0S+U6rNMoQtNIOKWKsEJQzb7XFwRAkvRHmfi/0VjfqurBeivC5ivBOj/rjvz7++9NfP/73438+/R0+/a18f/pH9VbP9EtnmhhPHMHURioxij4oZiLUHMMmEO8jHExERbGDF3JGQDJwJOAhrqQQ4pHO9HdY5VZnWiKiMZEIY04w0iVHPqtTqdE3FaiCPMBH8eF/4styvQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1364" }, "content": "eJy1VNlu20YU/RcC1otlc1YuAojCihK7TlwntuzKKgpilktzLHExOZJFGf6SviT9In9Sh4rrBG0f+tACBDnLnXvOvecMHz1joWi90S+PniitWZtm1aatFXblFj21BFF6Q69eyaVR6QI6t2i6N/YjuRqTE5gvt9fLT9BONjfn+3J/uvz4U2dOyB07Vg+zRRR3gk3hw+n1rVmo3CK4nZ2t5b1/Gsi6uOjOT6tySq+rWTkRt0nyDWfVLB1Obm3djny/E9octgtf+9PbWlyVBlPgN/MjF1+KAlzk8+/PX9Ln354/48Otqd06bEzmjR6fhp5qQFjQLogggg8QPaBoivEI8xGm+wiNEHLxrdm6PC6CMI6GXgNttWoUpKY/yDgPQo5DMgo4goDHFFOEIVAkZJIEGUMRiSkVGaY0wpzxMKYoBp4xHKJMiSDCmgJwnjmkotImM/9MiLBXQqoqCiitI+BkePTqxqxdGemfxP5rVi99/3/SOxUKU0Bqu7rPLOraYQlrqtL/qlZmlvCd3rp6KJeV0NAcatMuDjtRatgcNiu/n/oozgRTnEKMKHG8BI4ySbHGCgFmIs5orDjGgGIUKUR0DI43i2IcC6JUIP0giBF3I79sT35cwOx9KS6O62lXoitzcT+3P4c32w/z6Vl1t0g/XV6u5ttokY4v33C6eZefz2bHx+VkfPT2XuH5+2B8Js/15sAedW9tgO4C+rBHJ+75YWV08trEQV9ib9Zkb4L2jsjujdP+E493E7Sz7sBVWFet6ZuTCGuFynsbDHLR5slgaQpjEzRQVWl7c/QNTb5r5x551+dw7YMm/Qt+7/DkxeCD3O1xShGTIbCYhQqTTGZcgwyFJkyKELFBAdqIrxjOjbXzRgt6YBflOlmTAVh3ZSUhTmSMIhmEkZYCg9AqECqTmnGGcO8sYXOnba/cyL/MRQP+327rN6T+l/OK1d/LXBAe9OeRkrEMsSOMolhmkoveAKGMgIVO4YxGEYEwEjrAlAWAFMZcoZiwTAoaSpfrJf/ObA5Tczf5FwU0sData643wgEOMepdz7HLHD39OvR2kritoVdlWQtuGD/9AWlcodg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=5&limit=2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "2598" }, "content": "eJy1lWlv20YQhv+LgOhLbHPvJQUIhRNHtnwfsmKrKIQ9LUYSSZNLWbLh/96hktR22hxNU4CAxF3yndl3Zh4+tNLg5lWr8/tDS2UhXaRlXY2roEINiy0zcyprbbSKWs9SM566FSzS+4PTEG+/L4/F9C2W6rCfT6l0xYqI4etlONmNLj5Uq2FNPLwu7xaTaTjK+5c7d/1jflYNR7fRvtDF/Hx1sp9nAzrMr7IdddPtPsWpyxnEmYRQVJ0oWimbblXTyEaLcGUO3ohBNShv7Q08n6m5gyeP1NT5dOZgxS1T3+o8PG60TOlUcBa2CSJsE+FNjAY46SDeIfg1Qh2E4PkqvQcFJqkUG63SVXldGjdOm9cY50JyLEnHwjbhSEhtXMKdUIR4LzSizihlnfM2djFhDGOTGATRMEYUO0woCDjc5DXPberT76Zj8vncZQESAPsfWkWZLuAQ48+J/eqsPvn9/8hDDebp3I3DqmiUg1uGaLk5f6rV+uepzja/y2Y5SJdbNq2mWyuVWbfcKuuouY2wjROBsZNSKY0w9c4jojxj2oCjJtGMeOI0llwmgliiGVZcwmmMZB55FgmRIG6MiLJqrz91VweZOt8tBqsMXabnt6ovR1PfG4nsKBn44u355nhvoS4/DGbXZ0vzVo8TZHSWHyzSevc0jJb3ym/3rsmAhNtj8s6Ys1d0B67f6tR2/zKx3RyxadLu5xZtw1mKvEpDmmddFYIyk6bg7YmqJt32LJ2noYvaJs9C0waNdd3GuFek92RdG4xy5fiLSE0nd9eN3J7AjqWISektU1qpGCVgiKHCQ/2MFcir9tzZVH2MUGfTDDTbYZotugvSdgHmEUnBDAbnFLHCCMuQYrHjmAnMuJfr9lFhAgVsytOJng3hkzTsfhJvZm2iCBew5AzlzlFpscHWcmvgQtoYwqSKNbeEcgKdZZy0jHCsteWKSU8ZlE9pHIPWJ/HPAS2Hmx/IuHSLtALrWx0sccx4nBDMBUYxe9z4cQLOVf+yR6twPxvKYs/vH9bvrqhyt3AcvSpmE+HC5HynR0+zm5shOTu+Fxd3h8dZ2jskl+5Anv48AdlV8d6/mQ1DEgI6eyKgqmwHJm9rob/OQLqGTjLApINFB/MvGEgkJl9HoNIxsw5QoC2CmVcKY5HA5MEUWhzHMeaGS40ssmA2DKMWwhJBlNAUG8b83xD4MhtOfgqBvyCrbyHwP8v/EwKLmUqzf00/T2KCEiOE0kZCVOWJkAhQxxX2xnK4BJeAOWCf9pCOdi5xBLpeIsCA/w79ruPDtL8sFjVX5W1/HJvJ0eXJ6nyktPCD8kM9ONm+Tkd1tqBvLurxbjZ8X416exf7uWL2rHd3+h36QXu+otsfG/TnCbh27hvwazp4zT4wgGjlYiY0B9uodgbHkgjmDeaO2ufsa7Rfgo9iAJB08H4C9aYCTKNcIRChWEJ9vwTfxUSVLjqoy8pFL+bwBQabOM8ZiLEnmhomHDEOGgbIhx3T3nvuGXw+LcMxBYL5xDHBYkMVVzyhWCeUSRbLrzDwB5J/xkAhGaa4+XjTGEby8Y+N1roAQIONVu595eAvf/wTXpgduA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=7&limit=2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "7119" }, "content": "eJztmMtS20wWx9/FVfEmgPp+cZVrimAwEDDhTpiaovqKBbIkJNnYTrGY2cxm3mA28wizmfW8AnmjaQU+IAkk+fLFs3LZrpJa8unu3/mfv+XzoRFXblA2Wn/+0FBpFY/iYlielZWqhmGwYRKn0sZCIx/qJDZnl24SBtfXx+XroyjLdtbWr9bejVWx3bsYHu910wFbedeT1cr47eH+a9Abne4wrWU3lSc7Kp9Gh73TbTs4uoo2mc4He5OdzSw9wEfZSdpR5+324zzDIgnz9KsqL1tRNFE2XiovIxtd9E9Gm729/s5Z5qbn4f5UDVy483JYlG5pGudhyI1j32h9uFlomMKpytlwHQEoFyFaBOIA4hbkLShfA9ACINxfxtMQAmIaXnChUbgyGxbGncX1FwmljFPIUYtpaDWXUHnEGYFIA1d/ATrLjFBCUYoYItwZCrhDjmvmLJEGWIwB1UyHmQaZjX383QWZbDBwaRUWEDLwoZEX8Shs4+y3hf3qVd0jn034kIVBPHBn1SSvI6s8D3OpKs7S6C5bPk7ck1Tb7DpNMmVdsWTj8nJpolLrxkvFMKpPI2q11dJKao3HgHtlmFYWKQwQMQh5YSgX4Sp32HJMOeAhlHTMeS08gz5iTAJqDIvScn3j0p28TdVeNz+YpOAw3rvaX9smZbdTxvEq75wnbxHDm13vJjqVad+vr17tXuCxjQddfJkna1vXb95JeQ0GordxUXaAZsuvcCe8/zSMbfsBYrPeYq3T9oNKm2EzeVbGNYe2qipl+nXGm31V9tvNJB7EVRs0TZZWtQ5qdu0n5F6htTpGIOWKsy+mqsXcvtdysx+uOY2UQCZAIxhq4bihhCptIDTWMuCbA2djdTdHEF4eZFA626wu01F7hJquCoVJJdcKY6uEq+XgiYPSceyQoIpY62oRqaof0lgnqRXt91Xhoqc1+ThJ7SkP09TV11eIsjAKpULEQyG8xNoqbyFnVgAoGFGq3kSoGCG4NwRSQawRWGLHgt689NQhHmLdx/8kqTCnpeHkB9ZeuFFcBq7BBCinAhFMoKRAYH6z8OOmuLc7PlxJponIdS8ayavJ6ca6rrY68bYe7R5nJVwbVLzce905iM7lZNzPT4fVcUK6aHtUoODBP2uKcfS+m6n3W1uTfYuS5PrRFG//CZdsZsbf8kRAFzE4AKxFZAvwLzyRSsyBfNkSieEYUSF5yFuoTE2xJsh7AXnIIufaMGYtxBgRhGxIhNKhVCWFSBrOgYHPWOIL63nJQ0apXcpyl44Hic+KgarKxcz72Liw72FdUkvXWWHzIjNBb3F6PkiWfrvyO432F+z1W0b7h8Pf3CXt7of8c6W87Kl5LX13HZFgBIwCSxAkBjoCnAuWqrGjFCturbDeE6Gh4LiuJWglo1hIRBhl2nkQxWmwVpiOrs47u/FmMUmWe3ZjbTrWx8t6vHqxkhxbv7Ur1jcnhObDxYPrSbprznYXpyunh1tm2eyy4QhNiWcXK93dRbmz7I7A8QjtX33HUV91wCv55k7mn5lqnCZx6r5lqPFAnbtgpRe5O3/WS+8t8LGeOqtry4dbB43aFeaEfx3h5qcfrZOTk/2mKbK8DR6R14Nz3jPi/RzuOe0Z0X4G9pz1bFh/jXpOejakt78ivT0nPRPSW1+R3pqTno1Tf436ZM56Vs8gz8Ce057dE/ZzuOe8/2/PISuNm7/83panYNgA6gNgQsMffsyEMcAyQ7kTQEkBPQZSWGKdIt57K5DTIRXQMuQ9AOB7Lc8371fKo7dVp3s1vdJxr9jp9te7cpRMNzrXtFd2p2eH0+Mj0dne8Mt88ciudi4vi9PNzYsDdrKK1PVPwv6Zrucf6PZ8o1t61+W6a5ZSzAg1SgPjQlTiOXAIUkgVRTSo+Gmz9CHyZ61Sz52TQhogkNKMYUqslho6hQC3iqkve6FPulH3hTUvwlkV4Wc96tt/3f77419v/3v7n49/D0d/qz8f/xE96Zk+dKaRssggiLXHHAJvnSDKh5ojUDlkrQ9vwrzA0IQXMIqFZECPgoao4IyxFzrTPyCVJ51pDpCEiAMIKYJA1j7yiU6jhRYaoQpKFw75zf8AefLpKg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1364" }, "content": "eJy1VNlu20YU/RcC1otlc1YuAojCihK7TlwntuzKKgpilktzLHExOZJFGf6SviT9In9Sh4rrBG0f+tACBDnLnXvOvecMHz1joWi90S+PniitWZtm1aatFXblFj21BFF6Q69eyaVR6QI6t2i6N/YjuRqTE5gvt9fLT9BONjfn+3J/uvz4U2dOyB07Vg+zRRR3gk3hw+n1rVmo3CK4nZ2t5b1/Gsi6uOjOT6tySq+rWTkRt0nyDWfVLB1Obm3djny/E9octgtf+9PbWlyVBlPgN/MjF1+KAlzk8+/PX9Ln354/48Otqd06bEzmjR6fhp5qQFjQLogggg8QPaBoivEI8xGm+wiNEHLxrdm6PC6CMI6GXgNttWoUpKY/yDgPQo5DMgo4goDHFFOEIVAkZJIEGUMRiSkVGaY0wpzxMKYoBp4xHKJMiSDCmgJwnjmkotImM/9MiLBXQqoqCiitI+BkePTqxqxdGemfxP5rVi99/3/SOxUKU0Bqu7rPLOraYQlrqtL/qlZmlvCd3rp6KJeV0NAcatMuDjtRatgcNiu/n/oozgRTnEKMKHG8BI4ySbHGCgFmIs5orDjGgGIUKUR0DI43i2IcC6JUIP0giBF3I79sT35cwOx9KS6O62lXoitzcT+3P4c32w/z6Vl1t0g/XV6u5ttokY4v33C6eZefz2bHx+VkfPT2XuH5+2B8Js/15sAedW9tgO4C+rBHJ+75YWV08trEQV9ib9Zkb4L2jsjujdP+E493E7Sz7sBVWFet6ZuTCGuFynsbDHLR5slgaQpjEzRQVWl7c/QNTb5r5x551+dw7YMm/Qt+7/DkxeCD3O1xShGTIbCYhQqTTGZcgwyFJkyKELFBAdqIrxjOjbXzRgt6YBflOlmTAVh3ZSUhTmSMIhmEkZYCg9AqECqTmnGGcO8sYXOnba/cyL/MRQP+327rN6T+l/OK1d/LXBAe9OeRkrEMsSOMolhmkoveAKGMgIVO4YxGEYEwEjrAlAWAFMZcoZiwTAoaSpfrJf/ObA5Tczf5FwU0sData643wgEOMepdz7HLHD39OvR2kritoVdlWQtuGD/9AWlcodg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=ZShQzuB9wxJxB%2FwZkKZ9iTLgKjwuDjrsKfAk8Bf7Z3Ci8MdFWwcF3ZKy8QM0fRbbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=nXBcnGlfywGE3yHxGbLhyWcgZG22XrmwOXGeHkW1ZHCiZyPOEghmpEkd72i3XCM1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dl%2Bc5VJ%2FnpElTj8CfKtTCUWD4i8NuZFlxbm%2FnJucDpfqWpepjGfV%2BC%2FuO6IEnz6dq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=1F8lNBhwHOFY6mxVD1v7yHMG1WC%2BhWBYTc2BeIZS8mOyGrKfgGq2RLDFyQAghFXsq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=9pzN8nuTYPCLMcgTsFhvAa4dpczjHmuNrH9YI%2FjgKn8d%2BMEKy2uFjPkSiKk2IHWcq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=3zKPt8AWrN6kC17aLIok37epy26V%2BxtOG%2FSjsyVu2fcle7wvhktMoIUDwIN5QsVZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=maIUF3stzlV7pHfJLuEX3aeq1c1byplh6ethRDF3PnggV2QNz6SwLNniFL2UeK7Pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=HHxs%2BV%2FooOFHqFPxarMNjuWRGnm6CPN9tCxKUS%2B0NvZO6bb9Gn9XOapz%2FUNZMdmVq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=RQxUClzl8pbN%2Fv9qyZIHbtLDiMbvQWos1Fmt7sR%2BDT%2Fg9yxhpZutWl4G2Mvr2iteq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=iyCtP2UB2HeZlzVlQesDxYO%2Bb%2BTlPNyiH2j4GcwXk89ya4TeLJVgikcht0egXMvbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=3zKPt8AWrN6kC17aLIok37epy26V%2BxtOG%2FSjsyVu2fcle7wvhktMoIUDwIN5QsVZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=maIUF3stzlV7pHfJLuEX3aeq1c1byplh6ethRDF3PnggV2QNz6SwLNniFL2UeK7Pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=HHxs%2BV%2FooOFHqFPxarMNjuWRGnm6CPN9tCxKUS%2B0NvZO6bb9Gn9XOapz%2FUNZMdmVq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=RQxUClzl8pbN%2Fv9qyZIHbtLDiMbvQWos1Fmt7sR%2BDT%2Fg9yxhpZutWl4G2Mvr2iteq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=iyCtP2UB2HeZlzVlQesDxYO%2Bb%2BTlPNyiH2j4GcwXk89ya4TeLJVgikcht0egXMvbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } } ] ================================================ FILE: tests/recorded/async/test_get_upload_link_object.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chTGZmto0CZmJKOLdHVf/vbf5H+ULjqpTnjlTp7UNqbo15Kl9Q3T4aiOyfm60m2jWBSnVYpEOGdjv/63ZHZttf4WT8IDEIixj7sim5pDAmTDF2aTbAy2rlVqQfXLyeDkPooxLDsAoZYRA+P0B9WQ0BQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "639" }, "content": "eJy1UcFOxCAU/Jd3tZsFWkrL2U/YizGGUHgobilNYTeazf67b028amL0wpuQYXgzcwGDaULv0YO+QMlbBQ3QQKyYCujHpwbmmCLdCtZADqEgYYKrrS9E9bEc9f7B3tM8YKn7Sod5xmpO65ytN3NcjiZPr+gqydZc7Uzvrw0sNiEJfM/HtxhoMaJvWPJpc2gibQqdlL2SXAktej8EgtwPXgyj97YfpFMcGZNSTYoms9yJTg68G3Eag2AtCt9PrrUOA33iNrT1FgAIJrodUzvOD4zpVuhO3hFgjFgp+xjij7Tf5eJySrhUMlduPaxbPNNK5sv0XzteT9Mc3T/JU1n1fcXPEDa4NXeOJeYFNMmzXqqxl3JkomXXD70OwNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object%2Ftest.txt&overwrite=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "242" }, "content": "eJwtj81ugzAQhN+Fc2PWf9jmKXJIz5VhdwuF2Mg4IlXVdy+RepxvpG80P03eqMQ65/QxY9M3wFJpZIzEeuRB8TBaCRE70NYMQaEDtsEHjmzBhzgY9KQkWgMcOsnNWzMV4tM01brtfds+tjVHpNLJL4HzvojvmJCeIlHtjdH//aXG8km1VaAMOClvoLUyToB04lFR+N0nxTnxcyyHyYe3HnTKx3JZXmLtTOicPNfvVKf8enJ9v52x0n1bY6WTcFx3+v0DrUZLNw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0f123dfdaef3cfb2fbc510ad60354b92d70f5989faf5089ab4d8e21d540f961f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "PUT", "url": "https://uploader61j.disk.yandex.net/upload-target/20240711T033247.017.utd.8s8n2fonfxcrw4ow85803nowk-k61j.3749671", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzEkFABHSA4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0f123dfdaef3cfb2fbc510ad60354b92d70f5989faf5089ab4d8e21d540f961f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOwiAQAP/CWQuCZaH3xg/4AcouaWNbSFmNxvh3Oc7MYb5iPiiJQczMpQ5SxjU/8RzK0n3CjvTudmL5ukhc6kPmQkfgJe9Vpp5QBZPQJudAKweTN9pEA73XYEC3PClw0fcQbTIE6mqQ0E/W2eStOImNeM7Y3rfx3pBpK2tgaiaFtdLvD3oeMQw=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f5ed0a3fd6f8872087b9323c375927372ed0b078c957c6f3e7043ded9b686f96?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f5ed0a3fd6f8872087b9323c375927372ed0b078c957c6f3e7043ded9b686f96?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_is_file.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_is_file", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "131" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5claH5IcG0CZmpKOLdHVf/vbf5HxMqvOlMECncWTulvLotldi+aXF4tQvEPnfWRX7YCs5rncCnQhKO/9Yczs2+v9NFeQCLiuiMkUcfE8zGzJCQnV7croOqYC6JBFo8Jcb3B+Z3Ldk=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_is_file%2Fzeroes.txt&overwrite=true&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEsOwiAQANC7sO9AKR/pOXoBkhmsUhHpkGiNd9eF65e8t1gbJTGLlbnus5S9bveI1MwV8LJneMWC9IRCPBsz/Xng2M7EUittlFdu0XoMkwXnPXRGoIdzR08lJ8qtIh63zYZuxz7k32uUOoWgvfh8AXSXKJw=" } }, { "method": "PUT", "url": "https://uploader4j.disk.yandex.net/upload-target/20240706T221935.677.utd.eq66zufnkfekrpddzml59u51u-k4j.40089927", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_is_file%2Fzeroes.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_is_file&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOwiAUBe/CWkulAm33jRfwAh/eJ21sCyloNMa7y3JmFvMV88FBjGIuJeVRSr/GJ86UluZDO/jd7Fzk6yKx5IeMiQ8qS9yzVBR04MEoQm+BToXOWPRGK9t6BOd7fXUtHDk4hKHWwXkosLakDFpxEhuXOaK+b9O9YuEtrVS4mkBr5t8f8mYy+A==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/2af5fe962ad87dd32f367d865270cdfbc854b0dbabdbdf9f369bcd2de57a26d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/2af5fe962ad87dd32f367d865270cdfbc854b0dbabdbdf9f369bcd2de57a26d0?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_issue7.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_issue7", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwVjUEKwjAQRe8S6E4b1IVQEBGsXqAbVzI0vySYNiEzEUW8u+Pqv/c2/2N8wWQ640Uyd9aOMVW3phzaNy0Or3aB2OfGusAPW8CplhF8zCT+8G/N7tRsLzc6Kw9gURGde2Cu2JuVmSE+OX249oOqYM6RBFomiozvD7NwLV4=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=any%20value%20here&offset=0&limit=500&path=any%20value%20here&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_issue7&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_listdir.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "131" }, "content": "eJwVjcsKwkAMRf8l0J02qLuCiODjB7pxJaFJmcFpZ5ikooj/blzdc87mfiBUGaGDYFa0QxxSXnhNJbZvmlle7SyGzw1y1AdW0bzUQfRQyML+35rdsdlebnRy7kXNxXzuKapxrLCCSSxk9ovruXc1mUoiEy8jJZXvD+tELfk=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0Js2VG8FEUHrD/TiqYRuyi5uu8smFaX478bLzLx3mQ184Qla8KpZWsQxptXtKYf6Q4vjd72w4qtBF+SJhSWtZWQ5Z1J/+rvqeKkO3YOutnsWNVCrIQZRF4qhZQM7mFl9cvZ0v/WGynOOpGxmoij8/QEssDAG" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0JttsN4KIoLWH+jFk4Ruyi5uu8smFYv478bLzLx3mQ/4whN04FWzdIhjTKurKYdmo8Xxu1lY8bVHF+SJhSWtZWQ5ZVJ//LvqcK7a/k4X2wOLGqjVIwZRF4qhZQs7mFl9cvZ0uw6GynOOpGxmoij8/QEs1DAH" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0Js2aG8FEUHrD/TiSUI3ZRe33WWTlor478bLzLx3mQ/4wiO04FWztIhDTIvbUw71m2bHWz2z4npAF+SFhSUtZWA5Z1J/+ruquVTH7kFX2z2LGqjVMwZRF4qhZQM7mFh9cvZ0v/WGylOOpGxmpCj8/QEs+DAI" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1529" }, "content": "eJy1k91qGzEQhd9Ft3XwSJrR33UfITclFKOfERX1es3uJqSYfffKJYXmJraJe6NB6OgwR9/oJJZfRxZBlDaJjdjxkLgULiKcRFt4mEV4OolDHN40sov4tdV+vm5EnjguZ7FQoPAB7IOER2kC2qDwC0AA6PqJ5/F5yrxrZyUSGUvSqkAxVeW0IusTOMRckzIoCVyEpJ2VlQpHWy0p6YxDzhJlBrI2euUzduthLK22ix0c4/LjT//zz7D9Fr/2+sjzsl36stu3eenJtm/p8jgMfFh6s/P5EY5Te+kZd39D3DvB8TntW/5P9h3RO7wTv7S5jQcRuj0YDYBIrt+mdfMvZXU1ZbpI2bribM0yRjDGV6VdrsZnbzVZBBulyTEVjzpzjEZKMAmUKzUhl1olXaJMN1NWN1K+Q4KPKH/a/grKJD2ice8p6ztS9r06KJ4ty8qV+0jpiCqDtT7LmmxVSBGgt62oaEyqD2l2kjU6jOTvT1nfSPkOCT6i/Gn7ayhT//oW1u9dOi5xL4LeiH0b2iICAWzEWOvMfQPr+hv/zLPT" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir1&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir2&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir3&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK2UMoWO7I0X8ALTdhqIQBs6Go3x7rL8b/O/ato5qVFNIqWOWoclP+OZytx8aIv8bjYW/TI6zvWhc+GdZM5b1cZ0dLHGk0c2NiSHFh0ADj0GsK6FCDxA6DERd13rvUFMAB4uNg2ujeqkVpYpx+N9u96PFF7LQsKHJFoq//5bNzC0" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/112a941bab8e14cf78487338658c34703d3e63c58fae220bb188f33b394f670d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/112a941bab8e14cf78487338658c34703d3e63c58fae220bb188f33b394f670d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_listdir_fields.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5claEzIYNpEzJTUcS7O67+e2/zPy5WCq5zUbVI5/2U8opbKNy+YUF6tQupf+48sjx8JclrnUhOBTQe/605nJt9f4eL8UCiJmozJhZFrmNgSihu42bSmNGebtfBVGkuCZSsBEhC3x9L2zDP" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02VHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+mfnkeXhK0le60RyLKDx8G/N/tTsrnc4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoRIy3A==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02WHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+ufOI8vDV5K81onkWEDj4d+a/anprnc4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoTYy3Q==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+ufOI8vDV5K81onkWEDj4d+a7tTsr3c4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoVoy3g==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields&limit=500&fields=_embedded.items.name%2C_embedded.items.type%2Ctype%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "158" }, "content": "eJx9yzEKgDAQBdG7/HqLaLDZq4hIJCsEEiNmGwm5uxYWNloOj6mYJS3ivXhwRVBJBTxW6LkLGD4cIGwuPdGh0Sf2f2jRJoJmdRFsCTGkoODBGEJe1yJ3mEbvvV2pBjGI" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAURdG9MNZCKfyWzo0bcAMfeE0bayEFjca4dzu8Z3K/Yt4xiVHMteYyShnW9Ixnzkvz4S3i3Wyo8tXKuJS7TBk71yVtRbreKky6cwqxszGE0PaDdkZRBx88MZQCEznHA4KPRlmQNtYr0kww4iQeqHOKx/t6uR1Z8cgrVxwy8Vrw+wOcKDGb" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/9750ef2390ed35dccc178294063ebcb6ae00ea6699a8ecbd405e6245b062a6e4?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/9750ef2390ed35dccc178294063ebcb6ae00ea6699a8ecbd405e6245b062a6e4?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_listdir_on_file.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chaGZkOA0CZmpKOLdHVf/vbf5HxMbBjOYKFJ5sHamsvot1NS/IXt89RnFPnfWJ37YhlzWNiOfKkg8/lt3OHf78Q4X5QlZVETHUWLxqbmSXUiEZmMWlFi8Xt2uk6rgUgkEtQQgxu8Pf6MxNA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file%2Fzeroes.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFEOwiAMANC78L9SSsMm5/ACJEVZNtmyFXUa725M/H7Je5uy5YuJpqiue7S2rfOSJG/EC8i4T3CkKvkJNWtk9n/vNG3XrJaQGHsMZyI3kAdChqYCp9fYqjR+1HsI6cDbjIMU10o3/WLuKZDzzny+rMQogg==" } }, { "method": "PUT", "url": "https://uploader24o.disk.yandex.net/upload-target/20240706T221823.204.utd.9ziundu4wnv66ay0ml08dh1uh-k24o.47262131", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file%2Fzeroes.txt&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgyAQQNG7sG5FEBTcm16gFxiHIZqqEJk2bZrevSzf3/yvWE6KYhQLcy6jlLilZ7hCXpsPHIHezUEsX0qGtTxkynQCr+kocnaIs1HOGYed69Ba7U1rMLZae2V7FQeoDN56ja51ceiHTmm0gLH3SouL2ImXFOr7Nt0rmfa8AVMtEbZCvz9L5TBb" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/b8ccb418848c383c5529404cf02291561f7a04cd9592c808f767312c5acf6912?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/b8ccb418848c383c5529404cf02291561f7a04cd9592c808f767312c5acf6912?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_listdir_with_limits.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVUIzJYNJEzK3PhD/3XF1zzmb+zGh0mQ6E4AinbVjzItfu8Lt282eXu1MsI+N9Sx3W0nyUkeSQ3EI+39rdsdme7m5k3JPAhXoDJEFnuvwZASVxBCzMokQste767lXBaUSHUjL5KLQ9wdblDMF" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2VG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPtorGe520KS1jKSHLNDOPxdtT9Vu+7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwEU1Eg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2WG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPvYWc9yt4UkrWUkOWaHcPi7an+qmu7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwGk1Ew==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2aG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPvYWc9yt4UkrWUkOWaHcPi7qjlV++7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwI01FA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kcFuwyAMht/F16UqkAQC5z5CL9M0RQkY1VppokC7TVXefW7VHXbaZbtgwJ9+/b99hfI5IzgItEAFPaYRQ8AA7gpUMGVwL1c4DenBSIbwgyL31wr8gkO5waCEajbCbITeS+tk55R5EsIJwfyCeTovHnu6kU3batNKo5yVwWo/GkQUoUWjrdUh1LHB6G03tqqxXayjVl51Wns5jI1CqcaOv3TtLUunKVCkXx3MQznc/ec3t30edlz3mMu28NEfKRdO1r9TOfAjUcnbR1I/pYSnwsbzbSDzQhfO238H+us083k8kv8neV7Xj1UveKFM0wkcywtl61YYxbKmXl8ZncpwBFdXcJ8IQxVMMWbkq1jXL1pMpvY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kcFuwyAMht/F16WqIUBaznuEXqZpiiAYDa00UaDdpirvPqfqDjvtsl0w4E+//t++Qv2cCCyENEMDPWVPIVAAe4VUKRewz1c4uXxnJEP0kSL3lwaGmVxdYZAo1Qa7DZqD2Fuxs7J7QLSIzM9UxvM8UJ9WUmltOi06aSNS1Cj3rVTSO0TjvNNShNCZVhnhFToTFTFihkj85YPCuN+FNpBvW8HSeQwppl8dTK6+3vyXN7t9co9cD1TqtvLRH1OpnKx/T/WVHznVsr0nHcac6VTZeFkHMs3pwnn770B/nWY6+2Ma/kme1/Vj1TNdUknjCSzLr8IaO6O1kGp5YXSs7gi2beA2EYYaGGMstF6X5Qu4U6V3" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kcFuwyAMht/F16WqIQESznuEXqZpiigYDa00UaDdpirvPrfqDjvtsgnJgPzp1//bF6ifM4GFkBZoYKS8pxAogL1AqpQL2OcLHF2+My1D9JEi99cG/EKuXmGQKLsNmg3qnRis6K3sHxAtIvMLlem0eBrTleyU0kYJI60IvVDt3hGfwakgZRQiKqM7L6TBTmoRQic9Yk89eRSEeqBWUdSmJdexdJ5CiulXB7Orrzf/5c1un9wj3zsqdVu5jIdUKicb31N95U9OtWzvSf2UMx0rGy/XgcxLOnPe8TvQX6eZT/tD8v8kz+v6seqFzqmk6QiW5VEOrcJeCmG0Xl8Ynao7gG0buE2EoQamGAvxU67rFwUqpaQ=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOgjAQAP/Ss9IWpBTuxg/4gd3uNhCBNnQ1GuPf7XEmk8xXzQdHNalZJJdJ67CmJ50hL80HduJ3s7Pol9W0lIdOmQ+QJe1Fu468QbSI6DAO7Ug9gG07dMHbPjrnwQZPZgjDZRx9qCGY2COaQKZm6qQ2ljlRfd+u94rCW15BuJoIa+HfH7wrMhU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/63d80bb1bbb6bf729d5aa123b6c815f668a1c8d07c74998c1bba0f5bb0cd023b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/63d80bb1bbb6bf729d5aa123b6c815f668a1c8d07c74998c1bba0f5bb0cd023b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_listdir_with_max_items.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chaGZksGkCZmpVsS7O67+e2/zPyZUnExngkjhztox5sVvoVD7htnj2s4o9rmznvhhK3Je6oh8KiDh+G/N4dzs+ztclAdkUREdF4nFU3UvkuASrI4EE5uNSSghe328XQdVrSWCoJYJIuP3B/7cNDo=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2VG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPbZWU/8sBU5L3VEPhaQcPizZn9qdtc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sDzZH" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2WG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPa5s574YStyXuqIfCwg4fBnzf7UdNc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sMzZI" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2aG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPa5s574YStyXuqIfCwg4fBnTXdq9tc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sVzZJ" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir4", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjcsKwjAQRf8l0J02+FgVRAQfP9CNqzA0UzKYNCEz1Yr4746re+85i/sxoeJoOhNECnfWDjHPfg2F2jdMHpd2QrHPjfXED1uR81wH5GMBCYc/a3anZnu9w1l7jyw6RMNFYvFU3YskuASLI8HEahXuzcoklJC9Ht8uvU6VJYKgkhEi4/cHbHs2Sg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir5", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2qHgpiAj+vEAvnsLSbMli0oTsViviu7ueZub7DvMxoeJoOhNECnfWDjHPfg2F2jdMHpd2QrHPjfXED1uR81wH5GMBCYc/a3anZnu9w1l7jyw6RMNFYvFU3YskuASLI8HEahXuzcoklJC9Ht8uvU6VJYKgkhEi4/cHbJ82Sw==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir6", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2qOChICL48wK9eApLsyWLSROyW62I7+56mpnvO8zHhIqj6UwQKdxZO8Q8+zUUat8weVzaCcU+N9YTP2xFznMdkI8FJBz+rNmdmu31DmftPbLoEA0XicVTdS+S4BIsjgQTq1W4NyuTUEL2eny79DpVlgiCSkaIjN8fbMM2TA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=0&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "70" }, "content": "eJwVxjEKgDAMBdC7/DmDk0OuIiJKfiHQULFZpPTu4pveQL43oTB/IDgYF81o0AFPRoduuyBbnhW6CqqHJ3QRtFI6/875ASfcFp0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUnjZm3U/IpqoqhGFQUI1tGZKmivzvJVG66KqbdgNIHF3dM3OF8rkgaPBxhQYMpgG9Rw/6CrFgyqBfrzDZ9GBohfASQ/3fGnAr2nKDgREmdqTbkfZAe02V5vKJEE1I5VfM82l1aOKNFFK2naQd014owlH0wbPB0oH2yikllPe2J461olWCM97RgTNPuVWkQxKIcFa1Aw1S1Og0+xjirw0WW473/vld71/sc70PmMu+1MOMMZdqZj5iOZpkL+buvX/IujklnErtnm8zWdZ4rsrm2+mvhZbTMEb3T/F1Yz+2veI55jhPoGs8YT2XVPZKdUpsbxWdix1Btw2MMcVSoQbmEDLWJ9m2L+DgpV8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUnjZm3U/IpqoqhGFQUI1tGZKmivzvJVG66KqbdgNIHF3dM3OF8rkgaPBxhQYMpgG9Rw/6CrFgyqBfrzDZ9GBohfASQ/3fGnAr2nKDgREmdqTbkfZAe02V5vKJEE1I5VfM82l1aOKNFFK2naQd014owlH0wbPB0oH2yikllPe2J461olWCM97RgTNPuVWkQxKIcFa1Aw1S1Og0+xjirw0WW473/vld71/sc70PmMu+1MOMMZdqZj5iOZpkL+buvX/IujklnErtnm8zWdZ4rsrm2+mvhZbTMEb3T/F1Yz+2veI55jhPoGs8YT2XVPZKdUpsbxWdix1Btw2MMcVSoQbmEDLWJ9m2L+DgpV8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zrKGGywWfcI2VRVhTAMCqqJLUPSVJHvXhyli666aTcMEk9f/zE3yJ8zgQIXFqhAUxzIOXKgbhAyxQTq9QYnEx8MKxBdgy/vawV2IZM3GBiyZodyh+JQ96ruFBdPiAqx8Aul6bxY0mEjm7YVsq0lU9YKU/dOysF7yRpkVqBznGPLBieZqzs/mIYaHLgo0xNy5J3rPLXoeteX6Di54MOvDWaTj/f+6V3tX8xzmQdKeZ/LoceQcjHTHyEfdTRXfffeP2TtFCOdcumetj+Zl3Apyvrb6a+F5vMwBvtP8WVjP7a90CWkMJ1AlXhkPW9rwUXf8H59K+iUzQhKVDCGGHKBKpi8T7Rd1/ULBBiosg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUnjZm3U/IpqoqhGFQUI1tGZKmivzvJVG66KqbdgNIHF3dM3OF8rkgaPBxhQYMpgG9Rw/6CrFgyqBfrzDZ9GBohfASQ/3fGnAr2nKDgREmdqTbkfZAe02V5vKJEE1I5VfM82l1aOKNFFK2naQd014owlH0wbPB0oH2yikllPe2J461olWCM97RgTNPuVWkQxKIcFa1Aw1S1Og0+xjirw0WW473/vld71/sc70PmMu+1MOMMZdqZj5iOZpkL+buvX/IujklnErtnm8zWdZ4rsrm2+mvhZbTMEb3T/F1Yz+2veI55jhPoGs8YT2XVPZKdUpsbxWdix1Btw2MMcVSoQbmEDLWJ9m2L+DgpV8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zrKGGywWfcI2VRVhTAMCqqJLUPSVJHvXhyli666aTcMEk9f/zE3yJ8zgQIXFqhAUxzIOXKgbhAyxQTq9QYnEx8MKxBdgy/vawV2IZM3GBiyZodyh+JQ96ruFBdPiAqx8Aul6bxY0mEjm7YVsq0lU9YKU/dOysF7yRpkVqBznGPLBieZqzs/mIYaHLgo0xNy5J3rPLXoeteX6Di54MOvDWaTj/f+6V3tX8xzmQdKeZ/LoceQcjHTHyEfdTRXfffeP2TtFCOdcumetj+Zl3Apyvrb6a+F5vMwBvtP8WVjP7a90CWkMJ1AlXhkPW9rwUXf8H59K+iUzQhKVDCGGHKBKpi8T7Rd1/ULBBiosg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgbbrPsJ2VRVZQEeFFRjW4akqSL/eydRuuiqm3YDCI6u7mGuUD4XBANDXKGCHpPDYcABzBViwZTBvF5hsunBSILwEgO9bxX4FW25wSCYqHes2TF94J3hrZH6iTHDGPEr5vm0euzjjayV0o3ijTCe1cEjl7JpLbaaKdc4Z0PnO8cHG0ITlMBW6tqF4JxW0nZ0rV1jFQrJA0WneYgh/tpgseV475/fzf7FPtN+wFz2hZZ+jLmQWf8Ry7FP9tLfvfcPWT+nhFOh7vn2J8saz6Tcfzv9tdBycmP0/xRPE/sx7RXPMcd5AkPxTHRScd0Jrmu5vRE6FzuC0RWMMcVCUAVzCBnpKLbtC9USq6w=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUnjZm3U/IpqoqhGFQUI1tGZKmivzvJVG66KqbdgNIHF3dM3OF8rkgaPBxhQYMpgG9Rw/6CrFgyqBfrzDZ9GBohfASQ/3fGnAr2nKDgREmdqTbkfZAe02V5vKJEE1I5VfM82l1aOKNFFK2naQd014owlH0wbPB0oH2yikllPe2J461olWCM97RgTNPuVWkQxKIcFa1Aw1S1Og0+xjirw0WW473/vld71/sc70PmMu+1MOMMZdqZj5iOZpkL+buvX/IujklnErtnm8zWdZ4rsrm2+mvhZbTMEb3T/F1Yz+2veI55jhPoGs8YT2XVPZKdUpsbxWdix1Btw2MMcVSoQbmEDLWJ9m2L+DgpV8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zrKGGywWfcI2VRVhTAMCqqJLUPSVJHvXhyli666aTcMEk9f/zE3yJ8zgQIXFqhAUxzIOXKgbhAyxQTq9QYnEx8MKxBdgy/vawV2IZM3GBiyZodyh+JQ96ruFBdPiAqx8Aul6bxY0mEjm7YVsq0lU9YKU/dOysF7yRpkVqBznGPLBieZqzs/mIYaHLgo0xNy5J3rPLXoeteX6Di54MOvDWaTj/f+6V3tX8xzmQdKeZ/LoceQcjHTHyEfdTRXfffeP2TtFCOdcumetj+Zl3Apyvrb6a+F5vMwBvtP8WVjP7a90CWkMJ1AlXhkPW9rwUXf8H59K+iUzQhKVDCGGHKBKpi8T7Rd1/ULBBiosg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgbbrPsJ2VRVZQEeFFRjW4akqSL/eydRuuiqm3YDCI6u7mGuUD4XBANDXKGCHpPDYcABzBViwZTBvF5hsunBSILwEgO9bxX4FW25wSCYqHes2TF94J3hrZH6iTHDGPEr5vm0euzjjayV0o3ijTCe1cEjl7JpLbaaKdc4Z0PnO8cHG0ITlMBW6tqF4JxW0nZ0rV1jFQrJA0WneYgh/tpgseV475/fzf7FPtN+wFz2hZZ+jLmQWf8Ry7FP9tLfvfcPWT+nhFOh7vn2J8saz6Tcfzv9tdBycmP0/xRPE/sx7RXPMcd5AkPxTHRScd0Jrmu5vRE6FzuC0RWMMcVCUAVzCBnpKLbtC9USq6w=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=3&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zoKYAyYdY+QTVVVCOOxgmpiy5A0VeS7dxyli666aTeA4OnrP+YG5XNGsNDHBSpwmDrse+zB3iAWTBns6w1OPj0YSRBe40DvawVhQV82GAQTcsf0jqkDby03ttZPjFnGiF8wT+cloIsbKZtG6YZrYesGe9Z6zZWQnDNe061WptHccyGDaUzHh0F5qTvfBtN30nRaoBFKh05zTtFp6uMQf20w+3K898/vdv/in2k/YC77QosbYy5k5j5iObrkr+7uvX/IhiklPBXqnrc/mZd4IWX37fTXQvO5G2P4p3ia2I9pL3iJOU4nsBTPRLsFSsqs5fpG6FT8CFZVMMYUC0EVTMOQkY71un4BGvCjvg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=4&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnWU4WGIWfcTsqmqysL2oKCa2DIkTRX53zuJ0kVX3bQbQOLocg9zhfI5EzgY4gIVtJQ6GgYawF0hFkoZ3OsVjj49mJohusTA92sF/UK+3GCQKPUG7QbNXjRO7JyyT4gOkfmF8nRaemrjjdR1bWwtrHRdjUIZ2w1dTUKj2Cltg25QWYWdUA0FFFh3tkcVpGkCSmFkoF4aHbRRnqPTNMQQf20w+3K498/vbvvin3nfUy7bwks7xlzYrP2I5dAmf2nv3tuHbD+lRMfC3fPtT+Ylnlm5/Xb6a6H51I2x/6d4ntiPaS90jjlOR3Acj7JR/MxOC6VxfWN0Kn4EZyoYY4qFoQqmEDLxUa/rF/z0o3M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=5&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zoKxgzGrHuEbKqqQhiDgmpsy5A0VeS7dxKli666aTeAxOPrP+YK5XPxoGGIK1RgfOr9MPgB9BVi8SmDfr3CZNODkQT5Swx0v1XgVm/LDQbOuNixdsfkoe50rXSjnhjTjBG/+jyfVudNvJECUbZYt1xzNQjfhA4VOkTX1j3nwbIeXcCeC47cSReE4ME12GDNRaPaXnQ1SpTSKYpO8xBD/LXBYsvx3j+/6/2Lfab94HPZF1rMGHMhM/MRy9EkezF37/1D1s0p+alQ93z7k2WNZ1I2305/LbSc+jG6f4qnif2Y9urPMcd5Ak3xjHf0RjUosOu2N0LnYkfQsoIxplgIqmAOIXs64rZ9ATOXpHg=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK0U22Gg7I0X8AJTZghEoA0djcZ4d1n+t/lfM+0ymt5Mqrn01g5LevKZ8lx9aGN5V5uofV0sz+VhU5addE5bsVhjg8AOxqELMWCHjt0g0bMXIgDfQhMRiNsWxHWBXZSIGLyHGsmJOZlVdEp8vG/X+5Eqa15I5ZCRliK/P3h9MR4=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/606564d24fc89b96862d2ceb3d3eaa443745b64ad774e289d2beb66933406a2e?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/606564d24fc89b96862d2ceb3d3eaa443745b64ad774e289d2beb66933406a2e?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_makedirs_with_scheme.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "144" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiKD1B7pxFYbmloQmTchMfSD+u3F17zmb81ER4pJVnbpdB7VRrmCq4EQyd1qPIa12S9m3b1osXu0C0Y+dtp5nXcBpLSP4lEnc8e+aw7nZ93e61D+ApYLUMZFmWF/YPL04w6NDRK0JYg4kqP2JAuP7AxBEMz0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "325" }, "content": "eJy1jk0KwkAMha8yzMaNWNSd67oXdCMIZehEO2h/mARUxIXtynN4AVFEEdQrpDcyileQkLxAXpJvo8H73OueDh3OB4aSMAfMqL9ySNj/zpraAsbeFeTyTJzDAmI3dWBVIX410VZWe8HYfE6MACkgKVFq5mCdx2jpKIkwTiCFoDAeMmr/tPPTbrAAM43EDTHlfj3Ryn4wGqTgC9ISiBQQzQwEgA985yNfJR8STz7zU/GrruqSb3/ikT8XVe/kx54voiWf6kq6sqW3b+suiaM=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "295" }, "content": "eJytjk0KwkAMha8yzMaNWNSda7sXdCMIZehEO5T+MAkoiAvrynN4AVFEEaxXSG9kKh5BQvICSd6XrQbvC69HeuwwnRhKxgVgTuHGIWH4nXW1BYy9K8kVuWxOS4jd0oFVpeyrhbZyOgrmprWYAVJAUqLMpGCdx2jtKIkwTiCDoDQecur/dPDT4UIr23I7pOBL7gk1A0SzAiHyiZ985rvkS6LmK9eK382hqfjxrwfE+KaavZge+SZa8aU5SFf19O4Dh7F9rQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "279" }, "content": "eJyljU0KwkAMha8yzMaNtOjStd0LuhEKZehEO0h/mAQUxIV15Tm8gCiiCOoV0huZFm8gIXmBvLxvq8H70uuRHjtcTQxl4xKwoGjjkDDqbn1tAVPvKnJlIc5pBalbOLCqEr+KtZXXUTg3bcQMkEKSkeRmBdZ5TNaOsgTTDHIIK+OhoMFPh7FWtuX1SEFHDISWA6JZgpD4xE8+8136JfXmK78Vf5pDU/PjX7AE3lSzl7Aj30RrvjQH2epA776aanfV" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwVjs0KwjAQhN8l0Js2VG8FEcGfF+jFU1maKQltmpDd+oP47q6nmW/mMPMxEeKTM625XTqzMb5gVPAimVtrhzmtbks51G9aHF71ArGPxrrAky3gtJYBfMwk/vDPqv2p2l3vdFbfgUVBVPpIE1wo3D+D+J4HjwjtMhUs0uiuIOaZBPpkpJnx/QEdxzaV" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "164" }, "content": "eJw9jjsKwzAQRO8icJdY2OkMIQTyuYCbVGaxxkjYsoV2nQ8hd8+mSTVvZpr3NhHiF2cacz23ZmN8xqDFiyRurO2nZXVbSqF80ezwLGeIvVfWBR5tBi9r7sGHROL3v63YHYv6cqOTcgsWLaLRRRrhQubuEcR33HtE6JcoY5bqT7UaCGKaSKBOA02MzxdMzznu" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "174" }, "content": "eJw9jssKgzAURP8l4K41qDuhlEIfP+CmK7mYkQSNCbnXPij996YbV3NmZnM+ykNsMKpVt0undsomjLlYkcit1sMcVrOn6Mo3LQavcoHoR6WN40kncFjTAD5GEnv4b0VzKurrnc6ZO7DkIjl6TxOMS9w/ndieBwuP/EVKWKTaqN6oyS4CH2cSZLuRZsb3B51mPUg=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "191" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiQ0aUN2qxbx3V0vnuabGQbmrRKyX5zq1e0yqJ3yBUcxnjlTr7WNy+r2kEO9wezwVc/I+tFoF2jSBWlZi0U6ZmB/+GVVd6ra6x3OwgMSi2ERk2BCFwqZZ2BvyHpMKF2GgjM3f2r/1AlFhNHICi0vZZNzjClHYJS7I0TCzxfrV0Ox" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "397" }, "content": "eJy1jkFqwzAQRa8yaF1i2u6yTvaBZlMIGGFNapHaMtJAG0IXtVc9Ra8QCmpDcZMrjG7UcXBzgyI0X+jPzH87hd47r6ZqZsNmoalcOFtTWLr5sw2ENc2sx4Kc387PjVfKYCi8bci6WsbuGizs2qKBRoZhpYzsmWb3eti3xEAZSckrvUFjfcifLJV5KEqsMGu0l4DrUW9Gvc0eUa9z85e7UtCcmYAc4EgFF3siSBWGoB9QcPidj5A6/uY9f8n9kXPkPnXAp9Sllg//hCiZnxwhvUrKG0fRlj/kM6ZWooXkNDCJD2Ls5X3gHobCURAj9xP18gtWxbLw" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "194" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiS0aUJ2qxbx3V0vnuabGQbmrSKyT0716nYZ1E75gqMYz5yp19rOaXV7yKHeYHH4qhdk/Wi0CzTpgpTWYpGOGdgfflnVnar2eoez8IDEYljERJjQhULmGdgbsh4jSpeh4MLNn9o/dUKwJPZYjAzRciqb/GOMeQZGeTzCTPj5Ar/qRQo=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiODPC/TiKYRkSkKbJmS3ahHf3fU0M98cZj4qgUP2qlP3a682KlQMEgJzoU5rN+XFb22J7Wpnj3c7g/Vzp32kUVdQXqoDnYrlcPyz5nBu9reHvYjvQSyBRUyyI3ysZF6RgyEXkCCdIDjOdZVlRiqTZciXwU6E7w+UhTev" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwVjkEOgjAQRe/StVLa6kDZGy/gBYZ2JhCBNnQ0GuPdrbv/kpe8/1EryZSiGtT1clMHNe3EFSaRXAatw5Ie8Yh5bt64RXo1G4l+Gh3nctcp044yp61o5s4Rk+Gx7dG11oPpwhksnXxkCOB7Gl1vzWgZLIZgCNx/QPTRVr2Whda8oFD9wrgU+v4AfRYxqA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ff73efe1fb08a3029617c562e49df6c698eb3821b2f62acc1e6362ac6d9d2029?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ff73efe1fb08a3029617c562e49df6c698eb3821b2f62acc1e6362ac6d9d2029?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_makedirs_without_scheme.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiKD1BXrxVJZmSkKbJmS3/iC+u+tp5pvLNx8TIT4505jbtTMb4wtGBS+SubF2mNPqtpRD/abF4VUvEPvYWRd4sgWc1jKAT5nEH/9bdThX+/ZOF+0dWBREo480wYXC/TOobpWeB48IFQpinkmgF0aaGd8fszY0lQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "331" }, "content": "eJy1jkGqwkAMhq8yzMaNWNSda90LunkglKET7aDtlElERVxYV57DC4giiqBeIb2RUbzCIyR/IPmTb60hBB90R3cdTvuG0q4HzKm3dEjY+87q2gImwRXkfC6bgwISN3ZgVSH7aqStWDvRn/mcGAJSRFLizEzBuoDxwlHq5xRjkkIGUWEC5NT8aeun7WgGZhyLARLyYTXSyn5IaqTgy9IQjgwQzQSEgQ985yNfJR8STz7zU/Gr2lUl3/4PSV5dVLWVN3u+iJZ8qnbSlQ29eQMpwoxT" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "301" }, "content": "eJytjk0KwkAMha8yzMaNWNRd17oXdCMUytCJdpD+MIkoiAvblefwAqKIIqhXSG9kFI8gIXmBJO/LRoP3hdehHjhcjAylgwIwp+HaIeHwO2trC5h4V5Irctkcl5C4mQOrStlXkbZyGgZT87GYAFJAUuLMLMA6j/HKUVosKcYkhQyC0njIqfvT3k/7kVb2g26Rgi+8I+AMEM0cBMoHvvORr5IPiSef+an41dRNxbc//iDeF9XsxHfPF9GKT00tXdXR2zd3zYBd" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "285" }, "content": "eJytjU0KwkAMha8yzMaNtOiya90LuhEKZehEO0h/mEQUxIV15Tm8gCiiCNYrpDcyikeQkLxAXt630eB96XWkBw4XI0PZoAQsaLh2SDj83rraAqbeVeTKQpzjClI3c2BVJX4VayuvUTg1n4gJIIUkI8nNAqzzmKwcZeWSEkwzyCGsjIeCej/tx1rZD7JDCr7QQIA5IJo5CIyP/OAT36SfUg1fuFH8avdtzfc/sCXzqtqd5B34Klrzud3LVgd6+wZhgnqF" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "157" }, "content": "eJwVjssKwjAQRf8l0J02VHcFEcHHD3TjqgzNLQltmpCZ+kD8d8fVfS3O/ZgI8cmZ1twundkYXzBq8CKZW2uHOa1uSznUb1ocXvUCsY/GusCTLeC0lgF8zCT+8O+q/anaXe90Vt+BRYOo9JEmuFC4fwbFrdLz4BGhc6aCRRpFC2KeSaBnRpoZ3x/OKTft" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "167" }, "content": "eJw9jr0KwzAQg9/FkK2NSboFSin05wWydApHrGCTODG+S38offdel07SJw3S20SIX5xpzPXcmo3xGYOCF0ncWNtPy+q2lEL5otnhWc4Qe6+sCzzaDF7W3IMPicTvf1mxOxb15UYn9S1YFESlizTChczdI+jcKh33HhFaJ8qYpfq7Wk8IYppIoLcGmhifLwqwO0Y=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "177" }, "content": "eJw9jrkKwzAQRP9F4C6xsN0ZQgjk+AE3qcxijZHwJbTrHIT8ezaNq3kzU8x8zATxizO1uV0aszM+oVfjRSLX1nbjsro9xZC/aXZ45TPEPgrrAg82gZc1deBjJPGHf5ZVp6y83ums3IBFjai0Ew1wIXH7DDq3SsudxwStIyXMUmxUblTpHcEURxLowZ5GxvcHaLc+oA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "194" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiQ0bUJ2qxbx3V0vnuabWZaZt5qRfXKqV7fLoHbKFxzFeOZMvdY2ptXtIYd6g8Xhq16Q9aPRLtCkC1Jai0U6ZmB/+GVVd6ra6x3OwgMSi2ERM8OELhQyzyB1KxuyHmeUc4aCCzd/av/UCUWE0cgjWk5lk32Mc47AKItHiISfL82ARQk=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "403" }, "content": "eJy1jsFKAzEQhl9lyFm6qLee23vBXoTCEnanbqi7CclIK+LB3ZNP4SsUIVpkbV9h8kbOltU3kJD5Q/6Z+b8nhd5br6ZqZsJmoalaWNNQWNr5zgTChmbGY0HWP87PjReqxFB448jYRsZuHBZmbbAEJ8OwUqXsmWa3eti3xEAZSclrvcHS+JBvDVX2gfJQVFhj5rSXjMtRr0a9zu5Rr/PyN3qlwJ2xgCzgCAZ/9kSoagxB36EQ8RsfIXX8xXv+lPst58h96oBPqUstH/6PUmI/OEJ6kaBXjqItv8tnTK2kC8xpwBIfxNjL+8A9DIWjUEbuJ+r5B1QPtaA=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "197" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiS0aUJ2qxbx3V0vnuabWZaZt4rIPjnVq9tlUDvlC45iPHOmXms7p9XtIYd6g8Xhq16Q9aPRLtCkC1Jai0U6ZmB/+GVVd6ra6x3OwgMSi2ERE2FCFwqZZ5C6lQ1ZjxHlnKHgws2f2j91QrAk9liM/KLlVDaZyBjzDIwyeoSZ8PMFphtGYg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiODPC/TiKYRkSkKbJmS3ahHf3fU0M98cZj4qgUP2qlP3a682KlQMEgJzoU5rN+XFb22J7Wpnj3c7g/Vzp32kUVdQXqoDnYrlcPyz5nBu9reHvYjvQSyBRUyyI3ysZF5R5hY25AISpBYKx7muMs5IZbIMuTPYifD9AUemOQc=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzk0OgjAQQOG7dK2UavkZ9sQLeIFpZyYQgTZ0NBrj3WX5Vt/7mpV1SmQGcxvv5mSmneWISTWXwdq4pCedMc/VBzfid7Wx2pezNJeHTZl31DltxfaBHQAHJAzghCJSDRSkFiGPbRRk5+s2QCDX9Nhzd714hq6NTecI8JCV17yg8vEiuBT+/QHcxzMo" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8be199ebadab91fdcad09dbf0ffd4a6cfae1406b9bd158a8e7324e976c571d9a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8be199ebadab91fdcad09dbf0ffd4a6cfae1406b9bd158a8e7324e976c571d9a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_mkdir_and_exists.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "140" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxFJbuloQmTchupSL+u+tp5r3DzMf4SpPpjBcp3Fk7xrziHkpo37Agbe1CYl8Hi4FnW4nzWkfiSwHx579rTtfm2D/hpn0gFgXRcGnGUJ1OONoCC5udSSQ+o3497oOiUCoRhNRMEJm+P7RRMaY=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjc0KwjAQhN9loTdtqN4KIoI/L9CLp7A0WxKaNCG7lYr47q6nme87zHzAV5qgBy9SuDdmjHl1eyyhfePiaGsXEvPqjAs8m0qc1zoSnwuKP/1dc7w0h/sTr9oHYlEQDZtmF6rVCUtbYGH1KjrYQSLx2enl4zYoCqUSUUjNhJHp+wMPeDOz" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjc0KwjAQhN8l0Jt2sd4KIoI/L9CLp7A0WxKaNCG7lYr47q6nme87zHyMrzSZ3niRwj3AGPPq9lhC+8bF0dYuJPA6gAs8QyXOax2JzwXFn/6uOV6a7v7Eq/aBWBREw6bZhWp1wtIWWFi9is7sTCLx2enl4zYoCqUSUUjNhJHp+wMPnDO0" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjc0KwjAQhN8l0Jt20d4KIoI/L9CLp7A0WxKaNCG7lYr47q6nme87zHyMrzSZ3niRwj3AGPPq9lhC+8bF0dYuJPA6gAs8QyXOax2JzwXFn/6u6S7N8f7Eq/aBWBREw6bZhWp1wtIWWFi9is7sTCLx2enl4zYoCqUSUUjNhJHp+wMPwDO1" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir3&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_move.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwVjEEKwjAQRe8S6E4btLuCiKD1At10JUPzS4pJEzLTooh3d1z9997if4wvmExrvEjm1toxpNXtKc/1mxaHV71A7HawbuanLeC0lhF8ziT+9G9Vc6mO3UBX5R4sKqLziGmD2ZkI8cnp//3WqwpiDiTQMlFgfH9YkCy1" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02VHcFEcHHD3TjSobmlgSTJmSmRRH/3XF1zzmb+zG+YjK98SKFe2vHmBe3pRLaN80Or3aG2LWzLvDTVnBe6gg+FhJ/+Ldmf2p21zudlQewqIjOI+UVyi7UzmxMgvjs9OZ2GVQFqUQSaJkoMr4/kREuwg==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/move?from=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir1&path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir2&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02WHcFEcHHD3TjSobmlgSTJmSmRRH/3XF1zzmb+zG+YjK98SKFe2vHmBe3pRLaN80Or3aG2HVnXeCnreC81BF8LCT+8G/N/tR01zudlQewqIjOI+UVyi7UzmxMgvjs9OZ2GVQFqUQSaJkoMr4/kTUuww==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOwiAQAP/CWcsClbK9Gz/gB7awpI1tIQWNxvh3yZxmLvMV88FRjGKuNZdRSr+mZzhTXroP7YHf3c5VvpQMS3nIlPmguqS9SHbRR+MtgeZBAfLUk7VWGWqYyTiPhjT4HpVxqPwQcQLUCM5fjAUQJ7FxnVNo79v13rTylleq3EqktfDvD3fwMKY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/e8fcf3c6a02e7109eb4a66613a3a33b38c93a20c4913891c7f9b092908c53600?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/e8fcf3c6a02e7109eb4a66613a3a33b38c93a20c4913891c7f9b092908c53600?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_none_args.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 410, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } } ] ================================================ FILE: tests/recorded/async/test_operation_error_triggers_retry.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxFYbmtgm2TZiZikX8d+PqnnM292MCozeNCapZGmu7MS1+SznWK80e73qG2tfO+ihPy5C0cAc5ZdJw/LfqcK72twddCrcQLaJlXMpg0phmB+bETjkOA1gcQ3k1GzNBQ/Ll+X5tiyqmPJKilJ5GwfcHzvU3sw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "127" }, "content": "eJwtzEsOwiAQANC7sC8MPzv2HL0AKdgipuIwbazGuxsT1y95b7FQuohBLMy1DUpt9XYPMZE7X2XMrcgjrDE95Zp4cM7+veNAc2JlwHgwYEcAjw6kRi83jvKY9vLS0/7I1PqCnmaqpxhyV36vsYi9Ry0+X5NrKMw=" } }, { "method": "PUT", "url": "https://uploader49j.disk.yandex.net/upload-target/20250203T005840.185.utd.ycvkz1cvqirs7k85rgrp6dai-k49j.23887581", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUhJLEkEABG+A3s=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAQQNG7sNbCEDpA940X8AKUGdLGtpCCRmO8u13+t/lfMR+cxCDm1kodpIxrftI1lKX7hJ343e3c5AskLfUhc+EjtCXvVUJ0gKw8GsegjY0m9KjBJQKfLExRKT953Rv0ngFtryMaIlTBTtpZEBexcZszne/beD+z8VbW0PiUFNbKvz86xjAu" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/1c816e09648e1247c4a56218fd19f71bc009b9254699e16752c64dd60a7b2871?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/1c816e09648e1247c4a56218fd19f71bc009b9254699e16752c64dd60a7b2871?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgyAURuG9MG5FhIuPuekGuoGL/ERTFSK0adN073V4vsn5ivlAEIOYS0l5kHJa49NfOS3Vh3ePd7WjyJeSfskPGRMOLkvcs9RW09TAgEzNdQiuNZb7tiEOREY3rfLoLMEzOuegnK6tNT1Isw4TlLiIDWWO/nzfxvuZBVtaueCUwGvG7w+QeTGd" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/3635c2e4e540a0ffb746a9725af5543271de865edae8bbe1b306649e53a3fce1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/3635c2e4e540a0ffb746a9725af5543271de865edae8bbe1b306649e53a3fce1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK0U+gMte+MFvMB0ZghEpA0djcZ4d1m+b/O+at55UqOaRUodtcY1P+kMZWk+sBG/m41FvzpNS73rXHgHWfJWNZH1aDhiTDSYkAYcHFrbsnO2S6FvAckjIxnnUwhdyz5FkyD4OJFPvTqpB8uc6XhfL7cjhR9lBeFDJlgr//660TID" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dd35c2e9c9bd728b7c74c330e4431b860acd5cecd245b8810e5b92ba859fd5b6?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dd35c2e9c9bd728b7c74c330e4431b860acd5cecd245b8810e5b92ba859fd5b6?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgjAURuG9dKyU0geVuXEDbqDl/g1EoA29Go1x7zI83+R8xbQjiUFMzKUOUo5LftI5lLn5hI3wbjawfClJc33IXLAHnvNWpYk9uaRGr4y++NQqGHSw40XZ5ADfWq+j9uS6EHXrHSWiXunYW2OJohEnsYKnTMf7dr0fyVjLEhiHpLBU/P6OzzF9" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4b7d6f1c814398f01e4e2e5c915f6ee80583b38d62ab3086dfdd713b7545ddb4?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4b7d6f1c814398f01e4e2e5c915f6ee80583b38d62ab3086dfdd713b7545ddb4?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_patch.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "129" }, "content": "eJwVjc0KwkAMhN8l0Js2qLeCiODPC/TiScJuSorb7rJJRRHf3Xia+T4G5gNSeYAOxKxohxhSXuKayti+aY78amc2fG4wjvrAypqXGlgPhUz2f9fsjs32cqOT957VHMzj7oMgsIKJTXL0g+u5dzSeSiJjNwMl5e8PhkItDg==" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFYqSS0ugYlVAkWUPNVzFRIVyhJzSlMVlWprAVjPFBg=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "537" }, "content": "eJy1kTFvwyAQhf9KytKhiXIYY2zmLt2zdLIIHApqsBHgqFGU/95L2g6durTSSUinp/e+e1zYZCIyzSqWOiZT7YGtGb4Hz/TlumYZy7xki2NwJGql7JTkqtGAvpe8db0E56VAKW0rHdhWDcp4b73r98p3nUFlwDcOwInGDp3ojLHKcwqxS6lzHFOeE+YasFDiF8bn6kyJL49xZVYnc1zwgRGPzWgq3lgaaNoNqA3nO95rICTxBKAByDrOLvjwq4zOPZDEhfKmt6/mmd4d5W9/dGHnGHGqVMAdMOVwIoLxu5i/biUt+2Ow/2RPBdZzwvvNmd1+9xRKmCemyR5ohkYIoST01w9wTZ+l" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFbKK81NSi0CMk2MamsBDR8NYw==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "549" }, "content": "eJy1kTFvwyAQhf9KytKhiXLGYDBzl+5ZOlkYDgU12BbGVqMo/72XtB06dWmlk5BO7+5997iwwSZkhhWcSzfZ4o5sy/A9BmYu1y3LOI9LdthFTyIhZaNkpbgBDFpWwmsJPsgapXRCenBCtcqG4ILXvQpNY1FZCNwD+Jq7tqkba50KFZm4ZS5j6qY8TphLxJkcvzA+W2dyfHlMG7tZ7WnBB5oZltRjZkZwYnMZbcEbFwcudqB2VXWotAHCq58ADACNpNHHEH+V0elHkvg4v5n9q32m90As+x+5uDElHAqFcYedclyJoPsO6a8Tmpb+FN0/racAy3nC+82Z3X56jXMcB2ZoPVC1vFZSgNbXDzhfo0Q=" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFYqSS0ugYlVAkXySnNydBSU8kpzk1KLoPzaWgDlExcB", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "509" }, "content": "eJy1kc9qwzAMxt/F17VU8Z848XmP0MtOwbVlapbExnbKRui7Tx1ssMNuGwh00Cd93w/tbLULMsMa1jZl29yVHRi+xcDMfj+wgjVtxeEUPYmkUr1WneYGMAyqk35Q4IMSqJSTyoOTetQ2BBf8cNGh7y1qC4F7AC+4G3vRW+t06MjEbbWlZcolZSwtYmVm3eaZBgVtw4cfBy6PoI9dd+4GA2QrngAMAK0vyccQf5HJbxkhXUniY301pxf7TP1MqKcfvC4tC66NICnEznKJN0owfcH/NXneLnN0/3SentbeM34yF/b44C3WmFZm6DxQjVwKDVyI+weUQJZA" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_permanent_remove.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "140" }, "content": "eJwVjUsKwkAQBe8ykJ1mUHcBEcHPBbJxFZrMCxOcH9OdoIh3t129qtq8j/EVk+mMFyncWTuGvLgtlbl9U3J4tQli1511Mz9tBeeljuBTIfHHf2sO52Z/e9BFuQeLiugMBTVSQpKhIuYVZmMixGenX/drryqIJZBAy0SB8f0Bt5YxtQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVYbmlgSbB5lpUcR/d1zdc87mfoyvmExnvEjhztpxzovbUgntm5LDq00Qu+6sC/y0FZyXOoJPhcQf/605nJv97UEX5R4sKqIzFNRICUmGiphXaHehmo2JEJ+dPt6vvaoglpkEWiaaGd8f5AUzkQ==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove%2Fdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_public_listdir.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TTVRmTKRlMm5CZiCL+u+Pq3nM252MWlJC86c3tMpiNCQVnhSCSubfWxVT9FjK1b1g9vtoVxT531hM/bEFOtTjkYwYJh79rulOzv45w1j8gi4LoTLneI7kpEounoh3BJUcQ1PIMkfH7A93CMNc=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "768" }, "content": "eJy1UtFu2yAU/Rdem86ADcRIfdhWtVvauttkp02mKcIGLyi2sQ2O4lX59+K02x4nTdsL3HM53HvugSfQCrcFHEhtdzxYiUu/p8q6wPll0w55pYtNpa2Tug9eIJgBN7bqdKn3oBH1BH4dFr0STkmfwhCTc0jPEU0R5iTkYXgGIYfQs2ojdan/SHtVsFOjJ3bp2SK5S24/Pd4ncv2xuL3avb1q3w3lzUMSZoebrVkmXbcibJ1cd6v1+7tsRT/U45DFhzyCDnXBguZt/WW8X5gmDZfmsbkU3y8ufvcZ+sr32TrXWh4Eo5D6jd0FMsjwPmyvlw9pkY0/Pnv+RtW5knLS//R3Hla61g5wDGfAlKVVPvahNb0PwOSxcaI65bRTtQX867fjDPTKmqEv1EZPzkWEUEYQw1zNJWZRjAmLwjIPKWEIMlTQXMR5TuJ4LhiN4gIJFAlUwgJHNGYsx5AgGM2ZAlPpvbbaNIAjRiBk8wiFFFGMkH9TU9eqcb6rPQ38MtNPMf9aSdvrvf9C/6m+d1EddOnnOB6fAfmN5io=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Ffirst.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwtzEEOwiAQAMC/cO/CsgUi7/ADKKsoTdvQxVSNf/eg98m8VWl8UVEVkXWLWvd1WlLm5v1jSpBvW4VnmjPvMLPEcaS/GCS1K4u2xjrj0R/ROSIH5Am6ZEB8Gaa7nO3SMVDNaT/VMhs31F8d0NpDUJ8vA3ApMQ==" } }, { "method": "PUT", "url": "https://uploader66vla.disk.yandex.net/upload-target/20250616T155335.363.utd.11z0e3jtc2ou173kdaxbkhn05-k66vla.712297", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Ffirst.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwljssKwjAURP8l0J0mqLuCiODjB7pxVWJzQ4JpE3KnUhH/3Suu5szZzLzVSAjZqVZdz51aqVDJSwlA4daYIeXZrW2J+mUnR4ueCOa5MS7yw1TiPNeB+FAswv7nmt2x2V5u9iTcEUMKJPoy31Mc+hQZLlaxfyHgY2VoLJBx0FiSBckdbxPT5wsrwThG" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fsecond.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsOwiAQANC7sC/fAQzn8AIYRoo0tYFpKzHe3Zi4fsl7s7nhnQU2E209CLFvyzMmbMo+eCq98hHXhC++IgUA8/eJYstIQkttpVPuqqw1xnPpgO+UONpy3HKhQ0L35zlGH7maRY+p/mItLwAeFPt8AblfKRo=" } }, { "method": "PUT", "url": "https://uploader15j.disk.yandex.net/upload-target/20250616T155337.064.utd.e5ivbgitv04s7wwyysygk3l2y-k15j.20844741", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fsecond.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "160" }, "content": "eJwljs0KwjAQhN8l0JsmqLeCiODPC/TiqazJlgTTJGQ3UhHf3RVP8813mXmrGdlnp3p1PQ9qpXzFSYpnLtQbY2Nubg0l6Bckh4tOyOa5MS7Qw1Sk3KpFOhRgv/+5bnfstpcbnIQHJJbCEmNp9xjsGAOxC1XsXwgQ2pyc5oVlnXEuERjlzwSR8PMFY484mg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fthird.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwtzEsOwiAQANC7sO8A5SPlHF6AhJE2VEA6Na3Gu7vQ/ct7s7njjXk2E7XNc763tYaIXZu8JojLluEMJeIBBclrrf5ioNATEh/FaISV9iqNUcrBZCzsFMHWWrH06UyP0I6l6mfseXzd5ZB/9UU64TT7fAEu2iqO" } }, { "method": "PUT", "url": "https://uploader45klg.disk.yandex.net/upload-target/20250616T155338.956.utd.6oooenr9ygqapxio4vdrk2zm1-k45klg.718084", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fthird.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwljsEKwjAQRP8l0JsmqLeCiKD1B3rxVGKyJYtpE7IbqYj/7hZPM/PmMPNRE3BIXrXqdu3VRoUCo4TAnKk1xsVU/dZm1G87e1j0DGxeO+ORnqYApVoc0ClbDseVNYdzs+/u9iK+B2IJLDLk+ojohojEHovQP1jrgMVrXljGGaYcLYPcGW0k+P4AKp44OQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=500&sort=modified&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3976" }, "content": "eJzNlmlPG0kQhv/LSPGXAO77sGStICTckBBMMKuV1Uc1nhiPx56xwYny37eGJSEbJUCu1Ur+MD1q13RVv+9T9T6rlyVknSzms2wlG8DYQ4wQs877bJJSBXXWISvZZT7O8UkSfK4ntbvMOnwly2sYV1nnz/dZ6eohBmmnfFbVa/V1jbFuA6f8EnBVuPE/q7sNYQaubj6VMcLkKlGrVJ1Q1pG8w+VTQjqE4K7xJOYpf3Bblb/D+FTiH/IxDG4/XsN13S4vXV40kaLEV5CISlolyZ3gRgVwxkaQPHprqQfXxBo6JhXudSwCCO2dYspYJqOzWkvivBbMu6R0IgxY8lIEYDwKa5NXyklPGGOWcIxVzv1lHgYjWGK86cnT3cODw/2XZ0eH8Xwn7L8Yrb8oN+Zp780h713vDSenh9NpX+rzw61p//zZQa+vtsfLec9ee0FqOm3vKl+Oj5dHu5PihJ9OzopNd9Ht3n1nPsOryYZ1XVaddnvpYr5WjdqxDaQsrw6uSnJxMn673hQDYu4+lilOwnwMRXMpM6gm81mAQd5UXEiptKSadbSUnAYSXKJWWy4E9ZwoqxlQDp5rQSJLNgFYSZmJlnNtpTCEEG0VS+4m9CKv8kmB14RFJNoIqlQTl6EWJuPmAPjVqpHebTYfD/OrT1LO8gVK7zfF/7CSwXWeMA98ckWdL/LZvBpUtavnmF0WLsE1erxxxt1lxclVcTlxEWZrMa9Ga0tXRLhem83bzbIttQqB+UR01BwMI4IILUB576KLyboUrJTW0KBIDAT3BREJ9dJZEaRwbWUkEYGKdlFt74zgbK9wx1vlybIgvfx4erah034+LY735Invbw/fPYPno9DbIQdXcrs3FOurO+UkFycm8sXzql73VW/Et/aqHXYU9vcX4uIJ38TfH/M8dkmrSa1xfPeT31uYRDmp8hoF0HV17cKwufDW0FXDbuuGL/i/MCnqRgaNLruNeZ+wFzf2bWFxYDa4jd6YvUtla4hLhf7UREjDgmLSBCYlC05aGj31NrrWndK7H3XeqkfForvgLajRPo8gwiKHq2oQJvOi4eGHlTviVYBnjvch71877mOefhzz9BfMY/xB5iWuAHMDLjxqGYUTMFUjWGLUCmDwOfM0ri2KTVEvJFYzCBoJM8FrzlNyiXkdIiQUumCEa5+wykIqEWM0nkr4/zBvuFwutlzfzcPBu4OLH2Ce1CRxpoBQaZOCwJUjQrhIqfCSaULQrMYFaUiUAEpiQWw0xNJkHBWUf515RnDLuPgu5v2Ck9zLvJ+O/3uYp4JzOI8oY9DdnqN8RYLELXfUhuRZsEYolXiiIiDqvGKNsLmOCiVq0kPMO+cbR4d7dnt/dP72+dgNxxd1LI8OBrtuYzboJ6ur4dVb/4rR1+Pp+Wx0sruzerb/xpwdmn75qjc4X/868+4M/+uhx/gN9Lxj1gECykdiNDYBqoV1jmLiTgcLD0PvEUj4NvTqYT67l3mfb7gPefZxyLNfIo89iLwAnkRkulMoZjSdtV5LTJdBwEahw+fIi2hLbAG4wskN5RM44BtFkrWoKoNNNfAERptEsDXwJDXYGITFzkMcNv//D/Iuit5eGh1tvtnrX4x/BHkqIemZ9sYrh/OESIyBjpFpSq21zCjOPabd8B87Jo4dSH/Ui5WgbKKOfR151nLC7PeNeb/gJPci76fj/x7kMWo8kRwbKpcIP2OVwekOmA5BOo2TnpAsRsE9WM8Yl0IKhdOK0lyhb6x/AHn9ndezEX/L3Jvj45fu2C9fWrmxeRq929gcx2HfbK76s9OrTbM1NbR8l29tLi+WcgqGLy6L7XP9DeR98vtvIB67IZ6xCfuTEkLxEAUDEbHt4OAhKATton+YeI8gwhfE++u/8vWHD38DFDTGgg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Ffirst.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Ffirst.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "505" }, "content": "eJxFkVtvm0AQhf+LJfNWwy67C46EKjuJbQzGlQWp7Zdo2UtZYZbb2sGp+t9LkkqVZqQ58zD6zpnfk6ITcvIwKYxp+gfb5vWbvtSUi27GVV/O7lRzMcy6q/0hbeEAzubAc6jHEJWUQ4dIyQiFyJ8LBriPMfR9KIAkwCUSiXGGAmOKxibUJj52EAPI1v0mLMUx0vSwbtK7djJ1aI9LT8aq1YcIp/lpU7w/iueSZaGze8ObrECLb2FTK5T63L0992aR91nprqM+hHsWxzf0a+o+jfX9qnjgWFJdhKaVCKTqejMzg7FGE03dK6NqHVBjKCsqoY1V0L4I2nQKl9tkl8Q/jvuEn0MWr8rFqlleZfQzcbMhKuqXpG1P2Dsn6/Z0ftxlJ7Kp7tdsPuTIMaC1tyRvqsN9v6116r7UR/1E/zFN3YX9n+OiKmVGRFZrMwK8mnsjAiMGM4Wr5kKVtsY/iO71w8iYHPEw8KAle/UuAoCtYlwT5OWeg7APGYHYZ3BMnlE8BzwH+ZxTqxJc0a/LvGbXT6Om1Lfg5k7+/AUcW6YT" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/e01dc9170a7c4afad206ffc6a2489ec1d8552882e1f6136f4e82e2e55a455a6a/68504c14/nsHIkeXKnaRGpTyn0UiRqXB7fLiqnRK5TbYHhzCeEkcUI0Mw5HUh4A-Ipoi4T8d3vEstAbsUk3GKsI2OcLLv4g==?uid=0&filename=first.txt&disposition=attachment&hash=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Ffirst.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=15&hid=647b704582c6258c2552ca591db1b9da&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "15" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Fsecond.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Fsecond.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "507" }, "content": "eJxNkUtvm0AUhf+LJbOreQwwTCRU2U0dG9u4cU0CbNC8CBPM8BoSaNX/XtJsKp3NPYur79P5vSg6ni/uFoVSTX+n66x+l7caM96tmOjL1YQl4+OqG/SPU3cd7iEDEsAQYLlLAUSI2iZhnFHHBDkgnDpObpDcs6BhexBQC+c2NE2OPciY7nqOYVPT0WW/25c8Pkh8eWiukzQicWlTsDmHB7Q7lunr9woX1YtizfmUBXjTZUmOYF+8v5JHy/xZtWlXXoP9l/j47MWhlzSPUZaul+B+ztdBMN/QcnHjElfc7zmtJVupUWmzRVP3Qola+lgpTIuKS6UVuC/89rq0NkF4Co8/4nPI0j09bsv1ttkM+eE5BNF4KOqnsG0TB6bhQ5uk305R4u6qaYjQSGxDma0euKSpLtM5qOUVPNWxvMcvn1BLsNb/A7mJSqgZci7UTJCpqeG+4qNaWtvmhoXU5iV4l32o2I7jQseElpb34hf3LaAVc02whTBnBBFmeJC7xIQ2wthkLsWQIq5VnAn8+ZnVdPhnqkr55r+BxZ+/zYao3w==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/65e8907b3d93df6c3799c41bdedc513f3bec55f0bf82704873c2af4711ea87dd/68504c15/nsHIkeXKnaRGpTyn0UiRqZ3BONK9HLkZjEmahmgtdpOM_JaBr_Yf97shwjbQ21SmqZrkTJI-XLW8XN8YpQU_ZA==?uid=0&filename=second.txt&disposition=attachment&hash=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Fsecond.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=23&hid=ba29aedb9bd087e6b1749aa1d6ca7c9e&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "23" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Fthird.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Fthird.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "505" }, "content": "eJxFkUtvm0AURv+LJbOrgXnAEAlVdpGfCbGo7RhvohlmCFNgeA0OpOp/L2kWle7mfourc777e5a1Ip09zDKt6+7BNHn1roqKctEuuOzyxUgVF8Oi7c3P1UREMAoBJ5wx4AKXAYywxxILpB5HNvGg7ToOEwwBaAPEUsiEC1OPIZsSwT3TIdhCie2YqtvucnE9KBpt6tOorLOMmnj3s83hL0BfouhIIzYePbwKLpzRVVDyLCbBN3a9vAdk0xC7/pCbYHwbcSMIvBdqe3OXcxhM872X3LeMVBZC0VL4OpMtX+hBG5NEXXVSy0r5VGuaZKVQ2shol/nNaQ5W+/ApfDxen0N+2yWP63y5rld9engJ4Xk4ZNUlbJoYu7dw08S3H0/n2NmWY3/2BoYsbTfm3mF1GY3P+0qd4KW6qoC+fTHN4dL8z1HIUuoJMamUngBe9VhPmGLQc7CuCyqVMf1BtK+fIghjx8W2C4y0kx/CB8DIpph4KXCEg5ADE46AQFP/0EMY2SJxKWdGKbikX5d5lfT/RHWu7v4dzv78BfYPpjI=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/48eba32d8dbb2727b25459bc02f9d418931766beb423124bf3be73f9b41a8ed9/68504c16/nsHIkeXKnaRGpTyn0UiRqYISrk3j2aWRRPaRbyP95BDVdbaBDmdhY8D-bXVwD8Gq81pziGDygy5qe83vlnHZ7A==?uid=0&filename=third.txt&disposition=attachment&hash=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Fthird.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=22&hid=89f26e64463cd42e4d41394541ec7adb&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "22" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=qT%2BJNMNLPXONdZIcLFkAFpBufKWN3UxKhoVNqqY57ZNGqYZCMUY6HmyuU9xb40t1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzk0OgyAQQOG7sG7lR0Bwb3qBXmCAIZqqEJk2bZrevS7f6ntftiHNJbGR3aY7u7D5wHzGTFTbyHlcyzNdoS7dB/aE725H4i/J09IevFQ8gJayNy5MECEIK70fYlK+N5iyMypY6YSXfYzOWqu9wayUFhqCttGgi944QDOcMuFWVyA8XzKsDX9/Pn4wwg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/05b0bb061997cd2935edf852b6180913cc8666495ef22404ab46c5e8c958ae57?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/05b0bb061997cd2935edf852b6180913cc8666495ef22404ab46c5e8c958ae57?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_public_settings.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "309" }, "content": "eJyVjcFKAzEQhl9lyFnae8/tvWAvQqGsu2Md1E1IRlDEg7snn8JXKEK0yNq+wuSN/LfoA0iYyZDJ/31PjmP00c3cXNLNstLrpZdW08ovHiQptzqXyLX6+Lg4fTxzDac6SlDxLWLngWu5Em4oIExr14Azm15UI2/FSaeKtgn3l7dSbxKrSrtNa0fh5CH1xL8mav5UE2juOKVqy1DYmx2o9PZlO/tEfeMcbCg92bH0pbP9P7TgfFim8oLkq2Xcnb3jMZcOONCPowd7wmKHeW8Djc0ytNmGiXv+AcSZkZg=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4btLuCiKD1At10VcZkaoJpEjITUcS7O67+f2/zPmpFdsmqXl0vo9ooV3ARcMyZeq1NSNVuIfv2DdHiq43I+rnT1tNDF6RUi0E6ZmB3+LumOzX7YYKz/BGJBVhmzvUWvJkJmX28k4QY1xyAUdILBMLvDxFuMU0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "770" }, "content": "eJy1kl1v2jAUhv+Lb6GL7Th2sNSbtqOobJoS0YlpqpDjDzDgJIsNLVT89zqs1a6maVJ7Y59z/Oic97zyM2hFWAEOlPUbnvwQN/GeaR+SEI9Fu6u2Vi68DsHWSw+GIBxafca7mNTC9clfUNlpEbSKAIY4u4D0AtEZQhxjjtEAQg5hpFyjrLH/xF7bb/Qhgvlk+nVdHMmEbNCcfK5NcSznUzJt92xcfhkkq8o83rpysL7SY2sqd7Uuyokl1+T+flw8CfYruaNV68rDt7umnqXfm3l9I5aXl3/m7LptnLMKofU8SQ5C2U9+k6hk+TgZm9vjkrRlyIvIL7SrtFK9/uf/9XJrnQ2AYzgEjTHxAfAY+qaLAei9boLYnms2aOcB//lwGoJO+2bXSb2wvWckyyjLEMNcpZWiTFImUjMaIShTpHRKCcKM6BQRMpI6yw2jKs8kNblMRYUgNCJlglI5An3rvfW2qQFHLIOQMQoJozlOowTZOKfrEKf686q/t3kT895K2s7u4+f5oP7RRf1kTdzjdHoBW+jqiQ==" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVipILC4uzy9KUbJSUDI0MjZRqgUAR9IGGA==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgwHFfGzg4pRt8Q&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 403, "headers": { "content-type": "application/json", "content-length": "122" }, "content": "eJyrVkotKsovUrJScskszg6uzM3JzMsOSCwuLs8vSglKLSzNLEpNcQUr0VFKSS1OLsosKMnMzwNqgKlSKIIqA6rITS0uTkxPBcpeWHSx4cLWCxsvNl/YerHpYuPFfoUL+y9sAAruu7D7Yo9SLQCU7TbL" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVipILC4uzy9KUbJSUDI0MjZR0lFQSixLzMxJTMpJjS/NK8nMAUoZ1gIAHrUNXw==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&allow_address_access=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "21" }, "content": "eJyrVkosS8zMSUzKSY0vzSvJzFGyMqwFAFhtB9Q=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgwHFfGzg4pRt8Q&offset=0&limit=20", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4btLuCiKD1At10VcZkaoJpEjITUcS7O67+f2/zPmpFdsmqXl0vo9ooV3ARcMyZeq1NSNVuIfv2DdHiq43I+rnT1tNDF6RUi0E6ZmB3+LumOzX7YYKz/BGJBVhmzvUWvJkJmX28k4QY1xyAUdILBMLvDxFuMU0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_publish_unpublish.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "313" }, "content": "eJyVjcFqAjEQhl9lyLno3bPehXopCLLdndZguwnJCC3Fg7unPkVfQQpRka2+wuSN+q/YByghkyEz//d9GA7BBTMyYxtX00KWU2driTM3ebNRuJaxDVyKC++T6+KdqTiWwXqxrkbs3nNpnyxX5BGmuanAGQ0fip434yhDQVn49eOLjcvFur51c0P+aiJxxDcXVX+yAUSvHGPxzJDol54pt3rSnR5wf3DO2uWW9JLb3OjxX2KQ9poob5H91IS30W98ptwACP6lN2FOGOzQH7WjvmiCOGk3MJtf0MSTWg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwtjUEKwjAQRe8y0J02qLuCiKD1At24KmMzJcE0CZmJKOLdHcHVf+9v3hsWEpcsdHA5D7ACV2hWcSKZO2OmkKpdY/btC6OlZxtJzGNjrOe7KcSplon4kFHc/vc1u2Oz7a94Uh6IRUV0xlxvwbMba/yTpoSWHFBI4zMGps8XeWMyLg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "776" }, "content": "eJy1Ul1v2yAU/S+8Np0Bgz+Q+tCtVSdHU6UmqtZOkwUGOyzBOICzulX++3C2qk/TNGl7gXPR4Zx7D7yAgYcNYEBqv2XJA7+K+1r5kIS41MModtpv6rH/hcAChGlQpwsuFj03c/FbcuMUD0pGCoaYnkNyjss1IiwtGCRnEDIII8tYqVv9R9pJtqm3apr9p1Qgere/pujT9dYd3t84gp3pVpJWT2e9fF49fljux/30QL/d6wo/ysofOnMJl930kaNhn1SZGMzddFvZfp3e28/9Fe8uLt58RreLPpsQBs+SZOJSv/PbRCYdv7nV9arW3eWy/B75tTJCSTn3//L3ee600QEwDBfAtq1XEUforYsAzHnbwHenMx2U8YB9+XpcAKe8HV2jaj2nRijNcopyzFpU4qJETZujLM0aSQRqIOSZJC1XHCFEJS1yJVrCyyIrsEBKkDJNcwgF4TIDs/RBe217wFBOIcyLFCMEcUZQfE9rjOpDdPWnYX8m9drMv+5kcPoQv89/0o8pqifdxjmOxx/vfe64" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dy3b15RqE51MEkrvBGr42rmgSd5Jx%2BndzSZCKquqyY5jViJ2ZdJsvgmA0KgyHa1pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgaGOi_S_igAK9w&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dy3b15RqE51MEkrvBGr42rmgSd5Jx%2BndzSZCKquqyY5jViJ2ZdJsvgmA0KgyHa1pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgaGOi_S_igAK9w&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwtjUEKwjAQRe8y0J02qLuCiKD1At24KmMzJcE0CZmJKOLdHcHVf+9v3hsWEpcsdHA5D7ACV2hWcSKZO2OmkKpdY/btC6OlZxtJzGNjrOe7KcSplon4kFHc/vc1u2Oz7a94Uh6IRUV0xlxvwbMba/yTpoSWHFBI4zMGps8XeWMyLg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "624" }, "content": "eJy1UctuwyAQ/BeuTRTAvMy5n5BLVVUWmEVBNcYyJGoV5d+7jtpjVVVqLzC7zO7OLFeyuHYiloRUX+3hyT3ifYTaDg2PYTn7KdXTcJ4/EdmR9r7AvWDFYHZ5C74ljyu4BgEpnHK5p2LP+yMTtjOWigdKLaXIyiWkmH6kDZA9hLDxrr/XPaWcGrGc7kiJsQJihLWsCMjmqzQ33XOpQa7EPr/cdmSFWs7rCEPa1AkplZZMcxtZz03PxqiZ6tQYhGcjpU4FER04xpgM0mjwUbjeKMM9Ay/6rtOUeuGCIlvrS6qpzMQyLSnVpuP43CtucG8lZ5gbTq13s5uLcfgS89dKljVd8Jv+qT9uEd5SRB+32weON7tc" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dy3b15RqE51MEkrvBGr42rmgSd5Jx%2BndzSZCKquqyY5jViJ2ZdJsvgmA0KgyHa1pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgaGOi_S_igAK9w&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dy3b15RqE51MEkrvBGr42rmgSd5Jx%2BndzSZCKquqyY5jViJ2ZdJsvgmA0KgyHa1pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FgaGOi_S_igAK9w&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_remove_trash.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "136" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TTVRmaW1JMmpCZFkX8d8fVPeds7sf4gsm0xotkbq0dQ1rdnvJcv2lxeNULxG4H62Z+2gJOaxnB50ziT/9WNZfqeO/pqtyBRUV0hoKYNgxSiL3ZmQjxyenP49apCmIOJNAyUWB8f+cvMA0=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash%2Fdir-to-remove", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "152" }, "content": "eJwlzc0KwjAQBOB3CfRmGtRbQUTw5wV68VSWZkuCSRN2t0UR390VTzPzXeZtAuFkOhNEKnfOjaks3kKN7Qtmj892RnHr1vnID0fIZaER+VhBwuFnzf7U7K53OGvvkUWHaAyEuaw4CAEHNR/JSrF/NRuTUULx+nu79DoFc00gqDJBYvx8ASNYNbQ=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash%2Fdir-to-remove&permanently=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "696" }, "content": "eJy1ks1qwzAMgN/F1zVUcSy78XmP0MsYI/hHWc2apjhu2Sh596ldN+hg7LKBsTH6JH3YOonytidhRUxZLERHg6cYKQp7EqnQMAn7eBI7N1yZqoxVpmE8EtP0mnoG54UImVw5ZwkJUlVgKtDrurW8ZHMHYAGYj7Slnyj1RY05Paddt3dlc+k5vdjlg7vnc01TWRbeug+FrmQ3bZbftYYxpj792ifTNB5yoC6dSYWoDdZG2gYp9Bj6FeoYAAxidMb0jVakGIhOrWqNvpYK27hyUXpEdLFdSQWc03Lpq/tFz976dRFB1xC9Q+18Qz40XgdyzoPTKE3PAe9NjFwmjMNAu8KC0/k/9jkd+ZW7T/E/tz74bQr/VJ6H5GbSMh3TlMadsFweZNugVlo1Wpr5idGxuC2HFmKbhlSERQCejL6fiC8wz+82K8sg" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir-to-remove_d50610dba56ab3ebc3b6ceaab0a6527fba5bb7dd&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir-to-remove_d50610dba56ab3ebc3b6ceaab0a6527fba5bb7dd&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/async/test_rename.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwVjUsKwkAQBe8ykJ1m0OwCIoKfC2STlTSZFyY4P6Y7ooh3t129qtq8j/EVs+mNFyncWzuFvLotlaV9U3J4tQlinzvrFn7YCs5rncDHQuIP/9Z0p2Z/HemsPIBFRXTuFYkizMZEiM9OH26XQVUQSyCBlpkC4/sDtpYtdg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2%2F&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjUEKwjAQRe8S6E4bqruCiKD1At24kqH5JcGkCZmpKOLdHVf/vbf5H+MrZtMbL1K4t3aKeXVbKqF90+LwaheIfXbWBX7YCs5rncDHQuIP/9bsT81uuNFZeQSLiujcKxZKUHOhdmZjEsRnp0fXy6gqSCWSQMtMkfH9AfReL4M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/move?from=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjUEKwjAQRe8S6E4brLuCiKD1At24kqH5JcGkCZmpKOLdHVf/vbf5H+MrZtMbL1K4t3aKeXVbKqF90+LwaheIfe6sC/ywFZzXOoGPhcQf/q3Zn5puuNFZeQSLiujcKxZKUHOhdmZjEsRnp0fXy6gqSCWSQMtMkfH9AfSCL4Q=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK0U+kNa9sQLeIFpZxqIQBs6Go3x7nb5vs37iuWkJCaxMJc6SRm3/MQrlLX7wIH07g5i+RokrvUhc6ETeM1HldhD9BhdSNiTGq0ZE4TkndIAUUGEBM7YocdgDBrvnR6s0075QForsuIiduIlY3vf5ntLpr1swNQkwVbp9wfWITH9" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/d0ac9dc8bfd0e26546fabf9823aac2acafa84510db44d499831583829be332e5?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_restore_trash.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmyxbTJmSnooj/7nqaeY+B+TgpPLrGCZC18X6IaQ1bylP9piXwq14Y/rnzYdKHL6xpLQPrKRPk+HfV4Vzt2ztdrHesMIBFb1Okwj0KqbiNmxmSgh3drp0heM6RwGZGisrfHxzpMIM=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmS4JtE3anooj/7nqaeY+B+bgoPLrGRaBo4/0w5TVsqaT6TUvgV70w/HPnQ9KHF9a8ysB6KoR4/LvqcK727Z0u1jtWGMCitymycA8hjSZDErdxMyPmYHe3a2cInstEYDMjTcrfH0IsMl8=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir&permanently=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "667" }, "content": "eJy1kstOAzEMRf8lW1rVzuQxZM0ndIMQGqWJAxHzqDJpBarm33HLSywQG8jCUeTjm6srn0R92ZNwIuYiVqKjYUcxUhTuJHKlYRbu7iRGP3wx9JwTt5eVCIV8PbNCglRrsGvELVqn0Em8AnAAzEfq6SdKflJTyQ957Pa+Pl5+mp/c5tbf8L2luW4ql65wmQp1tfj5cfPmZphiTvlXeR6dDiVQl8+k0tpYjVY68JYPGYnGQtMgWU9SGalCUgZRq0gesPXSAxiKqK3yCKh000opE7H0u+WLKXd21bVWshoEHVTCRBoshsYno4IPlKIyprXG28DDYRoGGivbms+R70s+cqTdh90/93rY9Tn8kzxvxLdlKnTMc55G4VieM7g2rWykRQPLPaNT9T23VqLPQ67CaQBeg5Rm4gcsyyvFkbyC" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources/restore?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&overwrite=false&force_async=false&name=%2FYaDiskTest%2Ftest_restore_trash%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmS4JtE3anooj/7nqaeY+B+bgoPLrGRaBo4/0w5TVsqaT6TUvgV70w/HPnQ9KHF9a8ysB6KoR4/LvqcK727Z0u1jtWGMCitymycA8hjSZDErdxMyPmYHe3a2cInstEYDMjTcrfH0IsMl8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAQQNG7sNbSAezQ7o0X8AKUGUJjW0hBozHeXZbvb/5XxIODmESsNZdJSr+mJ51dXrqP24nf3c5VvkDSUh4yZT5cXdJepFI+kEUwaBXAMATCcfYMaC+NI7FRpE0wI3vdQ7AEFrBHPbNmVNaJk9i4xkTtfbveGytveXWVWwluLfz7A19PMMA=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/22cfd87147821166fd79bce17851169de42d34f49ec301f8d1817073be3e728a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/22cfd87147821166fd79bce17851169de42d34f49ec301f8d1817073be3e728a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_save_to_disk.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "136" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxFJZmSoppE7Lbooj/7vY084aB9zUTJCRvGvO4d2ZnQsGgEEQyN9b2MS1+T3msPzR7vOsZYteD9SO/bAGnpfTgSyYJ522rTtfq2D7ppr0Di4JoOKYVTpLbPmoRTDmSQL0DRcbvD3lAL/k=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFESgiAQANC78O+ygKByji6AgZk6pLCm1HT3ppm+38x7szGFgVk2Eq3Zcr6vy8P5kFQzgb/nGYqLPpwQA9m6Vn+vyKVbIC5RajTCXITWCiWotoOdPPQeY9zMoQf1Ojrsy7SU5/XEXM2/WGKjjRYt+3wBr0wo0w==" } }, { "method": "PUT", "url": "https://uploader37j.disk.yandex.net/upload-target/20250616T155302.389.utd.bd0nnq6w5f3zw90byjlyvcx0s-k37j.20756518", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzElVSM7PK0nNKykGAEGtBw8=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwdjsEKwjAQRP8l0Js2WG8FEUHbH+jFU1iTDQmmTchuSkX8d6OnmTcMzLzFjOyiEb0Yb5PYCZfRVnDMiXopdYjF7CH59gWLwa1dkOV6kMbTU2akWLJGOidgd/plzfHSdMMdrtVPSFyBqyiCFRVH9e90QyqP4LWyPmDLG9ddxjkFYKxPLATCzxcZ1jai" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1317" }, "content": "eJy1VNtu2zgQ/RcD1cs2Fi/iRQaEwk3Sxk6LNq6dNnkxhiJZs7YukWivtUX/vaR3swHah760gCCJw+FczpzDr6MW/GY0GWnXbyfpHVyE79L0PvXhte7hYNa+WcfdtN2rnSvX1u3M2B/96PnID60JZ6MlrGqo4upnt7Iz4I0OewQRdob4GeZLTCaMThD9C6EJQsGrarSz7pduvfsnZMEyHHBVKO7fErw5+rTdgatjJM2CSeZYlZoKhDjOwTLMsLI5U5Jya3OFY6wNEMaDb5lZyLkEkTEmuQUARBFiWThlFS7BamZyMIRZ4ApTASXPhBCYWV1KfIr1X9tbM4R49auttdXifkXb6WU1r/rSCHK8w/10GHL8/nh9eZN6fp4ed+rt51m5Zeevb7OVWNwOL2eof0Me0jlXbbUY3s2beklvm0/1BXwuiqc8+24X8my8b/tJmg6g3TiMSKdvb6+/3Eyby1k1vTyfRjCMdvAIk27KfWXqOJTO9M2+K83aRcRD31wwLMhESk2JAQ4ZkUwRymSpGSISFCdgFWEZVkCIUbkEEiBGQhAOBqEMlRIhcwp9cL1r6jAmwRASkkoqcpxTErjQVLGAkLUfTb4+dvNYzO+upO3cIVDvD8X/9nxkjs6GPsIf1N4dXLfv170Hv+8jq3YGIh9P+ngalm7+rncNaNONo67GA9TaHMfdPj3JTBNQJuQOqAFCSltNQVOjNGCiAwuVDC0ISjKCMZc5Z0hwxiXV3GBtSppyyVCmjE3r/mq2NZ+ua1i8bpdDjVZu8aCG1XrLVsN7sXn3hXRX/CPc0dl0mC/4xTDF9/TGftgt5+YoluXx5fkZ2WbTh6Gefbx/qIcrc33zjF6E58Xe6eJ/LJPYYtR/8YP6k9BS2/TOBzoU4D2Umzj+ZAP9pkh2rnK+QEnZ1D6SIrK0iFJ+Rl6dxJwEqEy3/iFXvAIKLJNNMKs8ZzgAhogwyFqriaY5YnmGgVhjUPLE/+KR/Ynf1ofiQBPjg6h+eU98+w4iwZWH" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/save-to-disk?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FMVKjQAoEImAECA&name=saved_public_file.txt&save_path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "160" }, "content": "eJwdjsEKwjAQRP8l0Js2WG8FEUHrD/TiKazJhgTTJmQ3pSL+u6mnmTcMzHzEhOyiEb2430axEy6jreCYE/VS6hCL2UPy7Rtmg2s7I8vlII2nl8xIsWSNdE7A7rRlzfHSdMMDrtWPSFyBqyiCBRVH9e90w4ZGpfIMXivrA7a8cl1nnFIAxvrHQiD8/gBxTDkU" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fsaved_public_file.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1183" }, "content": "eJy1U9tu3DYQ/RcB0UtiixeRFAUIhVujtZOH1M4aafIiDMlhl91daS1xN6sG+feQmzgFihZ5aQFB4oyGZ27nfCz2ENdFW7gwb9rqHVyn7wrnWMX06mc4Yh/HPv+tsuH6/cFsg+192OJlPMXiRRGXPSaE7EnWALts/VuwnRAiuhTBCBMXRF5QuaKsFbwl9XNCWkJS1G50wYfvhs3hz5SLNulC2KVCvxQS8RSr/RbCkJGcSK5GU2MdV4RIqsELKqjxWpiGS++1oRlrDUzIFGtrD1o2oGohGukBgHBCRJ1ueUMteCdQAzLhQRrKFVhZK6Wo8M429Iy1QxfgqRw32sMOh9z8hPN4mCz2IXeW8KUSVLGWUEYbbS1rLOEgnTFUKMmQGeWN46I2KQnRTnDNGQWJHF3DXO1l7Ujq4Ax9DHMYhzQOJQhRDW/qmjDFWZr5uMsFpKxz0X4svi7lqZj/upL9FI5pxf8T/qcXBZ6CT32kEwwxHMN0mPs5QjzMeXtbhLz3MxvbYh3jfm6ryo0fhu0IDqfLzOXLBQaHp8vpUJ2p7RMzuGMNSEWMkgYNYWAVEKpQU2iI19JzqqRTWvM0VyE9VQ1Sa5jzyCrZCFIbT6phvrnd4G+vBrj/Zb9aBvIQ7h/N8tBvxMPyq1q//oNNN/ItvOO3V8vLe3m9XNH3/M6/2a5e4kmt7OnHny7Ypr56XIbbt+8fh+UGX90949fp+eEQXPdtlmVuMaut+0etlamx/TiHmEjRQYxg15kE5RrmdVduwy7EjpR2HGKmRuZql4XzjP18lk6ZBoZT/7eMWXAdbcp1chutBQWDiWRIvPeOOa6J0DUF5hFJ+ZcKuicNlHEzHLsjLzHC7913VfnpM95abC0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzkEOgjAQQNG7dK20tIVB9sYLeIFpOxOIQBs6Go3x7rL8q/e/aiWZclKjul3v6qSmnfiISaTUUeu45Gc6Y5mbD26J3s1Gol+tTnN96FxoR5nzVjVANN5Ajx1BsD6R6bwL7tIaiGxd54cAFgyyDSmCd0ObjOPes/U92yEcstBaFhQ6XhiXSr8/NyIwpw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/77c04076a5e7b24de0543b39107cf23548b7270af2bdc74381d03f64f246f28b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/77c04076a5e7b24de0543b39107cf23548b7270af2bdc74381d03f64f246f28b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_streaming_requests.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/last-uploaded?limit=10&fields=items.type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "171" }, "content": "eJyrVsosSc0tVrKKrlYqqSxIVbJSSsvMSVWq1Rlk/NhaACXZOPU=" } } ] ================================================ FILE: tests/recorded/async/test_upload_and_download.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjc0KwjAQhN8l0Js2qLeCiKD1BXrxFJbulhTTJGQ3/iC+u9vTzPcdZr7GF5pMZ7xI5s7aMaSKW8hz+4GI9G4jiX3uLM78sIU41TISnzKIP66uOZybfX+Hi/aBWBREw9UcEqDTDYfpFVcwG7OQ+IR6d7sOikJLDiCkZoLA9PsDUgsyzA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download%2Fzeroes.txt&overwrite=true&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsOwiAQANC7sO9AB+R3Di+ADramhiIdYo3x7mri+iXvJeaWLyKKmbluUcpeb2ui3LRbga7bAs9UKO9QMkdj9N8HTm3KLFGhUU7ZI+LoDw6809CZwHmyLbQ0ns5f7QVDpUe6T/uw/GITAnpjrXh/AJa0KB8=" } }, { "method": "PUT", "url": "https://uploader37o.disk.yandex.net/upload-target/20240706T221857.873.utd.78d6r9ra1bc706un29pdwaqgx-k37o.49928466", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "450" }, "content": "eJxdUNtO20AU/JdI+K3xXryXIFmoBZpSIBJpQ+kT2t1zHC+xd117czGo/47bvlWalzkjzcyZt1ndYzU7n9UpdcN5nkM8hiYawH4OftjNRxMAT/N+n/+h+QIL5oAYC4ZUFpVlrlC8QqoIqRypOEUEJzlIRSwS5owVihmula0E1yKXUi+AIMvD8OVmh0+3wayX3fcxkI1f//rW/Nge7+D6ugG/Wn8ij6cbitvNoXtcbnC3PIwf/NPtw93HKFYv98c6/mztlR1fVvHr5YOqLu+PZ/xqwsXeQ1kIIZWgimWVbzCYFstX7CMO83RK2fRNFweffAylScm4usWQstoMdZk1vvWpJJmLIU3X5zR2WCY8pTP2uWuMD9m0EvbP/8UM/hVLSgotlMzqSVPccUOp0Y5XUvJCcqq0YsBQOGqZzloEb/7ZQ3T7vxXSLhzKA8swmW0JGgrHgDqNhSUFLKR1hk02AoiiTsx+vwM+YZNF" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/9e42cd0abda0fbe7b2c473fe1700fc0f31eedc63d670be02cab572a387bf5385/6689d0e2/nsHIkeXKnaRGpTyn0UiRqSlWgwLdEEldiNRB0VxI1egUvpVGUekGvy-iXKQLAo5NjMwhoYmbDbyjNoJCQ7fCMw==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1048576&hid=73c3a11a8c3f66346317872d2e5c1b28&media_type=document&tknv=v2&etag=d8d4c2d1c8e4b04d96bca23175d071c5", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1048576" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUsOgjAQQO/StdJQ+2HYGy/gBYbONBCBNnQ0GuPd7erlvc37qvngpEY1i5Q6ah3X/KQzlqX74E787nYW/eo1LfWhc+EDZcl71Tj1ITIbGiymRB4ALUUfDHgmNzQa8gzgfAoGwQL5i52AoHfRsQnqpDaWOVN73673psJbWVG4lYRr5d8ft9wxqQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ab17cee2d84affd699a4dc67296ed587292d6e9956f72a949d634b9d915c5e27?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ab17cee2d84affd699a4dc67296ed587292d6e9956f72a949d634b9d915c5e27?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_upload_and_download_async.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "149" }, "content": "eJwljc0KwjAQhN8l0Js2qLeCiODPC/TiKSzZLSmmSehu1CK+uyueZr7vMPM2YabBdCaIFO6s9TFXXEMZ2wUS0qtNJPaxsTjy3c7Euc6e+FBAwv7nmt2x2V5ucNLeE4uCaLhaYgZ0uuEwP9MfeEnerMxEEjLq6fXcKwpNJYKQmgEi0+cLnjw1SQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async%2Fzeroes.txt&overwrite=true&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEEOwiAQAMC/cO9CWdZS3uEHiNBiwNrA1ojGvxsTz5PMW6QaF+FEYt6bk/LYy92HWFGtEK4tQ/dbiE/YIjtj8O8D+7pGllppoyZ1Oms9zkoDGoKDA9hXsaO1E10shRv17HtZWnrgkH8xzkRI4vMFOuInaQ==" } }, { "method": "PUT", "url": "https://uploader30g.disk.yandex.net/upload-target/20240706T221902.345.utd.8zl818875c85dm5ykaylfshv3-k30g.395535", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async%2Fzeroes_from_generator.txt&overwrite=true&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEEOwiAQAMC/cO8Cu4gt7/ADVKgoTVvpkhSNfzcmnieZt0glTsKJxLztTsq6zasPsehhhXDfMzS/hHjAEtkZQ3/v2JdbZIkKjTore0HUgyKweILKAWjk/KpJP44Zr0y1+ec0civU5V9sbK+17Ul8vr5RKUM=" } }, { "method": "PUT", "url": "https://uploader19o.disk.yandex.net/upload-target/20240706T221903.625.utd.3btkzuh1jxl2ct3uyaqfbtyr3-k19o.46811683", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "450" }, "content": "eJxdUMtu2zAQ/BcD5tEiKb5sgCjaqk6DugnsOEVzMvhYRYQlShXp1HbRf6+a3ALsYXcGmNmZP7NmhHq2mjU5D2lVFL7/HdveeBgXPqTj4mKih/NiPBX/z4ICAHMlw1Q4ZWvhl04YbCmUzsppAQ5cCq+ks45LIgnjVmHDagEgLZWFEGrpMagipq+3R/j5LZrdzbC/RPwYdr/sp7v1vtp+rHL18HS3IZdILX++ivOPzYn7KJrB5M3nwGLFdil9j114ZDfr/VaNT1/u5UO7nZfVNB9OwWvGuZCcSIrq0EI0HegrjD2kRT5nNKUZ+hRy6KM2ORvXdBAzakxqNGpDF7LGyPUxT+ghXwbQGc55TtdDa0JEU0swHt7ZpHAFTTBTUwWomThZutIQYpQrayFKJkoilaSeAnfEUoU68MG8yfvenV5fyMf4ol8ogmyetVeeOeqJU8AsZn4prDN0kuEeS+L47O8/g8ORzw==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/2eee4c34026c8bf6d9c6a0b2e3cb7a0be5e576d87cbc5717145b80a4f6ee7b27/6689d0e8/nsHIkeXKnaRGpTyn0UiRqbBNFTDQADtDSYNL1yn2b5gz6xVLu5dn6hpatLCi4nD4RssMnmiU4GFTQ8rYEO7SlQ==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1048576&hid=73c3a11a8c3f66346317872d2e5c1b28&media_type=document&tknv=v2&etag=d8d4c2d1c8e4b04d96bca23175d071c5", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1048576" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async%2Fzeroes_from_generator.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "465" }, "content": "eJxdUNtum0AQ/RdL4dHAXiESqtpSp1XdRHacqnmyhpnBrAwLhXVqu+q/lzZvkeZlzhmdy/xeNCPXi9tFE8Iw3cYx9b982wPxuCQ3HZcX8MTn5XiK/61xJVFzBTkpDVZYLRNWuRSyThgUVRpqJAaELEcEJpnkBpmw1gJra1DHxmQ5zcexnz5/OfKPrx62d8Pu4pMnt/1Zfbhf7crN+zKUj8/36/TiRaUPV3P+vj5p8qYZIKw/OuVLtZ2mb75zT+putdtk4/OnB/vYbm5kOc+7k6NCaW2sTq2Iateyh46LK489T/t67Lv9gT2PEPpxGc4hmssN/eSC630BIQA2HfsQNTA1RdS6zoUiibD3YUb34TJwEfgcbsRqaMH5aH4aj/s3rpO7cpEmKtPWRM3MWYkS0hQylLUxUhmZ2swKEqwxrUQWdUwOXuWpx9P/COHoX4oXEXGAQ0EZKRSUYsaqShTlpkIQs4ymxKaoF3/+AhmZmUw=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/b3c5eba9d45a727530e49323f0ea4db5afcdeaca89ccaed3096cedcf52cf76c5/6689d0ea/nsHIkeXKnaRGpTyn0UiRqbBNFTDQADtDSYNL1yn2b5gz6xVLu5dn6hpatLCi4nD4RssMnmiU4GFTQ8rYEO7SlQ==?uid=455675172&filename=zeroes_from_generator.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1048576&hid=73c3a11a8c3f66346317872d2e5c1b28&media_type=document&tknv=v2&etag=d8d4c2d1c8e4b04d96bca23175d071c5", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1048576" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download_async&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgyAQQNG7sG4FVATcm16gFxhhJpqqEJk2bZrevSz/2/yvWE4kMYqFOZdRyrClZ7xCXpsPHBHfzYEsX1rGtTxkyngCr+kokrybrdIG7exs56gdtEeyWjmNcdaxDX5QwUCoSAikemy1gmB9b8zQRXERO/KSYn3fpntNxj1vwFiFYCv4+wObhzGs" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f98b7015e7b8738f2619ef71081edb1d2c960c5acef7feaf04e210ac7945563d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f98b7015e7b8738f2619ef71081edb1d2c960c5acef7feaf04e210ac7945563d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_upload_download_non_seekable.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "152" }, "content": "eJwdjcsKwjAQRf8l0J02qLuCiKD1B7pxFcbmlpSmSehMfCD+u9HVPeds7lu5BYNqlBNJ3Gjd+5jtmtJYvyhYPOsA0feNtiNPegHHvPTgQyJx+1+rdsdq217pVLgDSxEpY3Lykayx8RH+EGIwDEx081ArNUNctOX3cu6KCubkSVDKQJ7x+QJKJjZ/" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable%2Fzeroes.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEEOwiAQAMC/cO9CKZTSd/iBrbsWrakNLAZj/LsePE8yb5UyX9SskshRZq3rcX8gcQ43oGvZ4IU7cYOdZXZu+HMnmFcWbY11JpjxZG0fhwhj9FCFYCqtnhcq5lnRI2FbbU2J+6Xbfq8zPk4xBPX5AnTeKKg=" } }, { "method": "PUT", "url": "https://uploader7j.disk.yandex.net/upload-target/20240706T221939.695.utd.8sxucbds0vua5adaxg2uhhe1b-k7j.40598977", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "447" }, "content": "eJxdUNtu1DAU/JeVmjc2jh3fKkUIuuq2IGi3XLbNS3ViHxOziRMSZ7tZxL8T4A1pXmZGmtHMz1U9oFtdruoY+/EyTW33EpoOLA5r68fDeoZg8bQepvQPTQnTwhhUuZCQKS4doNOVs5myyA0w7XImodIuo8CUlTnRikgOijMppcJUCKVtRkwaxpvbAz6+D/Cw7T/PgXzxDz9wN7H9FZin23dRwttj+fjhZnq1+Xj+tOXb+fvT4Xr/dX9HxG5btvds91Jf3Tdzfuc257I0/a58c8E2C15P3hY550LyTNLE+QYDtFiccehwXMdTTJY1fTf66LtQQIxg6hZDTGoY6yJpfOtjQRLThbioz3HusYh4ihf0um/Ah2R5CYfn/2pGf8YiI4Qk9WI4TRk4xR2RlGqRI8spdUJrKTIuNElatB7+ZdvOTH/74yEciyNNMMK3QqmqEhq45UgoGgmOO6Gsog6rzGV29es36IWQwg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/0396cce8467a1857faef9bfd18de5ca39f437ab9f12a38d74098075a8537778e/6689d10c/nsHIkeXKnaRGpTyn0UiRqeQu3WCacYIJt7aBvZXMHu-DNzSG5GyjYkFWVWO06QGZmP3QwhCPly4OfDzZZcpQZA==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1000&hid=f923af85f0722964e3422f6997615690&media_type=document&tknv=v2&etag=88bb69a5d5e02ec7af5f68d82feb1f1d", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1000" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgjAURuG9dKz0hZQyN27ADVx6/wYi0IZWozHuXYbnm5yvmHZEMYip1lwGKcOSnnymPDcf2hjvZkOVLy15Lg+ZMnaqc9qKbIE+BAoXj2gVtAPgtVFsR69Go6JybNsevXVek7OIBr3mbvQt286QOIkVdUp8vG/X+5EVa16o4pBIS8HvD73NMdU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4ee8ccac59ef30e17eee9120d3b90b20f07d348e83791a73ef2e81d6b94d362a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4ee8ccac59ef30e17eee9120d3b90b20f07d348e83791a73ef2e81d6b94d362a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_upload_url.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "134" }, "content": "eJwVjUEKwkAMRe8S6E4btLuCiKD1At10VUInZYrTzjDJiCLe3bj6773N/4DPPEMLXjVJiziFWNye0lK/aXP8qjdWfB7QLfLAzBJLnljOidSf/q1qLtWxG+hq3LOoidqMJYVIbiw5wA5WVh+dvdxvvanymgIpW5kpCH9/gL8vNQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fexample_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsKwyAQANC7uI+OZvzUc/QCFicxWDSoCSmldy+Frh+8N0uNFuZZGmPvXohjf9YQqUlZedx65q9QIl280PCI89+nEdpKQyhQCBbsXYFGuHEDjh8jcnpUvaA2eW2bOZ0rTeqrnzJN+RejnR1IRPb5ApohKAs=" } }, { "method": "PUT", "url": "https://uploader11o.disk.yandex.net/upload-target/20240707T205409.608.utd.ebo5f456kgri6v88nr15xsv1h-k11o.47380144", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzElVSM7PK0nNKykGAEGtBw8=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fexample_file.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "451" }, "content": "eJxdkNFv0zAYxP+XSvMbje3ETjzJQhqwMaYxdaUa46Wy/X1eTBMnxO7agvjfydjbpHu538Od7v4s2gn94nzR5jym86KA4RC7wQBOSwhptzyZCHhcTvvixRZg0VnpKFYgJHeeAVDgJThgjvpGeABrmXBSonLWmaoqLdpKlkaompVYSNlYig0vYvp8vcPvN9HcX43fTpFuwv2vxwdxu9m07+pL39+s7+AQnuTg3Zdm9enqIvkdpdX6q7+9Tunn6i6ykbLxQz2x6eHicVx3Pw6rs/LjrPf7ALoSQtaC1Zz40GE0PWo8mn7scPsClvmYybxpHFLIYYja5Gxc22PMpDWp1aQLfciaEjfEPNNtPo2oMx7zGb8cOxMimb/CafumLIXfqFlD2hlbpQQzFimvkXrvgUOpqFAVM9wjUtIjBPOaDIPb/2/Pu/isnznBbJ50o5h1UNaUSqaMF0ww65WwTSm9V5Yt/v4DRvqUtw==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?url=https%3A%2F%2Fdownloader.disk.yandex.ru%2Fdisk%2Fdbecb6c0e4d562cf1dd0d23dcd1c0f85fddbb15c66e9cbca443beb463a59713e%2F668b0e82%2FnsHIkeXKnaRGpTyn0UiRqYW5MUUh-7FfmKSOdwig6ofcJ8QEGBsfk004SNfMIssjQOn1p01pC7r1rWBYpSlZwQ%253D%253D%3Fuid%3D455675172%26filename%3Dexample_file.txt%26disposition%3Dattachment%26hash%3D%26limit%3D0%26content_type%3Dtext%252Fplain%26owner_uid%3D455675172%26fsize%3D18%26hid%3Db9951abe027e0fffd2d3905941a2fee0%26media_type%3Ddocument%26tknv%3Dv2%26etag%3D891bcd3700619af5151bf95b836ff9b1&path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fuploaded_from_url.txt&disable_redirects=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOwiAQAP/CWQtCi0vvxg/4gS27pI21kLIajfHvcpzJJPNV885JjWoWKXXUOq75SUcsS/fBjfjdbSz6ddK01LvOhXeUJW9Vx0h+SBYApuiRIaDtjfOBePDJBorggvVopoS98yaQC2gYgGNy55aqg3qwzJna+3q5NRR+lBWFm0m4Vv79AaPAMYc=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ccd65f2888bc6ae89a240369de56f29dc83926a0bfa43609d39a0e88ecf37240?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/ccd65f2888bc6ae89a240369de56f29dc83926a0bfa43609d39a0e88ecf37240?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fuploaded_from_url.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1181" }, "content": "eJy1VFlv1DAQ/i+RmhdKYzt2bK8UIZUbVKpegvKymthj1uzmIHG2LVX/O/aWQ0IgeADJSmRnMvMdM77NoAt+68d5Wk4Bwjxli8xsELpsP5v8Z8wWVO1npm9b7MLS2/j9NhtGv4WAyxGnfh5NDMq4EJUUVLIF8oZZWeoKrNCSY6U4I5Q3QinhFFVosXHIDFqmuOKI2pTWaRQVWoMoYuFhbjbe/Kf0d/tZB21KOg+bHizapRv7djmPm4NwHWJ5vPYu0oyBZsTI08ZYRhh/SGRc51QuBF9Q+oCQBSEx/hvOKM+/VqLtrXf+jwha3+Iy3AyJVcDrUAwb8MlC5zfpbBXCMC2KwvZX3Y7zeGD9tD64gc7i9cE4F2lbkLJEBxw1AlDKBOOWahWPIOKVZcVKTQVlzDllnEFnbakZVFZJzpoYXlSVaggqXnTTi5drfPe6g9Pnw/lNRy786afLt+Lo4mL1UD5z7euzY3vlP1S9M6/UydPnh5NbE8LP3rijl9P08eS4owOhw2M50vHt4eVwtnl/dbJXPonr0ext/V3lPFFMhta/tDOPxIZ+8sH3XQ0hgFmlTs5XMK3qfONbH2qSm74Lqb+ThHUScI8920mYR8FwXP5UMQ1GTVW+iseN1oJCg4RJJM45y6IoRGhOgTlEkrdoPdxntr2Zd9XDutvWW5ZjgA+10rQxtpSEVFSDE1HixmnRqLJyTjc0DQSEVbQxmbQoLuFJfJ/jFIoQH8t73olw8buO/oEhZfmKIk34Cpio0shzB7pSICNLVUXDgZSECB7RuIYacFagBmTCQdXQUoKpuJSSCmeNojuMX7PvOi5WtCJu/oLaiFs/RXPiRSMZKSVXgioVfxR3XwB9dW68" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQRuG7dK2U0pYie+MFvMDA/A1EoA0djcZ4d1m+b/O+atoRVa8mkVx6rcclPflMea4+tDHe1QbRL6N5Lg+dMnaSOW1F1+wp8BDZ29g6b+DGyC7i4qm2gXxnmMzgQISOEMY2uNChaW19sQ2bQZ3UCpkSH+/b9X6kYM0LCQ6JtBT8/tMuMiw=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0d5a7dbfd53f6451e4cfd4fe95a037a581da1b4eaae8ae7c67478e2630932d1b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0d5a7dbfd53f6451e4cfd4fe95a037a581da1b4eaae8ae7c67478e2630932d1b?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/async/test_wait_for_operation.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_wait_for_operation", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "142" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxFYZmQoJpJmSmPhD/3XF1zzmb+zGxYTCDiSKVB2unTItfQ039G4rHV19Q7GNjfeK7bci0tAn5UEHi/t+63bHbXm5wUh6RRUV03BOSuEDNUcUGkqiYlZlRInl9u55HVcG5ZhDUEiAzfn8iTjKJ" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "115" }, "content": "eJwVzEEKwkAMQNG7BLrTBnVXEHGhvYAXCJOUGZx2hiQVi3h3x+V/i/+BqDLBANG92oAYcll5TzX1Gy0s734Rx9cBOdkTVaysGsQulTye/9adrt3xzkkleNENdjCLx8JtOd4eLV3mmsmlyUTZ5PsDK2QoMg==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2Fdirectory&permanently=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgjAUQNG9dKz0S+ljTtyAG+jnNRCBNvRpNMa9y/Ceyf2y+cDMRjYT1TZyHtfyTFdfl+7j94TvbkfiL8nT0h68VDw8LWVv3HgMUcesrBNGBZM8BBwAc4/QZwtRKh1FUgLCANoCCis0CrDOSSNdYhe2Ic0lne/bdD+TcKurJzwl+7Xh7w+bcTEi" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_wait_for_operation&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_auth.json ================================================ [ { "method": "POST", "url": "https://oauth.yandex.ru/token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1jUEOwjAMBH/TSy+JHSfpIW+pnNiFSKhFrUGC10OFOK5mRnvZebXZXnct/LDrtvc3W9/WuW2iQ7t1/eIuxVGeMGBNkSm4jCwJJo+oCD5UwuH0CyE48PTvDm27WvE5iiySkaAGWrTGmgKD5yVFp9QG0Wdvet6YHjb+5ugBP1eBMxQ=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "274" }, "content": "eJxFjk1TgzAARP9KJ2eZCRSs5ZZGC6WVitgWvWT4CJBGISWBAo7/3eLFve077L5vEKcplZKomtMK2DMwQIIKNCXZBpAjFO66YKpPXv26MxBatT538ErL3PfLCEtcEbYUzxvm9yIAdzNAe8EaKgmb5ua6Nb+HEN54Q/MbLv+fdNv5rLjBhi6JMlmYpLIdmXsd5Ro2j4cl3fbHjYO56dKHJPReRhnFbXqmXaEryU5sxBBG45p87a8Zf9PNQ6G4sgyxkK1YWJf87J/WV/vRwbrQ9q02fLhlrULsZQZGk+ifCFGDoJNNQuOGNuDnF6qFWdU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "POST", "url": "https://oauth.yandex.ru/token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJxVjk9vgjAchj/NvJHQfxQOHEwXcZjMJU4lu5CW/opYRUYLDj793MHDju+TJ0/eupetL/3UQdqD6cGdSn+z0C7+rRS9kGV2aS1uplEV2tW0bP+QM/kINhD0sE9g83N4y4Sla4jVLv+YXSGH6gxjjbxrjs0swrCYV+V1e9f2E9F97a1nuONu6Dj7Nuf34+r+iL5mAnXBdgimr/Xp5nci11gsF9WlgcfVRqchixNCieKRZDSMidQcJ4gQIBhRxchTdVD14FMUR1obHROGFWUGVKQ4lRhJw6MQWPULADJV4Q==", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "274" }, "content": "eJxFjkFzgjAYRP+Kk3OZCVKcwi1EEVqKheIIvWTAfhKaKhhQAk7/e6WX7m3fYffdUL7fQ9uyrhZwQvYMDZiRkkwpXiIsCHkPrtFUV891HMwJcS6hWFNH+/Sy84g5PbHKal79KlRNhB5mCFRTSWhZNc0ZumksMMZ3LuFwx/z/SbfftlG8wdhwE6f16Me3LYQasSGJpxc6pRnVuXuIH1dggib8cFFkV2WmFuF5UMAxTtP18MWCuVJXd3f2gS1T3rOOO7gem4wx+VT2dlceE54P2nYXqLJfXiwn2bT9JPonwrqhgcmmgFyCRD+/2LhZRg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1yrsOgjAUgOG3cTNpe3pjYCjEeEMSdHIivRy0wQAKGvXpDYP/9iW/9R7HsZ76Frv0Q2pzMXNuX5HWmFPxqmaudv2xYMZkz7Jd59kybM73L7nmXR2T4bCN5XuoFv4WsZvqGFIidAIcnJJWcKLBBsUSCoDAKHcC/uuI/oFTSrUMoQkaBHNcNOikU9wyahslCQr/A/7tMyY=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "16" }, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } }, { "method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive" }, "content": "eJw1yrsOgjAUgOG3cTNpe3pjYCjEeEMSdHIivRy0wQAKGvXpDYP/9iW/9R7HsZ76Frv0Q2pzMXNuX5HWmFPxqmaudv2xYMZkz7Jd59kybM73L7nmXR2T4bCN5XuoFv4WsZvqGFIidAIcnJJWcKLBBsUSCoDAKHcC/uuI/oFTSrUMoQkaBHNcNOikU9wyahslCQr/A/7tMyY=", "response": { "status_code": 200, "headers": { "content-type": "application/json", "content-length": "16" }, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoRL2AABuNkGCB-dHYqz0hCn_i9pMIiNxpQ" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } } ] ================================================ FILE: tests/recorded/sync/test_check_token.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_check_token", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVYbklpSkTchMRRH/3XF1zzmb+zGhYjSdCSKFO2tdyqvfUpnaNy0er3aB2OfO+omjreC8Vgc+FZJw/LfmcG72twddlHuwqIjO4AJcHCRHLGZjZkjIXm/u115VMJdEAi0jJcb3B61VL3w=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth asdasdasd" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 401, "headers": { "content-type": "application/json", "content-length": "99" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_check_token&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_copy.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwVjEEKwkAMRe8y0J02qLuCiKD1At24KmEmZYrTTpikYpHe3bj6773F/7pYaHCNi6osDYBPeQl75LFecQ70qWdSeB8gjPKCQpKX4kkujBrP/1adrtWxfeLNuCNRE7XpfebV7dxEGnOw/8e9M1WaOKGSlQGT0PYDWPwsuQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "148" }, "content": "eJwdjUEKwjAQRe8S6E4b1F1BRNB6gW5clSGZkmDaCZmpGMS7O7r6773Nf5tQcDKdCSKZO2tdotVvIce2wuLx1S4o9rmzPvLDFmRai0M+ZZBw/LXmcG72/R0uygOyqIjO6ChXZR8LOqFSR6F/MxszowTy+nm7DqqCc04gqGWCxPj5AlDENIc=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Ffile.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "127" }, "content": "eJwtzFEOwiAMANC78L9SkMHYObwA2jrmdCLr1MV4d2Pi90veW+XKJ9WrLFKWXuu1XG6JuIb2DDQuE2xpJn7BzNI7t/t7I6kOLNqidRgw7BHROwPeBliF4HDdzHB/xjHWLhA+yJSYjxxzM/3i1nfOe6s+X3reKAc=" } }, { "method": "PUT", "url": "https://uploader75j.disk.yandex.net/upload-target/20240707T000641.627.utd.bmy1gqw9i9r87d0vd1p9hce9h-k75j.5684662", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVShJrSgBAB9kBNI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Fnested%20directory%201", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "169" }, "content": "eJw9jsEKwjAQRP8l0FO1oXoLiAhWf6AXTyVktySYJiHZikH8d9eDnmbmzRzmJWzGWShhiVJRUhofV9jq5LqqA+CzC0jy0Utw5S4zlrhmg+WYNNnDlzX7U7O73PSZ/YiFOBDLZGKq7MFlNBRznSj+WOAeof1XbS82YkGyEfjIdRg5Ei7Ja54JNWtf8P0BBwc8Aw==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy%2Fnested%20directory%202", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "169" }, "content": "eJw9jsEKwjAQRP8l0FO1wXoLiAhWf6AXTyVktySYJiHZikH8d9eDnmbmzRzmJWzGWShhiVJRUhofV9jq5LqqA+CzC0jysZPgyl1mLHHNBssxabKHL2v2p6a/3PSZ/YiFOBDLZGKq7MFlNBRznSj+WOAeof1XbS82YkGyEfjIdRg5Ei7Ja54JNWtf8P0BBys8BA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_to_copy&path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_copy&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK2UltJp2Rsv4AUGZhqISBs6Go3x7rL8b/O/at45qUHNIqUOWk9rftIZy9J8cCN+NxuLfhlNS73rXHhHWfJWdQveAkfXud4SOKAISJ0ZEQIimhHQpClYTpN10QXvqTU2RejaPsZgvDqpB8uc6XhfL7cjhR9lReFDEq6Vf39dcjCT" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/07627e943452d747d97ad31ba78aaa1b7a1fc82efc2494866d012f9730599816?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/07627e943452d747d97ad31ba78aaa1b7a1fc82efc2494866d012f9730599816?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/07627e943452d747d97ad31ba78aaa1b7a1fc82efc2494866d012f9730599816?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/07627e943452d747d97ad31ba78aaa1b7a1fc82efc2494866d012f9730599816?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy%2Fdirectory_copy", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "7136" }, "content": "eJztmWtv00gUhv8KskS+bNvM3TORolVKCxTCpVBQ6GoVzeVM421iG3uctiD+O+O0hV01QLtN+JQoiWN7fDznOe8cWW8+J2OYGXAOXNL7nNRFFZJekmwlWYBZnfT++pzkegbxWA51APfAZRXYUFQXD3AcBeeZj9d92UpsBTq0QRKCCNtG6TYSRwT3kOgx9gdCPYTi+ArqoqksjLN2JONcpBynpOexFUohxgj1zBqkhcYgiTXOCQVgHWJEYOUww5RRIZRzyDGRpopaoNjE0LPCZT775QxKHSZxiMvq0173g96L26OYWTfEr7Etyovutwwvd5fmbYvZDPIQ06hbbGWVzWP24+v0Vp1b2ZhpZtcUPhYvXJSwgFItajTP6qzIk14MjyiKrxhBxs2XrR+rgaxQDTxVThGEOVGEWWG0xtYRxLWJU+GW+JR7jQnlzNN4nmtBwAkuKBYuJs9/pxrIHdWwgtx+poZ7h7+NGijGV2rQecjmWdXU4zro0MT0EzsFnccL6+xTjILJ3fAgDEYKab3UhsmUGBA2lSkIISik2kjvidZSceQ5s4xozrGGqHcvU4mB/QLPvcNHPFcrwGdT2AnnYYW6X0Hyt9T9LJvB+KrOAc5Dt5zq7Lpql22/qabx5CSEsu51u644y6eFdlDttItl50LnDs53qqZbtgqBs65zUV5Wo6ij2Hk0Ta3kkrRtJ84ZqLbYIIyEIpRS5L00ErxKU+G5kGC57Wa5774ye9sv3o+oPnrz9PHg2Ut1zF4P1T76p4SzZhjEfvPueH8wn57scnM+OS53Mc8H7z68enNIX78MXsx3j1V4mxUFutg9SIvjYflpsj14SPfi+88mc/1vsDtt/dpS9q8L2YmJlUWdhaj2fpZPsxw6E11P+p1pNstCH3VskYdWyC24fjbTJ/CQPI5TO+lEOlCN/3uDcJrP+/O2P1wpZm//8eDd8ChpF86G7mrodlrB9kej0duOrYqyj77jbg9uWK+B9TLUG9JrIL0E9Ibz6jnfxLyhvHrKL25QfrGhvHLKwxuUhxvKq+/MNzGPNpzX8ayxBPSG9HqeoJeh3rD+Lc8bj5Ivf28tHIVbYW53uyhlzHiPBNHIRoBpioWTLuJVUiHuPTjhFUKSUY20lYQpbqS3BBsmHBFdIaQCTVi3GQh2MSot4i9PX6un/DR+wkdOTD1+nuMndu/42ZOjV4+IO4Bd1YwGHy05Ozw7GFGGUlMcoml9wt4f6GHl3zw3hxDmzDVw+D9A6xC0nbRe0c9gt35FZL1wLJbC9gvKmHQm8bDVzFMrKQaOmfJCpcZgZxVB1HFAtDMDl+nLyK6wzeLu1+WCoE/6XmIgSoOS0mAllNLGKWK5UlHfCKC1U77FaH2zqyitFXW5HjZrZx1r587e7b8cu3qiCRfxagSKRaoRtohriSpFNE+9c8Z5lhJpBFIOudSDgIhdea08NspwwxlykrZ27FXZF6s3SsHxdufXmllqrPKFzR57wQJV0iNoKym8ryH+RndPuZ1dEXRs3vS7cXljyHf78oeGPAfnAXGBJDDmkRKWOSypjRioo8SkQBzxTImIjTomYy+RzBIqCEWGtunezhldk21/V4/+/un+1KO/b/hb/WODRCulr/9azC4=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_copy&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK2U2j/K3ngBL9DpTAMRaENHozHeXZbv27yvmHbKYhQTc22jlGkpTzzHOnefuCG9u41YvpTEuT1kqbRHnsvWZPIhK7RD1tr6FGy+9Lr3aCxorQcwyoF1YYAENgGgCug8glfkjEFrUJzESjwVPN636/1IprUukemQHJdGvz9+IjFQ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/c79f1d58f3357c95f20307d45b3338b416b5698bcb5cbbd19d67db71e644d54d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_device_code_auth.json ================================================ [{"method": "POST", "url": "https://oauth.yandex.ru/device/code", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJxLzslMzSuJz0yxNTC1sDQ2MU4yN0s0NTGwME5MMTeyNDQ2TjU2MjRJMjVWS0kty0xOBSktSS0u0YZwtQ2NjAG8WxSf", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "154"}, "content": "eJw9jtsKwjAQRH+l7LPYtGma2p8puWx0QdK4SYsi/rspgo9zmDPMGzzu5HBxq0eYG9BeoRp9LzuLgwmdlX7S00WEAe0otIRTA/hMxJgXitWQQlREsSDv5l6BqnHLyP/JR3BXR0kf6o5MgZwptMZl46MPt1JSntv2Zc68tb8/8PkCLyYweg=="}}, {"method": "POST", "url": "https://oauth.yandex.ru/token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1jkEKwzAMBH+TSy6WJVnOwW8JliWXQGlLYgr9fVPaHncZZvey19tYx+vhxfy5NV/b3Xxq183PfrMSOC9IqJIqU8hYTeICiI4RSBmnD1/E2DlZRFCn2kHRsuQldHJNQfAvPLztPgrkZNYtI0cl7iejQjVC7ZKCc5t+X8794ceYv3GGiG9UozdY", "response": {"status_code": 400, "headers": {"content-type": "application/json", "content-length": "103"}, "content": "eJw1jMsJgDAMQFcJOTuBe3guoQ02IElJ20MVd5cqnt/nQnY3xxWQesvmclIT01BYk+iOC3xGSFyjS5lw2ltlh0wV1BoMbvDnnGBYd6BSDonvDO8HpfImFQ=="}}, {"method": "POST", "url": "https://oauth.yandex.ru/token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1jkEKwzAMBH+TSy6WJVnOwW8JliWXQGlLYgr9fVPaHncZZvey19tYx+vhxfy5NV/b3Xxq183PfrMSOC9IqJIqU8hYTeICiI4RSBmnD1/E2DlZRFCn2kHRsuQldHJNQfAvPLztPgrkZNYtI0cl7iejQjVC7ZKCc5t+X8794ceYv3GGiG9UozdY", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "274"}, "content": "eJxFjslugzAARH8l8rmRQECacHMpoGKUsJQ04WKBMZjdtUmzVP33Qi+d08wcZt43yAihUuJpbOkAzBW4KxhWcFGOQqWFMPa/wiXa3pj1fDakUUWc3o7QRUnlprSMIpv6pJw+K/C0AvTGa0Elrpc5TTU0Q9O2cy9oOdfs/0k11bjo1LxOiD5YMX9JTXEOGfW8wHr0TkF6dMGqlidVEwkFrxmGfkfGyA3Yx+jZiDFFkceG70ZdN+D7YXNp15LxAdJePPdW5J+7PTQdyzm8npC8GmhfvG1Ot2C7K64L6B8Inu6cLjQ5zQQV4OcXsaFZJA=="}}, {"method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoampAAAcj1rSZxVAGKUgGZefRREeLcftqg"}, "content": "eJwDAAAAAAE=", "response": {"status_code": 404, "headers": {"content-type": "application/json", "content-length": "137"}, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr"}}, {"method": "POST", "url": "https://oauth.yandex.ru/revoke_token", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive"}, "content": "eJw1irsOgjAUQP/Gue3ti4GhAzERFiA6sJA+bgmioNAY/Xtl8EznJMd6j9vWp2XCOf+Q3gxmx5U1mYxpq1e9Z3Fa7P3xE3+la9u9L+ZYnodjh7FpCqx8TM/h4G8jzqkfQ06EzoCDU9IKTjTYoFhGARAY5U7Af93Qr5hyqmUIMWgQzHER0UmnuGXURiUJCv8FS/Ez0Q==", "response": {"status_code": 200, "headers": {"content-type": "application/json", "content-length": "16"}, "content": "eJyrViouSSwpLVayUlDKz1aqBQAv3wVZ"}}, {"method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": {"content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth y0_AgAAAAAbKQ0kAASLvQAAAAEJoampAAAcj1rSZxVAGKUgGZefRREeLcftqg"}, "content": "eJwDAAAAAAE=", "response": {"status_code": 401, "headers": {"content-type": "application/json", "content-length": "99"}, "content": "eJyrVspNLS5OTE9VslK6MPfCVoULGy5suth0Yd/Fhgs7Lmy/sO/CJqDIXj0lHaWU1OLkosyCksz8PKDi0LzE0pKM/KLMqtQUoGRqUVF+EZqwK1isFgCIxiz4"}}] ================================================ FILE: tests/recorded/sync/test_download_by_link_error.json ================================================ [ { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 500, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } } ] ================================================ FILE: tests/recorded/sync/test_get_disk_info.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1268" }, "content": "eJyNVNFq2zAU/ZXh16ZESuw4zgds7H3vRrUVR1iWjCVn60qhzWAddDDYy2CUlUI/IHTNlrZLvkH6o125XZO1L36xse45555rn+sDryDv4jHjNFbsPfVGGIX90MfDnt/xSsLS+Ek96A+GIYpwD6GOp6UmPFYlSaDiBygKcTAYoGHHq2gWa1bAsddDONxFeBf7b3Aw8vGo199BaISQBwIVUZMHZdBjKnY9vdGYcEWbZ5YWYEGQjKbxWPKUVjFJ04oqFZMkgdsjuFYAefDSjyIcRUMcoX7HU/tK0+KBDfgDT6ZC5pwoJVjOwGLKVD7qmguzth/N0szNnf1sVvbULF7YY7OwM7Psmh/m2qzM2tyaOzO3x1BYAfbWLGGOTMqM05ZKrxrwDtCYUJpkFSlaMl8/4jveNJdCk1y37Wq+mu/gfgUPc3ML1wWIEK1JMtkonIPCCdTW5qphmysYdm1+mYUb1n4BSkEYr+q2Tc+AffMCbkt7BORUvhVcklRt+N+A+dMe2Q/mt3uZXeeqLDlLiGZSbAHP7RG0eWpnDN97T8q8paGX/+AQC5kwwlvy3OAQNioyWm0olwC+Afipm3DRZMI5u3YOwe0cWAnhVKRki3QG6Zk19fteQL4C6gwOFvbEGUvI9twX8Frmzk9TqigVaiL1/4BGbGU/wQgze+rcloCRSld0O1yXrt5EeG7+3FvseofN6lRuL1puLaiVnOzHgjRQNs3FFI5rt7meHwSDMMBhzw0va6GrfTiFxDTrnEwY3+w3lxkTjwqHzxa+rPcgCM8WXXBWMA11UmtZly5QMRVkj9ONdEWnTEGA4I8W9lAQREHQD6MAB/7hX6naRCs=" } } ] ================================================ FILE: tests/recorded/sync/test_get_files.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=0&limit=25", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "36722" }, "content": "eJzVneduI8m2pd+lgNt/5vBWeNNAY0AjWpGi6CRxMCDC0nvPi/Pus1Pdd07NnColCUnV3YUCZEglMyP2/vZakRGR//VlvAvz7Zdf/9d/fTGL3fgw3uy3g+3O7Pbwyy9uFsziyz++bMeX8OVXTCgm//jilvN5WOwGYw9v+a8vq834YHZhsAnb5X7j4H1fGOdCcizJr1xiGRBVCHtGkWSMY8e1VtgYQrXT8L1EMSKpNReUI4JQ4D4qGjD1Nhj47NXezsbukw7/z398WZh5ctDsoNdkhdaClC7PxdGY1fs4+1w7d1oTYmVXLUtj2831XkpjNVzCWYXTOMLVw9+7TYDL93AIgrDMIPiPO1j9yvCvWP4PhH5FCN7/36cPrfbRDTRf+nEcp57BfDwPg915lVysWa2gTc1uvFx8Xbpd2GW2O7iMObwtjmfJO0a73Wr769evfnlczJbGh81/+vF2+p9ns/Dh9J+b/dfkx6+IWYWDRJbB6aGgnPMyGssInLjDyVfrlGY8BMyI85FppbGlXBLtnFL2qxAqBBb118W2XJmG59rCtEqrznmBuuPW+tF0qXsgp1JjsmhMy6NFNpMt9Gq7OM6ykl/HfnF834iH6s6IklkMVs1OrR/FjoeXfWl37PeO/0EL8P9/7sf+t//b5r8kl5j0+m+39PkvcL2r5XactNlvZrczbpRkwS8jsx399stsPB/vfkO/uOVil+RG0s6/fdPK/0GK37bzL9CqYTP4/04rybLfXpPslxG8ohH0uldSB2WdRg5ZZyEALEIqSMHpL/Pgx+b3j/JmZ37ZTReH3w7kl7Azw980YZoGISiRwUkVhRFERsW01o55FJLMMrsRdHXSkb9+vVu4zXkFgfw1v/Tha3a7DXM7O3/N0fm2UUUuO2zh4bxCh6JwoJ3xc7NQZZ1VIXs49Fvj7T43LrbQ1xuT6F8XkJwGXEKCmpEhXCQ5AqEluVQEYxYpFQK5EHgw2AvjtGIIB+QiIjF6SiOJlBjJlGXSJ2nkkgv848ivIQ2f5jn8cEW7bMJhvIVOA+Il8UoZk1Ih+Cf++Y8rMMnQbYwUNnj4hOg8DgFOSBgq4WvkDDJIK0gTDmfII2SJw8xYgS0ijjG4aiS85CmMfPfhv2HkbEgWeTfbx0KYL3txddzhS/7oz3KUOZXUfX/7slwVWIbkyf0HMvIDGujPZKRTKFikjEICIYcddcxRS3SA+CY4MCcA9xxFHaNVTjjOFAS1I1IDPbF1KYzsjpbD8macDZPs4X58V2jQ7aGz77wEdWovBueXCq3c18+H8qh0b02+uRwsNp1plS2x3srOOObTGHlDn/8sRjL0CsgQrHTcWukNiYFTBFTwTnjLoIR6mwJIiCqOmGLCRR9DRJ4TZESgwgWlIlKfAshCqTVGueXdY5W0TWl9X++27w1rnqvZ3hqvOsY2Qm8tmwVb1eLrjen2Jk29hcgiyHGuIWU8QQGxEKTHXCkoOMgiSWMMlDoJeUMFh5DUzFKqmYE8Uj+g6RWN+D2aakGUYlfRlIsbaRpo9KBAogjGOmSgbCrOjTHSKKy4CF5jDVIEU2o8VNioggrIQEpqpJ33aTR97+H/RdNCMyPMU3ZwMuRYrOb948A87Z/anX67KXp1IjrDdbu5eVwUQmvykTR9fwP9mTQNPEqlHOJIBuME4tHRAOAMFiMLNFUKRayNUFogiFtsPQbJ6QTRnnHNTQpNnyV5bLdzu+5Dbj8v8zZfjIrTuShPz4N7w+erzqh3P7lvNLN8DiJi93Juj3vbHn/ITjrkmU2Gw7dpekuf/yyacvFKU4sJRIWHqqqoskQSp4XnTgXisY00vk3T4JUSECiGkygdMdRhGql1IN28R5j9+TS9Md3epCnxUWvsvfAgPhWocoM0CgIAKqUXjFiqDZAW6Em9RMExC0FHwfSYaJni6Ac0vaIRv6tNFWKSXEVTjNhtOIWLA10dBCgYHcNrCQGNTcCWGK68Bt0dA0FSAdCBFpF50NDWec2RsFJHkYLTdx/+XzjN9Q/yZIbTrLmzovkCDX6nmmbUnfn7yM81X28dH0/Cz9ToLns1TnUqTj+ggd7Eqf5cnEqBhODBB0h1pI2hikIUAkujkJpbwhEmHBwVdQ5JT4z2ATs4miNCEsLTxGmnWVx2MqdNhXUu2S42x36tl9np/PNhMr5MHy90Puzvs7y8sS9PpZWuZC+91fJ587AuTLJ0ullk38bpLX3+0ww8Yq88hQTGv9fXCJLecwNtCE1roIsJw9y+zVNuhbMBzCwY1RC0sFxrGwn0ABgE+lfg6Y359iZPLZRxYzR3IEy50CBMuIgQavATiBLPlIP245b6oCSnEHxMeVAoHqy7AGLyH/D0ikb8Dk+1hoPqK3lKbjT7yMEJSDCoAIEIupkwTQjkEhQUD/pKIwfooMzAKQuQLVGAEYRGwskgmiWWpPD03Yf/F0/zq9Z+lGts2CJk/IDtyVYzlekve9mNaDyvouoat2kdS739/cO1PCUolacf0EBv8fSbM/gksw9GK1gQoBBH2FjDqVNCgz4QVmjpJbyMOSHWOQ/lgZAIdgkCL4JdArHKU3hq/H5cP24qT7pebsyr5fqFtJ/M2rJZe1xcq0oz1+1NSOxmQjGfIRexmAxJrTvZrg/4nt89DVLM/i19/vMGRP9w+4ohsJkOM2gmpLFlAFQoVzxpRx7C2zwlYGmENVDTgMeRYWqoZYFwJSOjBtM/n6c35tvbbh8CCqgJLs5gK5FCQhq4UKMJZI10SFDqhSIEhagDAbHqIuBVReM00cDIH/D0ikb8d54qpAhi+kq3f6s+DVFoAbJbeBIgz2LQPjkZS1lgzDpqQowW1DQkpFOSRItAzvjAGfhFgZxM4em7D/8NT0kYMXXoLPHgNNlXc5mX6Z1aWvXsK71CR8/sclfYitMA5x7YfqA7QvdPm1YzlHmn1bjkGo3H3367mrM4lbMf0HBvchZ/LmeZCSC6k2E+UAYuUVbIWAtcZc45o0UQimom4VWtFKM6YI+ldtKCAieYpunWMLo7PO9auUk1MxsX9v0eHvr144zxC/aNXKm3ydc6FbVempdKHtUm2UdydxllqpdSVMX6rltP4+y7Y+H34/+0IYI/NC0iFGnOXUA0Gb32IjCNBUg0ghHwg6eMuIJthpDiYC2YgE8ApwR2GGLQe0J9JH8BBl8a4n5auPAn1KyI/HKS32nXR+v2qJedbp52D7SVQ7lGqbB/ePz6QQn9Jsh5UJyDo+CBGoWiZoFjkD1EJcNfERscpNLBWumspcQ7ip1MzAUF3yZRkD8atk3vie+AHCvGBdZXgVzfKoy15MhzpKAyYdD/cJ0RQepqJTgJDvCE4RrhKk2EcoWtBSvlnOTceqhXktgUkL/78N+M20q1bpBl9IWFHVQ29Uk1iHLpVDh27V3Ap+5TodI/v7QeQ2tlRtv6AGeECAN26bLLICza2B0/FOQf0HB/JsgtdsjBBUQNVcaDxAeZAnIhIgFRHaxjUKSALBYHjAIKAXyiUQJKEIS3Dk6mzSBgbhAaq0Y/2z/dl6prFM7dh9HL5cUVfKd+Mo/lVZ/Gx/wQFWvzXvuMS+djeNlXm2y5nQ+HuceU8dx3x8LPBbn+Q0wjj1wyycQjar1X1oM2ZMEZKPWAApcyOJHoSWkR9R5iD0x1BNlAoRp4IQkLAv3NQP5BCf0myAPENGbKGmhk8C+YIRWcRkRELoIClUVsVJCiRCOswf9SzaFFpTIKqi1D7Acgv6InvgdyzQjh9CqQE3zjDbjAlOOcQBSh5G4SYaAdo6BcE8MFQ4HYgKPlEb5ohCj8CJqNckPB7UtrcZoif+/hvwH58CGOy51xfzSZb6dmeeSP51Hhsabw/DGTbY+XVTS3l0a5vanyx6LK0/rkeB7K+yIfs82a4cktipykK/L3N9ybICefC/KkmEgKFkJ5KhFT0ohINGPYMZYM2iBOHJWMEQ5RD3KDB2GpN5YoymQ0PgXk9hj8fbfeQ83hfau7Pl/KOjds0ruXqixPSy/TWeW+MjHL7nDsp436bMH4/KSnobu4mxbbT4unlJHk98fCzwU5pOUryEkEzwN1UfPIJE5m4UUCgeTBxYWAuHkb5NYDYzBwwnAvqZTaaquYYToEEAfG/N1A/jEJ/fZQNaYhOIoscUZGbowHbY6UCzQaYZNZak5AVHtOuQUn7V0y3wIQriHgqdb4ByC/oie+A3LCEAZ/cN1QNVU3jq04nkhEBBpRIx7BVERIZA+lS4OA9HB2INacsqAzfdTidTyIgc/WykvQdK93Od8i+bsP/83EtCAfHoq6MDOoehxenqrnnfDTI7O5+qQo1+VJsV05N8kO+0XlamKzVGJ/QAO9SWz2yZN3naCIgPSzzsdkXI8TiKzIHbNgJ7gRjhAnQaJQJQNcKU6UIYPLlBGCT6C0iWnIFFx+E0rPubjMrcrzXrazmKFVe/qsF0+j5os9rqrGDbKLB9q5H+3nL9G1W26XK56zUVeLKcS+pc9/2lg15NgrlqOWiMvIoDEFYmBjsATjFUGlRchuj97GsoGCj2UyeVEYoDpRPmF5EERYH6O3fzMs35idb+IXbCIK0gqJrEimxQurpQBUIqQZOGHjjXNEaGORtyQZHKTRa6qEpAp+qX80j+2KFv8OfjnCWPHrBkQwKPLb8AuGgBDpvBSKM8wJqCoNZs0EriS8BWoLAy8cHBh5rzmUDMIBOhyMP44BkzQh/e7DfyOkBz2w06OMeskMd3tXOW62/enuOczK7V2vGVZCZ2r1wWW4f5zZbt4Wjg8T+SCXi2zY0+N08lC7RUinY/kDGu7PxLIE7Y8t6GijJcSZJUAVF4jAVioCX31ANiiGgyIgF6x24BcDxK1k8IoSMW1ou5mZv8x6p8PoNNXVPl00a+1dhuFCf9edt9GBTpqTmJ3l6qK+GhRLk1rt2CqXQqmUU5dq2TfTRkTeHQs/V0gnefmKbIPAhaAIlTqoGKJzAaw1ijKAw0KcpdxflFAxoV5SL6BmMugpEOCU2aAVJzEw9zdD9gdl9JsoN9JGIDLVCJIR6A3w9lb7iCB4wQXHyIRXBAPQsaOgoBBFVIjg4I+oAvz/AOVX9MT3UA7Mp/JKlJNbUR6MEVCeDNKa8kgxmGFHpCHOWUkZtaCmKHFg3pgJkNiCUAwmWeIYDY4u6rQxkfce/ptZdJm2n7cH8/myUhAvg91snN8fM6WKb/h99eSa4+IE0+qZZkrV5WV8HrJOo7ZVZ1vqQZo0kN1nr0c5TUf5BzTcWyinn4xySxnwGmhCEdNGaI4Tl4CIUipxd8BxTY0nASXTBFFi3rEm0UrnkIIkYSko79dnVXnHn2aVc+7RbgbNhdCx1dW11kMo8Z24B5A9lc75+iL7UHek2NzamSaL6rLu17UMPqRMVn5/LPxklJM/UK594myU5FAcFag6FQVSXFFHfMBCpNymVIxgHrUz3tJkboM1QWCnsQ0EaIT03wzlH5TRb8+HlmCAIZadwcEGShlnhhJDEA0O9JcBbeIcS8yjjoxSEF00CCeV98B+zPyPRrfTe+LfUQ6VhBHJ0HVr9fStgyJKOgncERYzCbYfkhj8MgdzRxhmhkSqk3egEEVEBox+cj8VEl2BIcFIubT1Je8+/DeqnILtnrHVoeqwYe3hy6WJJERkubLZr8gEXH1NomNVnNaEFl5y/fN9viznfXR/WHQWuc6Z33Cf8gqUf0DD/Zkoh9BL7pGRJKyxUN5GCqcomYLg9jJiQwNBYDdltBDooCPl67h3Mj0qIOZC2rqTvZ241pK1N7lFpnws2VElexaFLaTffFzblmiG5emmkLm0c9Uzvhf7dbV1P6/29egRsYlbpqnyd8fCz0V5kpevKKeaBgMxgwXR3BpQi9xhqJTg1bRlPm0WNcYaxCTIRgwSPipDFEDCwC8j1xz93WacfFBGvz3AYjCXgTGIcU0lKHNI10g59kowJy113CGBlTBGC58s70eSBe9iMNApIN1/NBU7vSe+h3IF0p3Iq1BOxa0LrxVj5nVGWDCIwRVKYTzWUSGOVOIasHAIu2AhublJluLg6EFWAp245MK5NJS/9/DfjG/T+LSkbdLqcn9hqlMqlcuTOBs3FsV8tY+bjeFwvFgvC26E+lcjW6Qj+/0N9CayxSePb1MTCSfeKe0pdd4LMAnJpOGowQyCMOFwQdHp6ITRcFFWg32AC4OKhHgUJAXZrc0clfP0VO0+5QsqzsKlZMo9vPOnRmEhCo49nXom9Np0uu6cJ6E3L5MOqr5sO6XxoNXRMW3h9Q19/rOwnOTYK5aF4hSkm5ME4AC+TGhHfTLUzaS3WKUsFsTWGS2pZ9ZHqanlMTqKY7JoE2zQqxz8O2H5xux8+/ZiDEozwwKSoJJICOBeLJjaKBUOjCMJ0GSCROadhG8UmMqogoZXiGGW/gi/V7T4d/ArKRKKXDdPhIpbV8KAL5bW6mS+itOg76kXUQgCloArsPzMQtoGbwyxBnxxoCQacNLea6pDMGkzt999+G9mbqPMw6m3Ee37eq44rBwn+mWMm7n+tl+ha7u2Lnsuj059s+sM0dX0TV+o/QEN9CZ9P3mhNkhkbokyyiTbNHgITwZePCiTTFaBFwTlyTRUJDRWYBh99MrB5blkHppDOm1iX5vUe73RqDnZiXxHDp+Lc1Qa7dc4jmTrftLP3JVGxZNpZjfo0qxO2sfavt1Tk7N/qRR3mfqinzL2cUuf/zz6/g5fDKYaJZtdJLcGNMVABYgNgoLCUKDTNgZS4MCRN0CZgGMEjGAOxc8BZYiRyOG/AHxvy7c3eUoFVHdwaTgSHYUl0WtrnA/Yes4C1DMPuaRAChgHioZTHDDI0eQWkQWdIOmPRibSG/G7POWgLNR1IxO3bnyhuMCBODh3jiLSBGSYFEFHycCpMkKYh5de90wCj+oIxBBV4GQpB11uLU5bWfjuw3+7EuZOdiovpxey6JY3s3Kso35H7e/uHk+FyVO5qM/juhJiftDPZewyhd0o98BlElfbWrnUK97fMDDBVLrKfX/DvcXZb87gc+bdwekbbVGyv1BQHkoG1kCGaAOUe2Apwkh4LA2cKcIUJ1PtqMZeWIUZRHjaLA7zcB5tnmoPiIdh7bmDQ+7McEE+s5ywp7tDuSfDfZP3L9XzpdVGhbvnYPfrvhGTjSXusjunzOJ4fyz85IGJP3bLAOMguCcO3AO2FDwz4tyLEOzrsk54U8pqRGtphGqeTPlVIN0iJkkvqGS0Syj5F2DwbSthPiSh317S6CVnMTDFI4qegyF12KCIlfARGhNsh1fJEpVoLKVMc6nBkwjmkJAhuB8OMV/RE/8Gco4RYsmmXdcJY6JuA7nhjCS78iCSmAAvvAXeGGmSTT4QWFNqQVEpbMDdJnMbmIdTNtwzA69ZhtOE8bsP/w3It3KbedL0rtScNOe+VpU8N6pMCmNMeL1xB83la/lMtcLzon4dsAkQMxXYH9BAPwb2/3MGn3NT0EStHQSxQppyy+ALKAkkUSKEpRSYMx8gjqEqJbObXAw2YbZTnIHk4zQF2LHBWq1Nf0dD2D2v8scDcbuCehg891fHPUN63A+5UXk/y+3KVq2l8LNmpzhznSqeZWw5P0oTxjf0+U8TxkS9Qln5ZHNAKNEestOHyHGyA0QkImrMoXy/DWWk4S9BEyJDNWdgVawQYK98svCcUPEXGJUo3I8rL038jNvDsuk/ysqo79WMVGOLl/i+uWjz+ilz1yqux6XwtVDtjprjJ+hVsZA1zp9rhcf+MAwHqo4yVXSQPbI6lHc73tgB7jPFSy3qdtltT3f7bn0/utCGJePmdL/vnc10VBz2y+dlo55fzb7emPZv7/IpIEWTmXoUA7CjlxSMLkhpgxAILaipkBpWGIGsd9TiCF1jYnROgYIHROsfYP2Kvvx3rEPmCUQlv25djLh1pToFLYacC6AWvEMucMeCSrbbUww0hOTWE5zYYS6VBK4p5pRx3GMTQJlSlTYH5L2H/wbrcU/Z8Wnl7+fTTOYxt5jsio+zSxxu/UO7e+qgp3Zg5oBK9/H5aqxfsf7l/Q30JtY/ef2LjRgMuKYgPCJ3xhjsAlE46CCSK0jmsXBNvQpaUWq5AdvhNDKaai+FRCoF6+5hzVTLTea1mr8Q1gC8LdfbR+3kjAxGUub7bMAKx/tYrx1kuY+eWtl2c9a+l0+FpdgMTBrWb+jzn7bGRfx+D5B7iynRgVJlFQLz4izRwlObZDfGKTPzvIouaWOrnWOYAHA8FFTQ7pRiEWL8C2C9tsrkepX8ZIDamC4brNFcrKrLTmFVzfTvZw2x3fXr50y1sOw9fL0xOd+ELwK9lNxSBb0UmHRGcpnclCegr4PTjFHvOMgUocXrugCWTFRiNLntoyBRJfkBfK9o8e/AlwitJblu2yV1q6QmVgupw+tG6jgEqkEb+mQHSWQjuAZOiYOmMCwS7iF5GbMS6o0OHq6Z0LSxkXcf/hv2TnrMtB5mnU5uMBlYFCtT4RaNyWidK+juiSyGLi8DX+NKGN4/li5P/afFoWwOAzJkarJTB0SfK54OZPMwvytOuqX+ne+2pleOl1zF6Q9ozD+T09whSgWCgmIpExZkNXDbOGZiUB60OQvaIoq89pFQjYhTyd64LtnT1mPP0iZymAM/55t7UD/zY+kw2V0GTubu1sVcyw+KDPczmR2q1qcZmZX7JZGYxNPTIIxckRwy6+PzJm3nkM+Jj584gqJ+1+qUIwbN+/vy/2Rb7BAw0TI4JxNbj1MWLkZJiWQMG4Y8cYAaizimAZS+Bsx8zu72tw2gtKJbbAfyodCddu9ke3J6YYuMm+96aJpM9Blmzlv85Mv9+ebua+EwqLWGa5s7NzfT1bRyDPR8bIs6Xo1emoc8vozbD8z2yGQ6Onz9RES8WS0EdJgLkOaQ08QrogIX3mgOvQXfk2SEW7gQkbPJsgSnrSNY4WT6lrFgwH60qdQVXfm9apG8hq6b5HfzCExgXCkM2DLwKRExgrVTQjKQc1p7ABbwTAZBhYCWANNjobBFwZlREa6dhzSp/t7DfzPHr/ocGueJ3io3XrV93jzjSjlWQ2m0L9q7R8jPzmBXWpPx0F+5SR8AmF6xVP3dDfRmCaCfWwKiE1FGA4RXAs6JQHgiFahyGBMr4EwFxchLrpySHCqAkx6UJrMhchApXKftOVJ4eOBns9SPjXbFNIfbYqU7FaCIztFmMs0HOus/dktslfWn3vOxPj273mI2Gfcedq1if58fp+0hfUOf/+wRGK5iYJ4QC21vkqfVQAElERRj8vCXiHXapqfaKxZQMlVBUaxN4ptMVEQI68Hv//lUv3EE5qbkfHuxjPdMy6ggVQIodtBfgEIEv/WWwu8AxxxzUOvcYBBjYDGTDf9csiVQ5BGs6I+m5aW3+HfgyzBVYHM/Z16IABsSJElurTkIJikFNzZYzqShkItIefQ6B4ZConpJQ5RQNZSw3DlvNU4bJ3n34b/R6kOxW7C2MlUZ60u3H+2aztcy4aH94goT0yMkPKpcK+ZXdLfvrAe6e9y3au28u+TEjo4Hp/FknpuvDneF3uVx+bRtqsJj6Gyv1+rpk64/oDHfBPUnT7pmHgIuWig3BsgiQSN4wUEhaC55IimUZMlIeoRLoAgEpUvmoFqspMcUG4XThsrjHRMdvaPZPO9dutljtmwifjkUJqi2GveHojfIti7P4+FxOdvM2kdMu1vXO9xVJwM82D/JNK3+OfHxE7X6f884kRSD4zfOu+C0NMJJiRlUdyMiCjxtYJ2S4AgUBh2dB4nnKVfEcYahNzUx9K8w4+Qmsb475Ip3RZXV2f76qcls+zhxsjEfzU7jwbqe80u+aDe7RzE9P339REa8WS+0T7bZ4cmyJ1Axrw/AsDGAc+eco0AgnXAMBjojuhijcS5hO3SpUyYiyK8f1IsruvJ79YIKgsR18whvXVqpIM+JkmDPEUKWseQRdDG5OOGsY5JoTKS3SHBsEGNUEaq8iBw55T1gInUS93sP/+3d0l6pZdR417/UL2Wsy/l8ccBceF4VV8dqtlte5VvZdenBsgdR4bqVWRZC4Vyrrztr5U0le3hROl8VbLF8XLeCnT/SPPBbfWS5+IDG/DPLBXGgPSOEPhQ4R8Agaqu0FsngpgomKGIgbiXSRCGvKdeJgEqezcEjlESD0+6smu5MVXf0sdlq3odidnJY5cYKb59WGSJ78fgo2GRyuCxKOzVtHO8yyzhBbtirDZq75vjluHpImwrzOfHxE8vFH8svaUie75TciLU6IomoUMoGipPtRZFiKdVCMumCwNBx8MfJ2m0L/ADVIrSXGKm/wp5UN1WL5Xw86M4e7kjM19h+hNu5+6Uarbrzyd2lOhlOx7WXHum4xaG7+fqJiHj7RkBAlAgbBPIx+QNNJQo4Oh044kyAm2fQhZYa5q1Mhus81RGUoqeUYf/Dp4Nd0ZXfqxaQngRd+fwFfmO5YJ5jLUWgOtn9nEZpHfgeboyNlCczhSy4JQaOHzksGZPMsWS6vaDMELiQtAfSvvvw37oLmpvNjzizzl+y3X6u7u8K1aJ7GnRbzexL7ZBb9aez8zx/KLkdDXgvm+FJVwuVnmKX2XNlHu75ZBcuMzJulSfFTdu3SngQX64vFzy1XHxAY75ZLvhnrw/ihCNrlNKIekNB2bhgIfYVdV4lE4JJZAwT7ixUkuAVVDuVRKcH20GZSNto5SXsi6uu2p/sOvfUGZgXIOBa3GXCuTUcRJlvPMXCtlhr7uadneao33nwOXtQInd/1uRpnFYuPic+fuZ6ff57vQCt4ZKnCFoNjSmFSOZogQWNWlqVbGqaMmgUIqZQx020iHFvnRdaYh1lpMn+9n+BJ+XcVi/WJtYAx/X1jndG2/LLBg/RStVp6XE0ndTo89P++HyiB/lQU18/kRFvuwsshFQq8ugDiEEMtpBbS0KUmhmcrP2LyabTICRd0JZSQqB3NFYOCoyPP5yMeUVXfqdeCIK1VteNRt1cL5KnuUUtNE3uiZtkDNMi5zjlHC5KQ1X0QD0VnRIInJbFXBjsNEIJSqDWsZR68e7Df1MvxpYPL7lsub1k7cOluM/d1XLU5vvH4nnvuvqiT2M+Ws8fwr5eXrx4mT3ekXIxhwfyvF9tbWXXCMcDLk/LldW8yMaDWsW1ph9aLz6gMf/MegGnJD2Kwr3OPQmceIGMdsyogBU4bbAdIKM8Y5xpBH5C0JhsBeCloAqBGk7b4VaWhqdnW2wdeq49pp1t+7HZn1Zzi/aRiOyog6fd7GN/vp/tSr3WZelyfjHNTluzxexpxiarYdpo1OfEx59QLwSVwnkLhQIDKahlxie3HLGnLgJ/XMqTKp1QydMbieBEgG8lUPNBkVCMMMSZ+Ss8CeimejG2w8mlbXvbVWieHp9D8cUXhdyN/KaA7/POXh5euicxy+az66+fyIg36wWGfvGBJ3eMsTBURXDqxoGESp4riD1yRpnIpIbUo8macxKSJyRi5pUIICF/+LzM9K78Tr3gyeDllZvm3jrRyCWL8YgKimCabCmGokvKmY8u2SUEiAW2SjvrUbJVJbzLJs+rMSGZkJLMR0nbs/Hdh/+mXCxOzVZ2XOnL1ng5jo1lo3E+bp/6uNe6P9Vys9W5wqa5abP42N7nINLnxQYx5fzdguEmO7UuaMa3hcmeXY6zsSINPevVW2Z+95Hl4gMa888sFwTCTRCBpQpgrY2RUDNcUJIIIpN9M0JM7pcjTnHiKxQTFhGI3WB9slMYS3tScauMrfbPj+fzw0MotZusVjM7ZVX2odW4rIqsmD37GS4ez9vBYjTPPlb2i7uwa48gVyrVOCqmlYvPiY+fP9FIJNtnaijTUJwNlGtP4R+oVZVsJGekTHMXAmNmAw7udW2B4ZEyrBVlmjAv/3b3LpZi1n1uZfn6RZhtr50dzU7tpwMc9HFVqAwOGd/bMTpoNXf48PUTEfH2vW4adCRWS2K5RJproDuOmAMOkg2UCQ2SQwc44hSFFIPagRniXnAWEUH+R2sCrujK71UL+HjFrtuCBt+6mZhWAcqX9ogQ4VyycxRzySTyxANx/7pGiCZbyOOoKChmQQjjBM4/eEIc4COlXLz78N+Ui1mpfRkuWKY2H7hNrSIfUCY3eWCVeru8n592j8NpLxsK+LmR9yqqcXuhl9P6qTtyFO3PY7KZz9rNx1lnpnPVjpq9rMLZiGP3+nKRvlvNBzTmm+Xik3er4ZpaY6NAWkbtiQjBC+oMOGnFoSAgcELMU2led+7QOnpQORDIOnlIiCEmdf3A5tyab3Blu5l25gjnwnJ7RJXVk+qi1vHufP/kBpM6bnf00rafyOrlvCxmm43ZUty1n2npoZ1WLj4nPn6mu/jvHcekdtwxiQXyQUQmRHSYBqccDl6lrewFU8gsFdAxTPAgkwdlJ3OibXAY+kf87erFrJ4v7zedy8P0qfNkJu3M42N+s9iGQf1wv3lpHE+ddv65bLOVbfHrJzLi7S3LkIVaLiJPnqME+ZAsIiJI0Ui0ZCIm0/mSO30EI588QFpwhLiyUDko5JAzP3okxxVd+Z16IVEyZkX++b//8eU1Nr/8Svg/vixj3Ab4Hv3z/wAMTU/T" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FA_VP4DRn2GzXFhi4MZ1AXKyTRj2b7U8oGibUBVYGi8go&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FAlg2nCclufDemoVfpwt1zCwdy7h-xG8LZsYopD4-2C2L&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDP-6aWA_xa2wFJCdQ_aWuWSTZSP6VM26TgqSPrQnDeRj&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FBZv7xagkAaEb6PY68eE8PahUldLf5yKdMRwQx6dl8hEA&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCpRuhBNr4ne-d_4u2s948-ZoVAr6NXpf8UacrRwGVuLO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FC2eh48vTo1_xjuJB-YkE8ob8XdIVDT9lbotDs6x_1BO4u_9T69ZxrRPeH5TRNzBNNQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD78qN2ofdDnb_IrMjJe6HGxDwUbEe1xUWDIZyYRQeRpahsM_1-66e_4zU4z_enS1cw%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FDgOfiHTiZhjmskaow5QyhDQK81mQ-ASioJ0mbzNHSrJ5QF8C3Mjwyg7LF5i4rq41jQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FAe7OOF9Dla0JwgzWJyt6dkw4bBMjF7qHjFSIyP2t1dnI&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD_VcDdh-8Y-gtucIwrsZktXelHStVPep69-KM_zguQlbUCbDwOj7O7onAeu3wkjOKQ%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FB-SdmS_mmoID6Y_tliCuw-GIdNduJxcPiFj13Jy3-GJoziyg4TNKs8ybGV5a3N0buA%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FD3foBl4pvJc1a4SgYzP07sNJHIrup2jf38K70wJ6xq23DYBZyLCH7mZ0LvnTnBTy5w%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FA3fWo3S2RU5dz48TGGHHjfliNnFCJZ1PNgginqoDch0Z&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FC0-OxVr6SLMBFgIwj9Yi1PBZsZI3qbqbcAyHhxZatTg0&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCzN6LkDz5W0PI6CojCt9cZ0qShVAkrWtO3RB0BNGDuOQ%2FC2E7TIYxY2nUHrlHfM0ZT8uEEQxDjWHF9yiM866mv9XH1c-DthBO57PDJ4sKHGVFLw%3D%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJUhPiW1l-6n7K55XKDQZgeg_8M0-J0v7V2pvHtt5Nt6%2FC-FzKf9SHcsxEuUMuhz3Nb2iPkuuVyakhFgZHyoNMCpl%2FCs7s-W93EGPjPmdKJ75BhIjDi125MNE149dKC-JI5C6M&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDKp-BVICj_0S13oN4NPnpJoTDpJ-ZLlN6stZMy-JDoVO%2FCfu34wWpdLmk--QBnjtFQlzfgsdOSUxT0WSe4av0GLfX&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDv_KRgqbByPrkpkIwe3ywS6M1phYPvC1ziSO4bV2jkhv%2FCjV4aROlTTB_j_b0fIk6cnNjhqBD9Ux2ngcC7e5q1IegLQGzWZWnvHav_2g48jt8v03XId3_7PvmEFjUGZEdURk%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJXeNyj9s8cipSdCaX1IHfJeGhuFbEQpplT_tGq2igdO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDtvBFEF8A9AZqWP4bSwjc7Nmhlxi_qMBdo5nSPUw6kyW%2FCg6tn4S8aJ7fMocuhtPcdK-eOSYcDjaV22eQ8BRfCp3tuTq_9UwuRKSCczB6t3i_xijmBmpvEDVzQoWsP8DQeTs%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDomi_UlOE2fCK4uh1SBLo8hpUmjEzJjgkiKYV2TcnvUr%2FCsVGRa8itZzMzH19HCCF_4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDqafKe03Mqt5ThsHYr1g0p8M3GQhkjK3XWuwXx3v7OK8%2FCg3Blmw1-qCzAUZBMdEDJFcW_URPAYKvBpZklymCvGct3e1u7PeW9JDIV84zlXImeL5jtezl2iRHjFrSdRG1_fY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDibgjzSbVspePxQXeFYdF67thdrD1LCcbzOYUx6lACAq%2FCib5gzBAHSo4SvzFuBEKB3bCZwFyucU9z9xi5hqmOeuMHnYd7AwE2HFB1_7yupsbItNewv1HkHIpmF4i_KIcRkY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDo6lUXRA5qY6asVSAhlxSWv1pTQpDI_v-dVt43_RPt1v%2FCnxPRAiIZ7RioifNoNNywsWZ1VRLxKBlpyI4kBkPFQSuBmsNmFN2aHCEn41P4xRz0l5sDju4zwli82N9lVMRamE%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDlMCHurTzOkWTWajS-QQCrnse_MvLrYNwxTSCXHbAIsF%2FClGSzgn4-Km_crKI7O0-BjO4IMSHumxtQgkVAeD1XNCd8f8iSn9okMxUhc30uyi2rmlSPQlTl9BJT8lYpeya6wU%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=15&limit=10", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15421" }, "content": "eJzVW2dvG8t6/i8Crr/EvJpeDBgBq1gk9iIxCIip5LKXJSny4Pz3vPRJco3AFiXYsnNgAZZYZnfe8pSZ2T9ukjQsdjef/uOPG7NMk0Oy3e9Gu9Ske3jxxs2DWd58vNkl53DziRL18catFouwTEeJhw/8cbPeJgeThtE27Fb7rYNP3TDOheRYkk+GM2IcsogEJKUX3lJFjDSISYIIQ9SaYBU21EROqGQ+YmK4ZwbeswxLuPJ6b+eJe6fh//x4szSLy6D5ndxlBpoW75rT5sLXqpLnJpVpIcGEP9SLmGlfy2eqFZ4XD3BX4TmJMHv4vtsGmL6HIQjCMoPgB3ex+sTIJ4b/DaFPCMHn/+f2IWo/O0CLlU9icvUOFskijNLT+jJZs15DTE2arJa3K5eGNLNLYRoL+FhM5pdPTNJ0vft0e+tXx+V8ZXzY/tMnu9k/T2bpw/M/t/vby5+3PPIoBJZSMWUlDlhhrLEVXnnHNY2KOM+IM1x7JzlSKGKBkTEyuKAQI7dCqBA4JrfLXbkyC4+1pWnfrbunJeol7U2ss3Z7O0xpCOnjOn88EJcWVGP0OFwf9wzpZBhyk/J+nkvLVm2k8PNmtzR33SqeZ2w5Pxn/gxbg59/3if/8vzH/cJniJeuf35LzDzDf9WqXXGL22aSpcZNLF3yYmN3k84d5skjSz+iDWy3TS29c4vz5qyj/g5S+jvMHiGrYjv7PbV167DO02IcJvK48BNY4ErzQyofIMbfCRSKixtxF+mERfGL+upA3qfmQzpaHzwfyIaRm/Blp+CYLFBmqOZMxWCGChzQqhggV/tJXJp1Aoi9p/HRbXLrtaQ1lfJtf+XCb3e3Cws5Ptzm62NWryGXHbTxeVOhYFA60mzw2C1XWXReyh8Ownez2uaTURreFu3aCcqtiq0o65m5z/9Dr3BvWPFWz/Q1ed42th/5GNgu2qsVt4T6pPDXxI+6My2bYkpXJ0Ks5qcY2v+P75rLDH54zxXZpk9yF20K1N2kmA8iqWMoa54+1Qms4DuORekCZKjrIPlkfymnK66m4zWdK51rUnbLbPRf3vYf95EzrliTN2X7fP5nZpDQelk+r+kN+Pb99Y9v/K+iX0EHYL9A4MYSLS1cLaFFLoIWxFjp6SSnhWiGDUHCcc++NssIIZL2jFkdIjYnRORWwVRZpGOu/R/7ShHA1z+GPV+RyGw7JDsrs5hPcsNKUcYG5QFTyPz++AtaJYG+D9UCDQ8i5QA32DrnAHQvKSUYVi9hKbj3BEQnNpZLogg5OGcc9NoExTtUVWP/h4b+C9bin7DhY+/vFLJNp5ZbTtNSan+N45xud3nMXDTqBmQO6u4+Pr4Z1chXWf0KAXoR18s6wDgXGvYVSIkJAIVuDCJSzxYSSGKW00gIqOSgy7KEaqaQCMJ97FyUxmqArsO4aG6babrqo1fyZsDrA22qza2kn52Q0kTI/ZCNWON7Hh9pBlodo0M52mvPOvRwUVmI7Mtdg/Q05/1WwDi32BdYhqpgSHShVViGqsbNEC0/tpbsxDi/DulfRUQ350M4xTABwfLCRe0IpFiHG/wewXltncv1KfjpCHUxXdVZvLtfVVbewrmaG9/O62KXDh1OmWlj1G7dvbM4XwReBXjKKatBLgUlnJJcImo5Ez4PTjFEQJNEroQVAZATVFVBklGHhFDSqJN8B31dE/BvgS4TWkpBXga96q6QmVgup4dpIahwC1aANPZLBIBuZwpwSB6EwLBLuuTOMWQl8owMIsQD9e01S/+jwX2HvtM9MuzHvdnOj6ciiWJkJt6xPJ5tcQfeeyXLs8jLwDa6E8X3r7jwYDpaHsjmMyJipaaoOiD5WPB3J5mFRLE17d8Oi77Vnn38iTv+EYP5OnI6IM0EMsI201HiQhgC7hGljsTYENIcWESrWcRxBh0vjjObRiahs9EBN13DaHPgp39yD+lkc7w7T9DxyMlfclHJtPyoxPMxkUlR9mGVkVu5XRGISnwejMHElcshsjo/b4xWcfp/6gCv+KlRXf2l1yhGjGlkMTA9ggl0ImGjwOA6MXMT4ZVC3UVIiGcOGIU8cQI1FHNMASl8DzITfD+r5dnTL3Ug2Cr1Zryg70+cntsy4RdpHM9desXHmtMMDXx4utsXbwmFUa483NndqbmfrWeUY6OnYEQ94PXlqHvL4nHQazPbJdDY53L4jRLzIFgIS5gK0OfQ08YqowIWH5oBswe8EQJwJFyJyViBjnbaOgLW1CASahS6z32GLV6TyW2xxeQ+hV7HFm1dgAuNKYYAt0GU0guXG2ikhGVFYaw+ABXgmg6BCQCTA9FggNsAMZlSEufNwTar/6PD/ootC9THUT1O9Uy5Zd3zePOJKOVbD3WRfssUW9Gd3lN5tSDL2jVdTAL0u1X88QC9SAH1fCkCaU4k01QYAh/mL71OUgwnVIFOsY0rGL14waA7MQJi3niIF/8FcJCL8CgW0Co0GP5mVbtU7FdMc70qV3kyAIjpFm8k0G3Q+bPXu2Drrn/uPx4fZyfWX82nSb6Tt0nCfT65I9bfk/FevwHAVIaCEWIi94YggjQiJoBiJ8zFi/TKqc6u9YgFBWqiiQMfg/IyJCgyV9eD3fz+qv3EF5k3N+SL4Gu+ZllFBqwRQ7KC/AAoRvOothdcAjjnmoNa5wSDGtKLSSFDhHofIo8HuO+D7ioh/A3wZpkpq8TrwFeht4CvAhgRJmAVpAMUkpeDGBstBilFEHFIeKW0YgAu+LBeFKIE1lLDcOWhgfG2d5IeH/0qrj0W6ZB1lqjI+rNx+kjadr2VCo/PkClPTJyS0VK4d82ua7rubke4d9+1aJ+/OOZHSZPScTBe5xfpQLPTPrdVg11SFVujuXq/V2VWg/gnBfBGo2fsCtRUBZiERptSAj3TcicB1YMpiiljgxEh8WdV3SCLvGENYex4jBefKIlTetaXyWGSiq1OazfP+uZc9Zssm4qdDYYpq62Q4Fv1Rtn1+TMbH1Xw77xwx7e1c/1CsTkd4tB/Ia1r9ferjF2p1COEXWJcUg+M3zrvgtDTCSYkZsLsREQV+bWGdkuAIEIMGQwUSz1OuwGcxjI3XxFD8+2H9bWI9PeRKxZLK6uxwM2gy2zlOnawvJvPnZLR5yPkVX3aavaOYnQa374gRL/IF9AEigiMFQs0pjZ0gNgZw7pxzFIjhCsdgIBnRxRiNcxdsh5Q6ZSLSmn+HL16Rym/xBRUECfoqvpDkbXShsAErIgOUKkKWMQXIFS+TEw6UnCQaJJu3SHBsEGNUEaq8iBw55b30X4jxJbr44eG/3i3t37WNStLh+eFcxrqcz5dGzIXHdWl9rGZ75XW+nd3cNSxriArX7cyqEAqn2sOmu1HeVLKHJ6XzVcGWq9amHeyiRfOA3+pn0sVPCObvpAvFI1YBKi4wbL3lIRoLrIEYJxwkP7BJNNFpeDUyKHJsjbVWg9Kh6lL88trSTm+uqiltNdvN+1DKTg/rXKLwbrDOENmPx5Zg0+nhvLxL1ax+LGZWcYrcuF8bNdNm8nRcN7LXdlbfpT5+IV3AL1+WdoIWRF02Yq2OwMxUKGUDxUF6kBvsCltIJl0QWGkNX2aBQdoYBdUitJcYKfN3Y4vVIhn15o0iifka209wJ3e/UpN1bzEtnqvT8SypPfVJ1y0Pve3tO0LEyxsBAVEibBDIx8sXNNjjgKFVAr+sloKbZ5BCSw14YHlZrvNUR1CKnlKGASG+wxavSOW32IIoMI6v2wjA/I10wTzHWopANSEo0CitA9/DDUAC5TIEZ8EtMeckclgyJhmoSkGioMwQmIi5Qhc/PPzX7oLm5osjzmzy52xvmHvwxUK15AajXruZfaodcuvhbH5a5A93LqUB72UzDHS1UOkrdp4/Vhbhnk/TcJ6TpF2elrYd377Do/j0errgV+niJwTzRbrg70sX5HJgiETFDZhZaxH8C5g44D2NI6gcUEJSQTcAZjGLkFZMgu2VzqEgOY3sCl2Ep7AvrXtq/2w3uUF3ZJ4AATeimAmn9ngUZb4+iIVdqdZMF91UczTsNnzOHpTI3Z80GSTX6OJ96uMX0gU07xe+AK3hOAJTB84uSiEuZ7TAgkYtrUKWX1s0ChFT452JFojeW+eFllhHCQYwBsn+bnyxMbEGcPywSXl3sis/bfEYrdUDvWtNZtMafRzsj4/P9CAbNXX7jhjxsrvAQkBrRB59ADGIwRZya0mIUjODJRcuSlCMICRd0JZSQiA7GisHBOMj899bjbqeym/whSBYa/W61ag384UHOopaaHrZEzeXNUyLnOOUc5iUBlb0gHoqOiUQOC2LuTDYaYSIcsB3nF3hix8e/iu+SCwfn3PZcmfFOodzaZ8r1nLU5ofH0mnvevqsnxM+2SwaYf9QXj55mT0WSbmUwyN52q93tpLWw/GAy7NyZb0osWRUq7j27KfyxU8I5u/kC3Y5oRYNE54hsBWEMmZAyRATnKTOuOANipziiL03giESI7+UqFGKWkPjFb6w8m78/GhL7UPfdRLa3XVazeGsmlt2jkRkJ10862Vbw8V+nt712+eVy/nlLDtrz5fzwZxN1+Nrq1HvUx+/gS8ElcJdzlBZDEhBLTP+suWIPXUR8Me9zBfBCRXB/BHBiQDfSlywoEgoRhjqzNC/G18kdjw9d2x/tw7N59ZjKD35kpDpxG8L+D7v7Lnx1HsW82w+u7l9R4x4kS8w5MUHftkxxsJQFYmDPFFwFtQ57JEzykQmNbTepakcCc5rjplXF8uO0Xf44hWp/AZf8MviJcfvctDIYY4kUUERTKHRFYruQmc+OiMBKRAGW6Wd9Ujyy2FUYi3IYxMoFchK+9dS6At08cPDf0UXy+dmO5tUhrKdrJJYX9Xrp+NuMMT99v1zLTdfnypslps1S63OPgeVvijViSnni0uGm+y5fUZzvitM9+x8nCeK1PW8/9A2i+LPpIufEMzfSRdQlKBfDZQo6FkvPJdMUSFJkMZab8Jlq05gqwgHS+0vdy3grqNn1AHNAN68TBftMrbaP7ZOp0Yj3HWarFYzqbIq22jXz+sSK2VPfo5Lx9NutJwssq3KflkMaWcCt1WpxknpGl28T338+oNGAlPltHaMI2qMvqxZUApqVTkijZHymrsQGDPwhcF9ebbA8EgZ1ooyTZiXf7u9i5WY9x7bWb55EmbX72Qn8+fO4ACDttaFyuiQ8f2U0VG7meLD7TtCxMt73TToSKyWxHKJNNeA7iCqOMCBlzwSCvYbEuCIU1RTAdyBGeJecBYRQf57zwS8IpXfYgu4PBj/17kL9cZnArQKQF/aI0KEcxHwi7mgsL54IO4dih7uzjuNo6KgmAUhjBO4/+AJcZFdO5f6w8N/RRfzu855vGSZ2mLktrWKbKBMbtpglYdOeb94TlvjWT8bCvixnvcqqqSz1KvZw3Nv4ijanxKyXcw7zda8O9e5alfNn9bhZMSx93q6EFfp4icE80W6EO+81y0vT8JcTnAwYRkyxlIH1QwuwxoFt22D0IzBu0bQSDiCefuAIbyMUKjiq88PbE/txRZXdttZd4FwLqx2R1RZD1QPtY/F0/3AjaYPuNPVK9sZkPXTaVXKNuvzlSh2Huldo3ONLt6nPn6lu1B/PW1ApXbcMYkF8kFEJkR0mAanHA5ecXGFL4hnlgpAGCZ4kD44cjkTbYPDkB/xt+OL+UO+vN92z43ZoDsw006m1cpvl7swejjcb5/qx+duJ/9YttnKrnT7jhjxIl9EZIHLBZhtcBA62stDRAQp6BItmYgA9vRyVIpg5EEmSsER4soCc1CPwXrg7/HF9VR+gy8kuqxZkT//8+PNl9qEt9DHm1WMu3D5nf/5X3Mnrag=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJUhPiW1l-6n7K55XKDQZgeg_8M0-J0v7V2pvHtt5Nt6%2FC-FzKf9SHcsxEuUMuhz3Nb2iPkuuVyakhFgZHyoNMCpl%2FCs7s-W93EGPjPmdKJ75BhIjDi125MNE149dKC-JI5C6M&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDKp-BVICj_0S13oN4NPnpJoTDpJ-ZLlN6stZMy-JDoVO%2FCfu34wWpdLmk--QBnjtFQlzfgsdOSUxT0WSe4av0GLfX&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDv_KRgqbByPrkpkIwe3ywS6M1phYPvC1ziSO4bV2jkhv%2FCjV4aROlTTB_j_b0fIk6cnNjhqBD9Ux2ngcC7e5q1IegLQGzWZWnvHav_2g48jt8v03XId3_7PvmEFjUGZEdURk%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FDLiIYP1X1SgHaZQ7IhZd8l2JfR5G5uPnS5Mx-ERFqiGe%2FDJXeNyj9s8cipSdCaX1IHfJeGhuFbEQpplT_tGq2igdO&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDtvBFEF8A9AZqWP4bSwjc7Nmhlxi_qMBdo5nSPUw6kyW%2FCg6tn4S8aJ7fMocuhtPcdK-eOSYcDjaV22eQ8BRfCp3tuTq_9UwuRKSCczB6t3i_xijmBmpvEDVzQoWsP8DQeTs%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDomi_UlOE2fCK4uh1SBLo8hpUmjEzJjgkiKYV2TcnvUr%2FCsVGRa8itZzMzH19HCCF_4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDqafKe03Mqt5ThsHYr1g0p8M3GQhkjK3XWuwXx3v7OK8%2FCg3Blmw1-qCzAUZBMdEDJFcW_URPAYKvBpZklymCvGct3e1u7PeW9JDIV84zlXImeL5jtezl2iRHjFrSdRG1_fY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDibgjzSbVspePxQXeFYdF67thdrD1LCcbzOYUx6lACAq%2FCib5gzBAHSo4SvzFuBEKB3bCZwFyucU9z9xi5hqmOeuMHnYd7AwE2HFB1_7yupsbItNewv1HkHIpmF4i_KIcRkY%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDo6lUXRA5qY6asVSAhlxSWv1pTQpDI_v-dVt43_RPt1v%2FCnxPRAiIZ7RioifNoNNywsWZ1VRLxKBlpyI4kBkPFQSuBmsNmFN2aHCEn41P4xRz0l5sDju4zwli82N9lVMRamE%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FEncrypted%2FCode%2FAssembly%2FB3msNJ0cAgR1gmI3g6Dv3TiXPDJ4TpDAvvZRisuBiFR0%2FDGRi0BoEQJ2SaGqLMUSLa4PyJAVq1pTabNeVq7PDbJ96%2FCRfcns_7ODUkUE7SjxY4n-cmtV0kcRo4g-ys1WdHZmrE%2FDlMCHurTzOkWTWajS-QQCrnse_MvLrYNwxTSCXHbAIsF%2FClGSzgn4-Km_crKI7O0-BjO4IMSHumxtQgkVAeD1XNCd8f8iSn9okMxUhc30uyi2rmlSPQlTl9BJT8lYpeya6wU%3D&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=0&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4067" }, "content": "eJzFlmtvGskShv8L0vJl7dD3CxI6wibGcYiDARPbR0eoL9UwtpnBzIBNovz3rfHeoqPd2FayGzQSM9DT3fXWW0/1p0ZWwbJstP/7qeHyKttm6005KytXbfDHRrgFlzf2GmX2ERptyjhle41QLJeQV7Ms4pBPjdU627oKZmsoi8064LiGkFJpSTVrS001EG4IjYITLYSkQVprqHOM22DxXpOUiLZWKi4JIwRkTIYD5dGDw7VXG3+bhX9o+s97jdwt60m7s+lQ9EY563+8OFpk4t0V7V683U1G18zrc1P0M39+ML3sZ2Ze4K7gIUsYPb4f1oDhR5yCEar3CV50Qk1b0DbVPxPSJgTH/759VO17C7QsYpayJ3ewzJYwq3arOli3WqGmrsqKvFWECqr9ssIwljgsZbf1iEVVrcp2qxWL+/y2cBHWr2JW3rzauTzCw6v1plU/tkAz6qONjEhLPA9EmeTByCi148kxwWwQ3CWgwWhDrFAaQ9OOkMi0MrSllAGQ1Lfy8vjNDVy8zd2ov5rscnKeje7O3DkP79lD//Q6P705XuTd/W5v+rZKWVf04126OsoGp2l7UjnVd/lsNZy8vUqqknC56Vf3V9P7n3gPr/9sstj5Q/NmHWKd9c5Lct7EeFdFmdWadVxVubCoq6C5cOWi07zNllnVIc1Q5FVdG7XOnS9U/okdfalzE1WF9ez/tlVXWeexyJoL/McSzHo02oLxwZJAfPBoAE+IAa0kby4hZu7XpaKrXLO6ybedLWtC5eYdy4TloBRnGoI2STnFdDLCWsxIJFBXlqsWmOo6ke3W6zysdys0cuuwiNDqliUs/e2udcCX5ekJCd35iM6Xb/hc9bZ8kl0Meydisup1t9urUVZuDrKjEWm9sIj+DKDeBoZQo2bhmFR1jQhvtNSGUSoS50qRgE4BR6NywRpBKJCQCEspcp5Y4sxpYbzQsS6jUAf428yPlsbVosSHZ+iyhm1WYtKQeMIay4XQ6F38qM97z8CkIC9jpPIQcYUUIgXADSnHNX4nKQL11gRjJO5QJpFsoMJ5RT1hQQiMmqio5ROM/Obpv2Dk7Zzlh+F2k3qwLKZpdV/Rj4f3cacX+w99M7gqL4tVT+yzQzb4joz8DgL9SEZGEyW6yGvGeLQ0UiG5pzRGQSXzgXAmPE3WJa1DMFQgI7kTJLooldBePsHI80UxP15nXbjubgfZ694pL7eTzeQSzMM4n+0u3/A3g3e77fGiP/DucFjM8vXk5kQU1JZ6kqXDpxj5gpz/W4wU5BGQAF4H6b2OjiWQnCAVYlDRC2yh0T8BSHSVJMIIFVJMkEiUjDgFXAUwJhHzjwCy1x9l5KB4fXbCxq5/N3h3Ph44MdyddKd3dDVx/hSmd3rY8ydWtV5Ybl+lafRBBUaClBZLBvs1EAGgI5XGYMMhnmieEnAeNNYNV9JQaYXn3AqHdWT+hqbPEPGvaGoVM0Y8i6ZSvZCmwFN0XiQFDovLYds0UjqHhw5DjVSAJWgZooRzF7HDJgMGiBOBW2JDjE/R9Fun/5OmveG+ch+6swfH7o9ODuPZzH3YfBhPrsZDNX3H1GR+Nx6uz/IejK6/J02/XaAfSVNm0F8gvRboMOo8cYCg1IhKtF9wnAWmEf4sglBKAWHUQVRIWDwuJy71EzS90OxsPD6ozt8fbJbHcizzxdHNUh3f7GYDJ5eryWI6uB6cDrtyiYeI6nI3zqblVL7vXk/Yhbiez79O05fk/N+iqVSPNPWUoSsidlXDja9FtCrKYIBFisqlr9MUojEKjeIkSzowxwPlifuAR7cYCRU/nqYvLLev0pTFZLGTRxXx8GnwVO6IJaAQoFqj2Zjn1iFpkZ48agJBeDQd1wybvBdGkr+h6TNE/MuzqSFCs8//22s8mqLR5nuNIqUS8JZ8/gWJLuHK" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=3&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4233" }, "content": "eJzNl/tv4kgSx/8XpOWXC0O/H5HQCgJJIAkhhJBMVivUj+pgXgbbkITR/O/Xnt27He3d5qGZ2TvJP9hWu7rqW1WfLn+qJAUs88rhL58qZlUkuyTb5pO8MMU2vqy4BZhV5aCSJ3uoHGLEDiouXS5hVUwSHxd8qqyzZGcKmGSQp9vMxVUVxrmQHEtyqCwnRoIAi3QA4QhyyjLilTRceR1ICECQVIIo41FgnnlkndccCSt1EHHn9dYuEveDzH8+qKzMsjTaut/JJ/Mwb5qOFYOPQkFHDcz0ZuHPA38+8xfDx6sn4Rdq2mlGr+ApCTH6+L3LIIbvowmCsKyheOERVocMH2L9D4QOEYrr/+V+VO17C7RMfRKSVz1YJkuYFM/rMlizXkdNTZGkq3rqCihqeRHDWMZlIVmUK6ZFsc4P63WfPq4WqfGQffBJPv/wbFYenj5k23r5WJecuOAw8gG4NARRL8BZqbz3isdovBTMCmkkYl547JhEQTNHlWfBBerrIgoNHEN9lZ9253B3tjLDk/XoeYVukuFmNDhOR7WnrMtG++YNNo/3Z+NaoY/udrNkP7/a0+XD/bbJTzP78fZkrbvN/Xid3mWXm/asSefZqvkTbcfr523iG//WvFqGWGa98Z6cV2O86zRPSs0apiiMm5ZdUJ2afNqoLpJlUjRQ1aWrouyNUufGVyr/RI6/1rkaVYVs8ie3yh5rxBarTuN76Qi2DhmHguPMcyOpA6+ixpgwzG11CT4xv23kTWGqxXy1a+xIFQrz0OBWOAtMekEJgBaWa20D8cQIxylmZV+ZYhoTXabxsN5Zuex5Hcu4fpR6qDfzHJZ28Vxv0WXe7yHXfBjih2WXPoj2jo6Su0G7x0brdnO3ux8m+baVHA9RvX0yTFAr7Vz1yLU52Zxf3FyfGzZ47jXHG7weGduH8UYO2ranRf2d/fZHtKXPMd6SSVNDuIjPFvFgjObOE8SFBmO5CNrHxuFGYc+Ui/pxSz0oySk4wpR3HntBpFACeLT1u+Uv1R938zw+vEHEDHZJHvMb0ci00pQxqXU0qsnng7fwlKD38RS56IDEFkUIBMUEYZoQIqSP4WqkNYotpygz0WWhsQsiOBJFwkozboklr/D0m83/wdOj9XA7bfUztoKan7AtyTVTtft03MxE/24d1I1x2fDxZLw9v3wrTwl6laffQaCXePqVBz+EpxAU4hiBQgaMD8758oYYLh1SmCmOqPM0hIgGBREG1HrEnSOBEIoCqFd4avw2uXjMurf64rS/7J1e7Mn1rdlYtrhOjjeqO2jdjGck3NTg+KhG9mI1eyBnN7N8s8PnvHM7eXyZp+/J+d/GU4K+8BQUQ6I8qxi2HGlsWQQqVZT7eMxygJd5SjRxwhoZGYNCYJgaahkQrmRg1GD6v+fpO/vtRZ56pUOkJnHeYCuRQuUJHpjRJHZNrERB4zmvCEEQNBCqjQsRryoYp4mOjPwLnr5BxP/kqUKKIKbZm3jK3zufQhBaBJDCE1AiTmDal85YyoAx66iBECwJUkfkK0mCRYR7D5yBxQI5+QpPv9n8VzwlMGVqN0rx5Gm27bVqH+cdlVp157vj9kgvbFq0c/E0wa1Ltp3okdD3T9lwAKd8NOzvW/3+VaPxZs7iVzn7HYR7kbP4x3KWYmwMBsOIQ4CUihMVI9JiFBRhJp4LXLGguaRBSxeYdoQA83GABRMIkNfmVph2dnfFsDXr1RZJe3s/xg9+c7VgfI99v3Uyzo7ORl21Sc3H7hE6mzWvSGc/rfX2J0EdXxQ3F69x9ptr4Tf7fxeD+e8zLYqHlObcAaJgVZyrgGks4ohGMIr84C8zWBBflhQPQjIRd4h/SsGyWIPeE+oD+T9g8L4vzuftPb9Fg644SmdHhXb3aHM9HTfn2W1xSYct1OqftLeXV/Xv1NAvgpyD4nGcYByoUeWfVyzZOPaQOEdICDh2gFQarJXOWkq8o9jJ8ueC8tiQCORfgPwNmfgvIMeKcYH1518PKl9Kq3JIDyppCDmUt5//CfhcGfU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=6&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "4401" }, "content": "eJzVl2lvIkkShv8L0vBl3U3eBxJagTG2aXwAxm57tUJ5QhmqCqjCGLf6v09Uz+5OazXjQ+0eaSQkyCIVlfnGG09GfqklZUiLWvNfX2omK5OHZLMtpkVpyi08rLllMFntoFYkT6HW1AQd1FyepiErp4mHCV9qq03yYMow3YQi324czKoxzoXkWJKmlhx5jhSlHgdjA8cRaaW0EpwEF4PG0llnrYlUG2xt8Mo5ybn1WltJLLx5tbXLxP2k8F8PaplJq6BdqdbnJI++m9np6ebsvh/EyfFjdzexRwE/Tm66p3f729EwjFZmXpxN8QchwpQ9TdjTNGRj7HatFqw2PCYRVIG4bhNAFg+hCcLyA4IPvsKqyXCT4H8g1EQI5v93W6DmewuX5j6JyYsrSJM0TMv9qhLBrFagtSmTPGvkrgzlh6KEbaQwLSbLasa8LFdFs9Hw+S5b5saHzUefFIuPe5P58Phxs21Uw4ZGlEnrDWE+IKow1soQEjzyigVLmcXURqSMUdhb7T2xRlJYOZGUkkhMQwgVAie4kRUnp4vw+VNmRserq32GJsloPWRuGs5X53ftu8fBcX+Nwn5yMb99unVdf3X2aIYnqzsah4cz1PuUXo/3+Hi/C7fb/iXLi3Q26wx/oV34/HOb+Nb/NK9XW6zc0PpxL/wWvw5arPIiqfRsmbI0bl5VTn1uinmrvkzSpGyhusuzsqqnKget7zLwC+l9n4M6KB420/9bclWXLSjL+hyeI4+cVth4RK33ynpmNAvOOCWdis7W0+AT89uLvClNvVxkD60HUg+lmbUUElJaRL0H71muI7WUSi+8kIQFUXllZco5mKBKcbNxlLnNfgUWbxzmPjTaRRFSu9w3OjQtzvvItWcjPEtP6Ux0H+hV8vmy22dXq2774eFulBTbTtIboUb3eJSgTn407JOxOV4PzibjgWGX+377eo1XV8aeh+u1vOzavhaNw6dzMVh0n/gNujwVh/n9YandHVqP59ftxeamvKCjDuqcH3e3F8PGOxX075JVGwfRKhjODeECxgExjZmyBkTGlmOGVHAaERG5CEpqQ2xUUKJEI6yJxFRzUFQqo7gLDDGI9Z/I38oL3uY5DF6RiU14SAowSa2JmVaaMqawZoRw+vXgFSAnWLwN5IEpxzkBFyEFeyOMRBsF5ZoYLhgKxAYcLY/wpRGiMLTMUW5oVAACi18A+Q+H/w7ks4uYnFwld/P7tFiYfMeH+3l3+EnhdPihPU7yPkrt0/nJeNPnw546pGf3u/1MDno8YZs1w/fDN4CcvAjydxDuWZCTnwtyxqxjguoAa5M4IBeowEIJSzRHgUdkmMCIezBehCCwS6+5l4LB1gxx7gWQ213wg8nZNbqcDUaT9f7pRHdml/Toti9PFse3i+Xp4PTe5JNZ4hfnZ8uM8fRRL8IkO1r0xjfZTfsFkP+wF/5akENZfgM5HIFgBBQ0j0xCgXMRCRjJs8BCQNw8D3LrgTEYOGEgE1RKbbVVzDAdAhyxxvzdQP4+Bf0syKEfCcFRZIkzMnJjPA8UKXB7NMIKgZwT3ljPKbeBMe9AU/iXaQvztMZ/AvJXZOIPQE4YwpzjV4EcU8XeRnLHqxYRQY+oEY/c0siQ83B0aWggoT0zGkWnLPSZPmoRGaaGBey18tIhx9ELJP/h8L+TvB3kxUVPd5cG9Xezp5v+vhR+sWO2c3bfk+uT+974dH9JSuyz01cTm71I7HcQ6Flis59LbIOQ1QFWqTUyysMdwVodvfdUKLhIkGioRhYL8DN0KQ5p5IkR2jhddeiMvEDsCTJdd7gJx587Me+sTtLr9lW2RKvx4rPObuaXt3a36hs3bWcX9Gow36a30Y1Hruz09u2o+70XiP2WnP9VVK5q7BuWo5aIy8gidwLBPcZhCRevCF1ahOr26HksGzjwsYwI2jgDVCfKVywPggjrY/T2b4blN1bns/iNWqEgrZDIihiRFFZLAahESDO4CRtvnCPgUYu8Jb7CcPSaKiGpgoda/Ql+X6H4H+CXI4wV11//fVD75qFakx7U8hiLAD/F118BpgBUpA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/files?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1439" }, "content": "eJy1lGuP2jgUhv9LpOZL6cROfImR0CqQwgw7HSgwl3a1Qr6CB3IhMUyZ0fz3ddq9VPulqrQr+UNsnxyf9/F5/RJYp4s26P/2EvDS2ZNtju26ddwd/WIg95qXQS9o7bMO+jBJUS+QVVHo0q2t8hEvQd3YE3d63ei2OjbShwUIY0IxpHFfYsWYADQWDGCDRWIQkAoiwKSkKkWcASNTQXCsDCMGwYQjDRVLFZVAYuCPro9ib+X/lP61F5S86JJmms5mY5bvOZg+bZ7vp2dH1O4JieGHxzE9XD6Ol1fneeygKq98VfqLNV69/1822stXPkUMIH0H/IArmPYR7MfoLQB90Kn4q3xP7b8GVFTKGvvDCgpb6LU7151YXteeKXe2KqNKOu3etc7LKHyYsfsuYutc3fajSFVP5b7iSjcXyra7izMvlf5y0RyjbhpxhZmQLAUxTKGIqUlihIwGMQcMUgK1ZknMOSEQa5IizBTkPMaUAKwlNioiJNUaxzgq28urnX74teSLSb06l+DWLg63gOdy1OjJw9BUw/qyuMtW5R7Uy90DK++380/iqZ5yuc7KWbK63h6LT0YuF9INx+fMsOk4e5PkfvxytGrwN/Owk9jd+uBn7jz0euuqtR2zAXeOy23ngnDL2+0g3NvCugEIZVW6zhsd58F3lN/E4+85h56qbtb/Kqsz2aDzWLj1G4ZRgKlBBksCkBYSUqGVURQbmlAFwkIry7+dpLjjoduVp8EpDrXjmwHnmEBqAFGEIwrjVGntmZOYCGWMEp2xuNv6m+7usR+9L2Vzrn0fR6NK6ShrW12I/TkaJkV7MwUy2yzgprhKNiQ/JSv7MM+naFXn2en0eWHb49COFyDKJwsLhtX7j9N4ySeH6w+3y2uO5udpdneA9YqLG313oPNcTBmJRs835HqXP+N7ML8io+px5Jj8DA7L7V22a+7dLFkMwfBmkh9nH6OfdOc/aDqBHk73hG194xE/N75dNRWEAkGMAZQIRgkTKQAMMYq54lLGhHEBlIiVUDgxiiUpoUnqF1nqc/2Z+atX/GkKd576MfFGn2zru8G/pIilLEEoxQDCFLPX33vB1x7yW72gMqbV/pO9/gGfMryI" } } ] ================================================ FILE: tests/recorded/sync/test_get_last_uploaded.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwVjc0KwjAQhN8l0Jt2UW8BEcGfF+jFU1m6W1NMm5DdiCK+u+tpvm/mMB8XCo/Ou6CaxQMMMVVaY57aNy7Er3ZhhecGaJIHFJZUy8ByyKhh/++a3bHZXm54Mu5Y1EQt+jtrH9Gg5piQmNzKzawhkZ1dz52p8pwjqk1+xCj8/QHnfDH+" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Ffirst.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEsOwiAQANC7sO/wtaScwwsQGKUFazudJhLj3XXh+iXvLQrhTQRRmLcjSHlu7Rkzkl8gz0eFHteML1iRg3P2zwNHuiNLo4xTXqurnpSxFsw4wskZpkK9tD2VTmpvlOKjLjPuKg319zpjvTYXLT5ffm0pAg==" } }, { "method": "PUT", "url": "https://uploader7j.disk.yandex.net/upload-target/20240710T190233.266.utd.9hryhlqchyr0qlrcamkjieq0c-k7j.42371251", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Fsecond.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsOwiAQANC7sO/wKWQo5/ACGKBosRCY+onx7sbE9Uvem+UeE3MsE7XhOD9aqT7EruwK4TI2ePk9xCfskZzW898n8n2NxJVQWqAUJ7kINWuQRsFBAbzN5W6uZiSUxdTlnPsttUe10/aLtUXEWSD7fAGhiihv" } }, { "method": "PUT", "url": "https://uploader28g.disk.yandex.net/upload-target/20240710T190234.152.utd.a8hlv5j5sf71l5o9bhrmfpwo8-k28g.48777307", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded%2Fthird.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFsOwiAQQNG98N8BBpoC63ADKNMWq9jwUmPcu5qY+3mS+2Jrppk5tta6F8d52y83HygrXCDEssHTp0APSFSd1urvQ/V5ocpRoBaTFAdpBaoRUFhoNYAZT+U+ydn3SNhS79eo9Plo+rD9xtqi+Ybs/QGhYShq" } }, { "method": "PUT", "url": "https://uploader32g.disk.yandex.net/upload-target/20240710T190235.209.utd.85csw71favie2unvvmi34jb8v-k32g.49282822", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/last-uploaded?limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3483" }, "content": "eJy1ln1vE0cQh7+LJfxPQ7w7+27JqgJpwAUVQnhJUlXW7O5sfCR+ie+cOKB89865lNAKcCKCZNm+3dPszvxmnpmPnaqhSd3p//mxg9OmuqgWy3pUN9gsebGTzginna1OXX2gTh9gq5NmkwlNm1GVef9jZ76oLrCh0YLq2XKR+KWONsY6Ix30KUWhwduCslA03mN2NpWsoEApToLRIHNSEHLx0aGwNrmgkkAdbQ6FD54v41mVfpL5663OFCet0WZcLfJ2s2r4SFpVhV3jzbQg9i3zPgjQD4V7KMVrafsC+sr8IkRfCH7/37txSO7b+8ksV6XaeINJNaFRczVfe0Krpjc/w6qVrVRn7dq4aeZ1v9fLs8vp2QwzLbZzVZ9uX+E002p7sey1j72okpYyFBsNePDFaKGs1kJm0slniTllSsaHlALycnTKOwSJCJ4iYc9aT+TJ96b10+EpHT6b4qsn89dXU/GmenVOTTqHOT55937vZFdbMX9lj0cH1Zv08jgq97hc+azrR9PV+agcPnu7vJxd7sH5HxDfP9q5fPRip758oHb58+uyyoPPUe62LrYiDj5L2GVn5rO6aqrZdIBNg2ncZmx3jPV40D2rJlUzEN00mzZtHrdhG7RBewB767B1OUi0GP3vlLYABgDdMS/7UMASR8aqlDWQzlqqoI2WlBzm2J1QrvAfy3mWluvTm9PpxeACutTgySBRFNkWgzZxhKUPITqjSAElSNalNvGxGbN0rTD93hHu8u9rqptew1+jE2pGZ8h/lvO1nrn3ZQLfHN8a+HSBtojHCMa2a85rwXkJxnCKKpcU8YoVJQRW1ZvgkyrknS8CfVDFOAo56aBdFOiCYVufrK8TjE/MpoXFZq8WdFHVrEunz1EVFpwyxjnjnbveug2A1N0AZJJjbcgjBaNQguZSCzELIUIRjrKPwhVlZeJn0KloJzzflPeKVyDFBgD9sPkbANXECXk3AumNBLoH979LIH3fBFLZeBs4MUGRRmeMJA1MIHI5eGcjFvRApsTsCzAwDWhMRRSbwWpf9AYCHY9Gu7PTvd8P01uF4smRNvuHL1EfDOXuwQ58yHYUns8h779Yjd59uMrDy9XRxVEzP6iSaNwxzDcQ6EbDn4ggtUZQRAhIObZqekc2SqcDosw2oUuBNiOIdSfUXJ06RiW00Emh9pp7kwyagO6OoP+k8EYGOT4jGGetjNokMNx6sgCfuKmoUrBAdNxtuFOiBqFcLDIyYq3OmdNWGvoGg27h1tcYZKQ2Xt6KQdLcjUE2O2Fckaggq0iCuWiN1sRDAXcQpz16rjuTiDEctVagudGiNDFkYJyqDQz6YfM3DCrVom7uhCC1EUH34P13EaTuG0FFJm+cBytJGq+ygxiARJJRxIh8QxTc3dBHntgAsk85GAYoYchtGosNCEr4TD0/v/TD5Tt1nI9pOTw8KU9heHQwfrl/sPvb4vBxpVMIu5PhavK7q0bvzyfDiTkyO3E/Pz6F/e8j6LOEP49A0qwJZHkYcIKrhls7GM+uG0hogsyRKzXjZgJR4RnE8bzAFaq8TcSzRiajmGpB8jh5dwJ9mcAbAYSQidgJtGB9AJMx8CQiMDoN3GjaNggEJRqdCFTWIZRoLfLEBABBqG8A6BZefQVAXAsi+HD911ZnrU2nr67/BnifKJA=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/b3c4119f6b52828f540364401de4c8d1adcdec589cc9a401b7387a21aa28ebea/668ee8e8/nsHIkeXKnaRGpTyn0UiRqetcq2paGWjFgD460pR6Z_SiUcPZb37Cfy8d4sBnxq_fXKVuwowF2qN2bjBAwBOAsw==?uid=455675172&filename=third.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=22&hid=89f26e64463cd42e4d41394541ec7adb&media_type=document&tknv=v2&etag=ceb0d6f5a6c3641899b753e32ec2c67c", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "22" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/3d5869fa223e4a7551e42440e7d9876bafa82e5fbd8f2a06524acf0f6d2648f4/668ee8e8/nsHIkeXKnaRGpTyn0UiRqZ__DokFJXcV3a0GY45QXPa4SI1DSA2zd6_9Lp2dQOx_WzydIwxYvYtpSic0t7Z2pw==?uid=455675172&filename=second.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=23&hid=ba29aedb9bd087e6b1749aa1d6ca7c9e&media_type=document&tknv=v2&etag=f36ea43e34bb30404c3a4842f2194e2e", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "23" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/f1c8578261e1583d72b92e0c1b0bba443a0c36a8bb7a22d8cd951c0ea9d5c250/668ee8e8/nsHIkeXKnaRGpTyn0UiRqcaK3Lqw8IuW3ZdZeuIXgfH2IYShPQSDErXCi4c99DmIxmJ7i_jqmIm5Y5AbQdCk2Q==?uid=455675172&filename=first.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=15&hid=647b704582c6258c2552ca591db1b9da&media_type=document&tknv=v2&etag=ef06f76f53a4386cea89de53db991bea", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "15" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_last_uploaded&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAURdG9MNZSSim0c+MG3MCH/0gbayEFjca4dzu8Z3K/Yt4RxSTmWnOZpAxrevKZ8tJ8aGO8mw1VvpTkpdxlytipLmkrMtqgXUBrO1hjWzgP+B4DDxR9N/pgR9OPvjWdVzrCaR25V4bs4BTASpzEA3VOfLyvl9uRFY+8UsUhkdaC3x/D3jIQ" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f7c38ce072e7570e8beeb4e6d6afb29bc79549b052b13fe833fd415a7681eed1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f7c38ce072e7570e8beeb4e6d6afb29bc79549b052b13fe833fd415a7681eed1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_get_meta.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "132" }, "content": "eJwVjcsKwjAQRf8l0J12UHcFEcHHD3TjqgzNrSmmTchMRRH/3XF17jmb+3GhYHCNC6pZGqI+psWvOY/1m2ePVz1D6bkhP8qDCiQtpYccMmvY/1u1O1bby41PtluImqihu0O7Ccpu5Qwhefu4nltTxZQjK6wMHAXfHxgALkQ=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "597" }, "content": "eJy1kc9OwzAMxt/FVzrNzfKnyZlH2AUhVKWpAxHLUjXZBJr27nhIXLjAAS62FX3+7F98gZHyRPNMM7gL1LI2cAAdpEa5gnt86uCQcuJXgR2UGCtxzeXi2wtL51Rf3fbB33PeU23bxmF8pjZmap6NWmn+wB3XDo4+E7d8V9BbijycBSvVcloDjYm3AamUNqo3wlllxIRWzGpQAXVUMZCJ0s5eahGl8cNOE+7EMFhjvIkD6T5OAW3U6NH2PCSs5NsNEgQKuUGz6XHfayeNk/YO0SGyKpc5xfSj7LfsoeRMx8Y49fa7y5rOvMT4hfnXjMtpOqTwT/Z8nva+0Cf2CrdbnVNN5QiO7VHvELXtrRwGef0AcGeugQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "597" }, "content": "eJy1kc9OwzAMxt/FVzrNzfKnyZlH2AUhVKWpAxHLUjXZBJr27nhIXLjAAS62FX3+7F98gZHyRPNMM7gL1LI2cAAdpEa5gnt86uCQcuJXgR2UGCtxzeXi2wtL51Rf3fbB33PeU23bxmF8pjZmap6NWmn+wB3XDo4+E7d8V9BbijycBSvVcloDjYm3AamUNqo3wlllxIRWzGpQAXVUMZCJ0s5eahGl8cNOE+7EMFhjvIkD6T5OAW3U6NH2PCSs5NsNEgQKuUGz6XHfayeNk/YO0SGyKpc5xfSj7LfsoeRMx8Y49fa7y5rOvMT4hfnXjMtpOqTwT/Z8nva+0Cf2CrdbnVNN5QiO7VHvELXtrRwGef0AcGeugQ==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_meta&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_get_public_resources.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=0&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "2605" }, "content": "eJy1lcluG0cQht9lAPNiSdP7TBMgAosSKYlWaEnUYgYB0avYImfRLFxs6JBccslD5BFyyTmvIL9RehRbsg1HtuME4ADTmGJ11f9/Xf06cJVJyqD9w+sgr+XcqcnMrIN2MD6ZHr2qt/lydbDaDpfj2WDM3ej55eBqWe9cFeXAPpvF2zYa466LD3XvfKl6eDxYx0eHwB5LeR0eMJknx+vhQZaO8Fl2ke6Iy04n2AhSkRi/w6AuSuOXZuVs0H59sxEUpszqQpmJ0/47oZRFFEaoraUlRAmkiKHaAmMRkUZEFkAhNUFC6RhqACWHgBMmOIi0oloSYgFnsYV+k7e91cXcZ55WVV62w3AttNsqZ6EOh1ejXQM411cnOX3m45NMO+tMUwcCkG8CuonhCEZtCtsIPAWgDYAPU4UR1WejclFNfYh25awdnkxFYcJ3zassSUxa+Y69B96Cwi18wsk7Jf4nGf6f9N7Bap2bu06LoLFz4UqXpUEbUspJFDHKWRMb32x8RFt6sa3S/tyul/1dvN5b9eXz6fpcXY77CF0UyXJ40Td7s3M43uu68frFcPdymuS7Mx0hhy+6h/AR2j7j/B4eTrqgu5idpvzF5QOdt7/d/v7mp9s/b/9484t/+7l53vz6RbhKxmNorKQ8AiTihhgLYoFiiyOGfBhE1AAFKYPMi4i8yNgKFhEhIxQJIRss6rLKkkleZLkpKmc8HGk9n38KOMQb4HDcBvE9cB/Qi/AmhJuAjxBoU9pG/NNc/mPDX4Pof9D6Y4h+c/pHEGWcU4Yx4jGDAN0hKtLKLVxRl5OyElXt2w/U3Ij0ocq/6dXzp4qeHYRpvjsfXcVdO6hG3dPzHeLi7+txb76SSZge1Gont9fnucmv+vbsaTesh2x/N33F9L+nd3t+ZvfSFTjrXUJ99EBvLysSuLWQH/D62LDC91CU7pXPgCKIHhnISGiCWSyJlFxAyJilDEUaYUG5HwdeP80Yg8pAxCGVBlgGtY2k1UKZ2H5uwD5U81Xz8durenQ+fmt6b0HiEjN5S2BlVlWYz4VreLJubt5zWGfLdJ4JbYqt5nRurUWqzWqrqMNmGTKDGEcQxSzy1TBANSSxr0ZK6t9jrhG3QkArgOFSRdoigYRRAGrClCI4ZP58UKVomJZ7+zNzMUjFcT8frVNw6o6vX8bP3f4qX9RUFNf7k1hND0+H6+OxkMyOiqt6NHz20o3rdIG3T+pJPz07L8e9vZODTBB91Fu+OHqCd/zvu9rpzr1+rabFBs/OOzhbvpc8K13lD2BHVJVQ08br1lSU005r7hJXdUBLZWnVENCo1mk0e4J6d6q1vEammHy0SYNvp6G3NfUfpGVIChMTJmmMAJZGwThCjFg/JQzWrcRoJx5yt6pZuugsUMtU/gBi6M2NjP8/93ZjLx3DVACfBEPvO3vkag/fO4EPe7x1vTllU4Eo82sILZJYEW+pMkziSPgJR6S1llpioNEExpgAYf20YyRWHjaPG/bXMCYRiaPgfqLdIeR309QvvqD092dfRCAGHlqKmL+mb37cCO7kD9p4I8isLY1/BTd/AStKJLY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=3&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3970" }, "content": "eJy1l2lPG0kQhv+LpeVLAPd9WLJWhMvG4TbnamX1UY0H47HxjA0myn/fGkIWwiZAjpUsazzTrqqut+qpno+1rIRhUWv89bHm8jKbZZNp0StKV07xZi1cgctri7Xx1F9loTeAOd6kG+Zq533/prW7caaGt8drdKbnre1NerL6rn/y/qwb2Htonx+a4e58c9JJF5vX7ODD2sZ8f+Wiv3FaXNe3lB8PD+a7W6O8y49Hp/mau2g2H/1MJ1fop1+W46JRr89dzJaLQT3W78z4eibczWWx3YMbXJ+7IeDK9k5aYoTaJUqXmF6+y8b4DG6zVGt8/LRYCxNwJURc+LioS0mDigbn7whpEILri+wObSkrDSd0sTaBYjSdBOhl1R+FlEpLqlkjOuO59i6RFMAnlxh1RsooOTE2uUgD8zEKp0WkxgsrNbWGAXVMgbBeoqfhKGYpezWgMBoOIS8xAJTiY208yWa4jd6XwH53VA+5/3/MowrDbAi9cj6uLLvxGH25Mhvl9c9qpewKnmgeRzf51chFmCzHrBgsz10e4XZ5Mq1XP+vRaY/eQLiQArMycUYJEcAUJdF6EmRIMgRuqcOYtXbGUKWYITIA+EjqSlm8DrKeF632AE47uTvYHHfnOTnKDq5TV02Go+2ro9OtzkTcFodbenvkzYpdbQ93Vvda887+xXU+WT8rj6fcrA5383Uti9Osp093/d5J9+YPvoafP6dZbP6bxIVqi1XBNv9brgu4q/GoyKqENF1ZutCvpF/ou6LfXLjKhlnZJAthlJdVQVRJbD5J4R9so7KBKYNJ75nPqqqbD0W90MdnVDqpWHDG6ZSU0IpI7aKUDMVjDujCEGLmPvvAChxjPRQQF8pBPmvO2AKU2KqYbOejYlRzGrUJJHotlOLBcU695lU1ubKPelZqNeqHfTeB+je79NFbhZt//VX92HdMKrzrlUlBB5WSEZp5iCIqTqSDlGwiEZL2hEQuI7dE4JemJCnHhfEqBhIS2nqwf19k6DPKqvVe38QEZlmBCa41qNQSY5dCCau5Vp8W385LO77bMfm0e7a3+mE7XHSLjf5sxYk4DneXreF0Z9KyZ+365UUnN/Hd9npnzqYbl3uDw6wzYO3WSfh5Xp5v0ikcqenKnA7txbd4yZaIepWXuEh2qW0w2yD6GS+11UYT8n1eGsp88l6T6BzBlvVOeplAABcWy476QJOMUUUWdTSJKGxiwQWnXDCZ7mX4Dy+/HdCP8PI3RPUSL3/Z/O/mpRVAmaNgvNRAguY+agVgtFYUQ4sqSJUsQsEAwjJGC8EBwlURSiCJV3h5YG740cmlPij8+T4NrZP1nbXzD+czD63srtstzfXY8pGbZNzovalsnbLu9Ym7ubvYWopjONi9eCsvv5Tr/8zLh6K+56VEDSklVsUkBdOKK6pEtFKCIDrZN/EScUVJAGkN8kskD8oKjXOLWW9kUvI1Xj7p0jfwMimvjSVeERQ0cGaoo8FSC5AkMCtssIYoH0QC4gDHNorsk3CCA0gS3Hd4+YZNfM1LRRDIlEpLlf0RXvK7zl5pVk4mO2qwSrX70B4NuIbxnKnjd7fl7mb98LKYH09Zwr/rm1l/UG6P2kdrN+0duV8cn/88L2flaei8V92iO7mOT3i57QbwkItvU5KJJUKXKKmgRGSD0WeUFNXMeOFMiY+ZJEr7AFaCcozhbPaEYxdiT0OKBgwTgqKOgaA3LEhOsaM5GgAKzxn5/XB+6Ez561G9eKb8VfPPGFnCbVm/XRo+avVjjGRKW0sTJQwiIzJ5qzi2kfU0Wc6VoDZ4i8cP4TlIQRkFmQwP1FgQ0nH5CiNdW58P0sa5yrdtN41XD5Z6rZk7uuxene3fhlXfsyT4fNSZZdPNvfL89s6llY0z1mXl9Q5bD2H/ZUZ+KdGfIGOVOETiY+peION9Id9zMXIitE546PfOGWIj84GrhPqFqEhyT7k4zQc52vwaikQrgWMQlzIcPyoK4oQBSYWiAmcgPIfikyb8CoIPxp8SEAKXAFzjewmNUcaAH+JDYAKHG047xiXDygqgI85b6n2UTujEBcrnPDXfIeAbIn5CQE2NkMYyKvGlxIhPfy/W7tNfa/DF2iilAqrLT/8AaP68XQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=6&limit=3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "8403" }, "content": "eJztmMlSG98Vxt9FVWZjg+48qIpKYYTEIARiNqkUdUfUILUadUtIcnmRbLLJG2STR8gm67yC/UY5bfibwYBHsqLUqpK6W+fe/s53fvfqvK8kRejnldqf31dMWiTjZDjKT/LCFCM4WXG9YNLKm0o2sr3EnZyHKZzsm7X9Bs2LWe9AZqtxvTVaOaImXGCH7TTrdUUoujv1Bt1OT08PSKc9E7uXrXaaNFpkP2zI7YvqurBZf2e6tT5I9+jB4Citm9PFxZtxRsMejNMtiiyvVatT45OF/Lzqq+woO4xveweFLgrUgftT0w9wp8l9DRO6MLZwLkySWKm9//Cm4obBFMHDDQQROo/wPNZ7mNSwqGH+GqEaQnB/nswgBpGYvKkMQz4YDV04ScpfMc6F5FiSmrGK+WBdsB4xho3BWGjrSAzRY6UU5o5LizzyAjOnrRXCE0GMsBQ7xiIM0x/4JCYPz4aTL7Nxg34/pAVMAPR/X8mGyRie4eSPif3uWV0L/jzhIQX9pB9OimlWRi7CpKhmPZOUjopJL9zKsR9cpr2B8WG44JP8fGFqUh8mC8NRtfxajUQRpJ0QxjoJo5pIhERcam5wdJ7DIbhEkWlBbITp2BB0IFEGiaSMsSqERtw5UU3z1bXzcLSRmp1mtjdN0X6yc/FOtZK1STYecTO8WDtRrru5vzXdOTZWxL3h2Whva+ldcjxKx/Tt7uikmR4c5seN1d31gWG+07jc7ryidTj+NEr84hf95spHLA26CPZ8RZeuDDoHz5MN8qRIBumiKQrjumW+57om7y7O9ZJ+UiyiOTdIi9IFpXKLpW6vSOOzcnOgUxie3BuotPBi6eC5LlwAAYg1QTFhOchGbXBYSSJYdJgH6uf6wSfmJvZccZ6OF8dkLhRQhhR7QmWA32vINxUgGuUGQRCKJeS3NI0pupC7MjO16m7XDEN1YzTMQ/VOHd6Mcp37sta6hnAB3zGOxFLHRCAugGGkUTgwG2PkkQUcPMOKMmSiDkww5ajhhmuKraZMMiUh1nXkz0aC0TyHL98x+WEYJzmIX4HCkwxTjBBhVEFJfnjz/QxcXZ3krw+qg8FWY/WisT0xw8322ehwp5n2xfJ2WxfLk4393deoPT7eEtbqZqqPtkw2q+63jzd9/+DnGXjWPRqvt3e6WyeDMDu9YeB5mYGFWZI9ikCs5zGZR2oP0xqWNazvIRBTDi/8OAWFxd5KjaH6pGCYWBTKH0C2hFNGGc6h/JkMjiMZSJBWQB61Q55SxK2w9yn4+IR+hIK/YVZPUfCXw9+joMkyGMuU9V+9ytaPoZB76632mnsXKZLROGGNJ4aCjR0hUQEeFVyVUOmSAhQlhNJBhGgVkPFbKNxtbLK8Wc+TZEXWT3sbRND1ZgxTm+q0G1dXLjpndOKTfpOeZ71G6/LtttaXqK/aa2d5HVmx9DQKv7j0Jzh4SznAYRnjcRhee/kzD4MlRhEHojEAiAqwgDAOCwnGznuB4m0egvEysEEe/F0qci2todQbFUo7lIzSQdJAFIc1wIeHqXi7Ju/g8GaYO1DUhrAIS2vU1HoDq6wUXiGsBDOmfAioGKVkdAxzWJqdopoGAX6LOvJAHoPid8z9FhS5hEWDUYY1R4rKH4HiTmeyv9yb9VRm29Wxvpger63aolVPNu24czjIcaNfyHzndX2veqqnk252PCoOe6xJNsdDAvvQn4ViUn3XHJh3rdZ015Ne7/IGih//iRf8wE2eYiLi8xTtIVFjuobkPSbCmiORfhyJzElKuNIS8gaVaTm1jMSosIQsSmlhy+I9ppQwQjwkwlgoVc0x0U5K5PADSHxkPo8xZJz6hUEW0km/FwfDviny+UGMiQvw3KOypBYuB0OfDQcO/Jakp/3ewh9XfhC0v+FZnwLtL4f/cJW0qz8zd53yOFOz0vrhssoABIIjzwjsZWErgkIApFoaOKdGeq98jExZ2EjRspaw14JTpQkTXNgQUTVJAa04HV+c1jvJ+nDaW2r7tcZsYg+X7GTlbLl36GOro1bXp4xno/m9y2nacSed+dny8X7LLbmOGI3JjEVxttzszOutpXCADsdk9+IbRH1VR6/02yub34FqkvaSNDwF1KRvTgOg9CwLpw+y9BqBN/VUX2ks7bf2KiUVXhT+fQrPfV60jo6OdufccJAtohvJy5Mvej+T3g/J/aL2M6n9gNgvWj+P1l9L/aL08yi9+ZXSmy9KP4vSra+Ubr0o/Tyk/lrqoxetn2sP8oDYL2o/3w77Iblf9P6/7UOWKx/+8qMtTyWoQzyCwIzDH34qlHPIC8dlUMhohSNFWnnmg2ExRq9IsJAK7AWJESH0rZbn23fL+cFGUW9ezC5s0h5uNburTT3uzdbql7ydN2cn+7PDA1XfXItLcv7Ar9TPz4fH6+tne+JohZjLnxT7Z7qev9DteaJbetXlumqWcioYd8YiFyAqixIFgjnmhhMOLr7dLP0S+U6rNMoQtNIOKWKsEJQzb7XFwRAkvRHmfi/0VjfqurBeivC5ivBOj/rjvz7++9NfP/73438+/R0+/a18f/pH9VbP9EtnmhhPHMHURioxij4oZiLUHMMmEO8jHExERbGDF3JGQDJwJOAhrqQQ4pHO9HdY5VZnWiKiMZEIY04w0iVHPqtTqdE3FaiCPMBH8eF/4styvQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1364" }, "content": "eJy1VNlu20YU/RcC1otlc1YuAojCihK7TlwntuzKKgpilktzLHExOZJFGf6SviT9In9Sh4rrBG0f+tACBDnLnXvOvecMHz1joWi90S+PniitWZtm1aatFXblFj21BFF6Q69eyaVR6QI6t2i6N/YjuRqTE5gvt9fLT9BONjfn+3J/uvz4U2dOyB07Vg+zRRR3gk3hw+n1rVmo3CK4nZ2t5b1/Gsi6uOjOT6tySq+rWTkRt0nyDWfVLB1Obm3djny/E9octgtf+9PbWlyVBlPgN/MjF1+KAlzk8+/PX9Ln354/48Otqd06bEzmjR6fhp5qQFjQLogggg8QPaBoivEI8xGm+wiNEHLxrdm6PC6CMI6GXgNttWoUpKY/yDgPQo5DMgo4goDHFFOEIVAkZJIEGUMRiSkVGaY0wpzxMKYoBp4xHKJMiSDCmgJwnjmkotImM/9MiLBXQqoqCiitI+BkePTqxqxdGemfxP5rVi99/3/SOxUKU0Bqu7rPLOraYQlrqtL/qlZmlvCd3rp6KJeV0NAcatMuDjtRatgcNiu/n/oozgRTnEKMKHG8BI4ySbHGCgFmIs5orDjGgGIUKUR0DI43i2IcC6JUIP0giBF3I79sT35cwOx9KS6O62lXoitzcT+3P4c32w/z6Vl1t0g/XV6u5ttokY4v33C6eZefz2bHx+VkfPT2XuH5+2B8Js/15sAedW9tgO4C+rBHJ+75YWV08trEQV9ib9Zkb4L2jsjujdP+E493E7Sz7sBVWFet6ZuTCGuFynsbDHLR5slgaQpjEzRQVWl7c/QNTb5r5x551+dw7YMm/Qt+7/DkxeCD3O1xShGTIbCYhQqTTGZcgwyFJkyKELFBAdqIrxjOjbXzRgt6YBflOlmTAVh3ZSUhTmSMIhmEkZYCg9AqECqTmnGGcO8sYXOnba/cyL/MRQP+327rN6T+l/OK1d/LXBAe9OeRkrEMsSOMolhmkoveAKGMgIVO4YxGEYEwEjrAlAWAFMZcoZiwTAoaSpfrJf/ObA5Tczf5FwU0sData643wgEOMepdz7HLHD39OvR2kritoVdlWQtuGD/9AWlcodg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=5&limit=2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "2598" }, "content": "eJy1lWlv20YQhv+LgOhLbHPvJQUIhRNHtnwfsmKrKIQ9LUYSSZNLWbLh/96hktR22hxNU4CAxF3yndl3Zh4+tNLg5lWr8/tDS2UhXaRlXY2roEINiy0zcyprbbSKWs9SM566FSzS+4PTEG+/L4/F9C2W6rCfT6l0xYqI4etlONmNLj5Uq2FNPLwu7xaTaTjK+5c7d/1jflYNR7fRvtDF/Hx1sp9nAzrMr7IdddPtPsWpyxnEmYRQVJ0oWimbblXTyEaLcGUO3ohBNShv7Q08n6m5gyeP1NT5dOZgxS1T3+o8PG60TOlUcBa2CSJsE+FNjAY46SDeIfg1Qh2E4PkqvQcFJqkUG63SVXldGjdOm9cY50JyLEnHwjbhSEhtXMKdUIR4LzSizihlnfM2djFhDGOTGATRMEYUO0woCDjc5DXPberT76Zj8vncZQESAPsfWkWZLuAQ48+J/eqsPvn9/8hDDebp3I3DqmiUg1uGaLk5f6rV+uepzja/y2Y5SJdbNq2mWyuVWbfcKuuouY2wjROBsZNSKY0w9c4jojxj2oCjJtGMeOI0llwmgliiGVZcwmmMZB55FgmRIG6MiLJqrz91VweZOt8tBqsMXabnt6ovR1PfG4nsKBn44u355nhvoS4/DGbXZ0vzVo8TZHSWHyzSevc0jJb3ym/3rsmAhNtj8s6Ys1d0B67f6tR2/zKx3RyxadLu5xZtw1mKvEpDmmddFYIyk6bg7YmqJt32LJ2noYvaJs9C0waNdd3GuFek92RdG4xy5fiLSE0nd9eN3J7AjqWISektU1qpGCVgiKHCQ/2MFcir9tzZVH2MUGfTDDTbYZotugvSdgHmEUnBDAbnFLHCCMuQYrHjmAnMuJfr9lFhAgVsytOJng3hkzTsfhJvZm2iCBew5AzlzlFpscHWcmvgQtoYwqSKNbeEcgKdZZy0jHCsteWKSU8ZlE9pHIPWJ/HPAS2Hmx/IuHSLtALrWx0sccx4nBDMBUYxe9z4cQLOVf+yR6twPxvKYs/vH9bvrqhyt3AcvSpmE+HC5HynR0+zm5shOTu+Fxd3h8dZ2jskl+5Anv48AdlV8d6/mQ1DEgI6eyKgqmwHJm9rob/OQLqGTjLApINFB/MvGEgkJl9HoNIxsw5QoC2CmVcKY5HA5MEUWhzHMeaGS40ssmA2DKMWwhJBlNAUG8b83xD4MhtOfgqBvyCrbyHwP8v/EwKLmUqzf00/T2KCEiOE0kZCVOWJkAhQxxX2xnK4BJeAOWCf9pCOdi5xBLpeIsCA/w79ruPDtL8sFjVX5W1/HJvJ0eXJ6nyktPCD8kM9ONm+Tkd1tqBvLurxbjZ8X416exf7uWL2rHd3+h36QXu+otsfG/TnCbh27hvwazp4zT4wgGjlYiY0B9uodgbHkgjmDeaO2ufsa7Rfgo9iAJB08H4C9aYCTKNcIRChWEJ9vwTfxUSVLjqoy8pFL+bwBQabOM8ZiLEnmhomHDEOGgbIhx3T3nvuGXw+LcMxBYL5xDHBYkMVVzyhWCeUSRbLrzDwB5J/xkAhGaa4+XjTGEby8Y+N1roAQIONVu595eAvf/wTXpgduA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=7&limit=2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "7119" }, "content": "eJztmMtS20wWx9/FVfEmgPp+cZVrimAwEDDhTpiaovqKBbIkJNnYTrGY2cxm3mA28wizmfW8AnmjaQU+IAkk+fLFs3LZrpJa8unu3/mfv+XzoRFXblA2Wn/+0FBpFY/iYlielZWqhmGwYRKn0sZCIx/qJDZnl24SBtfXx+XroyjLdtbWr9bejVWx3bsYHu910wFbedeT1cr47eH+a9Abne4wrWU3lSc7Kp9Gh73TbTs4uoo2mc4He5OdzSw9wEfZSdpR5+324zzDIgnz9KsqL1tRNFE2XiovIxtd9E9Gm729/s5Z5qbn4f5UDVy483JYlG5pGudhyI1j32h9uFlomMKpytlwHQEoFyFaBOIA4hbkLShfA9ACINxfxtMQAmIaXnChUbgyGxbGncX1FwmljFPIUYtpaDWXUHnEGYFIA1d/ATrLjFBCUYoYItwZCrhDjmvmLJEGWIwB1UyHmQaZjX383QWZbDBwaRUWEDLwoZEX8Shs4+y3hf3qVd0jn034kIVBPHBn1SSvI6s8D3OpKs7S6C5bPk7ck1Tb7DpNMmVdsWTj8nJpolLrxkvFMKpPI2q11dJKao3HgHtlmFYWKQwQMQh5YSgX4Sp32HJMOeAhlHTMeS08gz5iTAJqDIvScn3j0p28TdVeNz+YpOAw3rvaX9smZbdTxvEq75wnbxHDm13vJjqVad+vr17tXuCxjQddfJkna1vXb95JeQ0GordxUXaAZsuvcCe8/zSMbfsBYrPeYq3T9oNKm2EzeVbGNYe2qipl+nXGm31V9tvNJB7EVRs0TZZWtQ5qdu0n5F6htTpGIOWKsy+mqsXcvtdysx+uOY2UQCZAIxhq4bihhCptIDTWMuCbA2djdTdHEF4eZFA626wu01F7hJquCoVJJdcKY6uEq+XgiYPSceyQoIpY62oRqaof0lgnqRXt91Xhoqc1+ThJ7SkP09TV11eIsjAKpULEQyG8xNoqbyFnVgAoGFGq3kSoGCG4NwRSQawRWGLHgt689NQhHmLdx/8kqTCnpeHkB9ZeuFFcBq7BBCinAhFMoKRAYH6z8OOmuLc7PlxJponIdS8ayavJ6ca6rrY68bYe7R5nJVwbVLzce905iM7lZNzPT4fVcUK6aHtUoODBP2uKcfS+m6n3W1uTfYuS5PrRFG//CZdsZsbf8kRAFzE4AKxFZAvwLzyRSsyBfNkSieEYUSF5yFuoTE2xJsh7AXnIIufaMGYtxBgRhGxIhNKhVCWFSBrOgYHPWOIL63nJQ0apXcpyl44Hic+KgarKxcz72Liw72FdUkvXWWHzIjNBb3F6PkiWfrvyO432F+z1W0b7h8Pf3CXt7of8c6W87Kl5LX13HZFgBIwCSxAkBjoCnAuWqrGjFCturbDeE6Gh4LiuJWglo1hIRBhl2nkQxWmwVpiOrs47u/FmMUmWe3ZjbTrWx8t6vHqxkhxbv7Ur1jcnhObDxYPrSbprznYXpyunh1tm2eyy4QhNiWcXK93dRbmz7I7A8QjtX33HUV91wCv55k7mn5lqnCZx6r5lqPFAnbtgpRe5O3/WS+8t8LGeOqtry4dbB43aFeaEfx3h5qcfrZOTk/2mKbK8DR6R14Nz3jPi/RzuOe0Z0X4G9pz1bFh/jXpOejakt78ivT0nPRPSW1+R3pqTno1Tf436ZM56Vs8gz8Ce057dE/ZzuOe8/2/PISuNm7/83panYNgA6gNgQsMffsyEMcAyQ7kTQEkBPQZSWGKdIt57K5DTIRXQMuQ9AOB7Lc8371fKo7dVp3s1vdJxr9jp9te7cpRMNzrXtFd2p2eH0+Mj0dne8Mt88ciudi4vi9PNzYsDdrKK1PVPwv6Zrucf6PZ8o1t61+W6a5ZSzAg1SgPjQlTiOXAIUkgVRTSo+Gmz9CHyZ61Sz52TQhogkNKMYUqslho6hQC3iqkve6FPulH3hTUvwlkV4Wc96tt/3f77419v/3v7n49/D0d/qz8f/xE96Zk+dKaRssggiLXHHAJvnSDKh5ojUDlkrQ9vwrzA0IQXMIqFZECPgoao4IyxFzrTPyCVJ51pDpCEiAMIKYJA1j7yiU6jhRYaoQpKFw75zf8AefLpKg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/public?offset=9&limit=1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1364" }, "content": "eJy1VNlu20YU/RcC1otlc1YuAojCihK7TlwntuzKKgpilktzLHExOZJFGf6SviT9In9Sh4rrBG0f+tACBDnLnXvOvecMHz1joWi90S+PniitWZtm1aatFXblFj21BFF6Q69eyaVR6QI6t2i6N/YjuRqTE5gvt9fLT9BONjfn+3J/uvz4U2dOyB07Vg+zRRR3gk3hw+n1rVmo3CK4nZ2t5b1/Gsi6uOjOT6tySq+rWTkRt0nyDWfVLB1Obm3djny/E9octgtf+9PbWlyVBlPgN/MjF1+KAlzk8+/PX9Ln354/48Otqd06bEzmjR6fhp5qQFjQLogggg8QPaBoivEI8xGm+wiNEHLxrdm6PC6CMI6GXgNttWoUpKY/yDgPQo5DMgo4goDHFFOEIVAkZJIEGUMRiSkVGaY0wpzxMKYoBp4xHKJMiSDCmgJwnjmkotImM/9MiLBXQqoqCiitI+BkePTqxqxdGemfxP5rVi99/3/SOxUKU0Bqu7rPLOraYQlrqtL/qlZmlvCd3rp6KJeV0NAcatMuDjtRatgcNiu/n/oozgRTnEKMKHG8BI4ySbHGCgFmIs5orDjGgGIUKUR0DI43i2IcC6JUIP0giBF3I79sT35cwOx9KS6O62lXoitzcT+3P4c32w/z6Vl1t0g/XV6u5ttokY4v33C6eZefz2bHx+VkfPT2XuH5+2B8Js/15sAedW9tgO4C+rBHJ+75YWV08trEQV9ib9Zkb4L2jsjujdP+E493E7Sz7sBVWFet6ZuTCGuFynsbDHLR5slgaQpjEzRQVWl7c/QNTb5r5x551+dw7YMm/Qt+7/DkxeCD3O1xShGTIbCYhQqTTGZcgwyFJkyKELFBAdqIrxjOjbXzRgt6YBflOlmTAVh3ZSUhTmSMIhmEkZYCg9AqECqTmnGGcO8sYXOnba/cyL/MRQP+327rN6T+l/OK1d/LXBAe9OeRkrEMsSOMolhmkoveAKGMgIVO4YxGEYEwEjrAlAWAFMZcoZiwTAoaSpfrJf/ObA5Tczf5FwU0sData643wgEOMepdz7HLHD39OvR2kritoVdlWQtuGD/9AWlcodg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=ZShQzuB9wxJxB%2FwZkKZ9iTLgKjwuDjrsKfAk8Bf7Z3Ci8MdFWwcF3ZKy8QM0fRbbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=nXBcnGlfywGE3yHxGbLhyWcgZG22XrmwOXGeHkW1ZHCiZyPOEghmpEkd72i3XCM1q%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=dl%2Bc5VJ%2FnpElTj8CfKtTCUWD4i8NuZFlxbm%2FnJucDpfqWpepjGfV%2BC%2FuO6IEnz6dq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=1F8lNBhwHOFY6mxVD1v7yHMG1WC%2BhWBYTc2BeIZS8mOyGrKfgGq2RLDFyQAghFXsq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=9pzN8nuTYPCLMcgTsFhvAa4dpczjHmuNrH9YI%2FjgKn8d%2BMEKy2uFjPkSiKk2IHWcq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=3zKPt8AWrN6kC17aLIok37epy26V%2BxtOG%2FSjsyVu2fcle7wvhktMoIUDwIN5QsVZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=maIUF3stzlV7pHfJLuEX3aeq1c1byplh6ethRDF3PnggV2QNz6SwLNniFL2UeK7Pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=HHxs%2BV%2FooOFHqFPxarMNjuWRGnm6CPN9tCxKUS%2B0NvZO6bb9Gn9XOapz%2FUNZMdmVq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=RQxUClzl8pbN%2Fv9qyZIHbtLDiMbvQWos1Fmt7sR%2BDT%2Fg9yxhpZutWl4G2Mvr2iteq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=iyCtP2UB2HeZlzVlQesDxYO%2Bb%2BTlPNyiH2j4GcwXk89ya4TeLJVgikcht0egXMvbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=3zKPt8AWrN6kC17aLIok37epy26V%2BxtOG%2FSjsyVu2fcle7wvhktMoIUDwIN5QsVZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=maIUF3stzlV7pHfJLuEX3aeq1c1byplh6ethRDF3PnggV2QNz6SwLNniFL2UeK7Pq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=HHxs%2BV%2FooOFHqFPxarMNjuWRGnm6CPN9tCxKUS%2B0NvZO6bb9Gn9XOapz%2FUNZMdmVq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=RQxUClzl8pbN%2Fv9qyZIHbtLDiMbvQWos1Fmt7sR%2BDT%2Fg9yxhpZutWl4G2Mvr2iteq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=iyCtP2UB2HeZlzVlQesDxYO%2Bb%2BTlPNyiH2j4GcwXk89ya4TeLJVgikcht0egXMvbq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } } ] ================================================ FILE: tests/recorded/sync/test_get_upload_link_object.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chTGZmto0CZmJKOLdHVf/vbf5H+ULjqpTnjlTp7UNqbo15Kl9Q3T4aiOyfm60m2jWBSnVYpEOGdjv/63ZHZttf4WT8IDEIixj7sim5pDAmTDF2aTbAy2rlVqQfXLyeDkPooxLDsAoZYRA+P0B9WQ0BQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "639" }, "content": "eJy1UcFOxCAU/Jd3tZsFWkrL2U/YizGGUHgobilNYTeazf67b028amL0wpuQYXgzcwGDaULv0YO+QMlbBQ3QQKyYCujHpwbmmCLdCtZADqEgYYKrrS9E9bEc9f7B3tM8YKn7Sod5xmpO65ytN3NcjiZPr+gqydZc7Uzvrw0sNiEJfM/HtxhoMaJvWPJpc2gibQqdlL2SXAktej8EgtwPXgyj97YfpFMcGZNSTYoms9yJTg68G3Eag2AtCt9PrrUOA33iNrT1FgAIJrodUzvOD4zpVuhO3hFgjFgp+xjij7Tf5eJySrhUMlduPaxbPNNK5sv0XzteT9Mc3T/JU1n1fcXPEDa4NXeOJeYFNMmzXqqxl3JkomXXD70OwNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object%2Ftest.txt&overwrite=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "242" }, "content": "eJwtj81ugzAQhN+Fc2PWf9jmKXJIz5VhdwuF2Mg4IlXVdy+RepxvpG80P03eqMQ65/QxY9M3wFJpZIzEeuRB8TBaCRE70NYMQaEDtsEHjmzBhzgY9KQkWgMcOsnNWzMV4tM01brtfds+tjVHpNLJL4HzvojvmJCeIlHtjdH//aXG8km1VaAMOClvoLUyToB04lFR+N0nxTnxcyyHyYe3HnTKx3JZXmLtTOicPNfvVKf8enJ9v52x0n1bY6WTcFx3+v0DrUZLNw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0f123dfdaef3cfb2fbc510ad60354b92d70f5989faf5089ab4d8e21d540f961f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "PUT", "url": "https://uploader61j.disk.yandex.net/upload-target/20240711T033247.017.utd.8s8n2fonfxcrw4ow85803nowk-k61j.3749671", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzEkFABHSA4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0f123dfdaef3cfb2fbc510ad60354b92d70f5989faf5089ab4d8e21d540f961f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_get_upload_link_object&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUEOwiAQAP/CWQuCZaH3xg/4AcouaWNbSFmNxvh3Oc7MYb5iPiiJQczMpQ5SxjU/8RzK0n3CjvTudmL5ukhc6kPmQkfgJe9Vpp5QBZPQJudAKweTN9pEA73XYEC3PClw0fcQbTIE6mqQ0E/W2eStOImNeM7Y3rfx3pBpK2tgaiaFtdLvD3oeMQw=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f5ed0a3fd6f8872087b9323c375927372ed0b078c957c6f3e7043ded9b686f96?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f5ed0a3fd6f8872087b9323c375927372ed0b078c957c6f3e7043ded9b686f96?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_issue7.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_issue7", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwVjUEKwjAQRe8S6E4b1IVQEBGsXqAbVzI0vySYNiEzEUW8u+Pqv/c2/2N8wWQ640Uyd9aOMVW3phzaNy0Or3aB2OfGusAPW8CplhF8zCT+8G/N7tRsLzc6Kw9gURGde2Cu2JuVmSE+OX249oOqYM6RBFomiozvD7NwLV4=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=any%20value%20here&offset=0&limit=500&path=any%20value%20here&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_issue7&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_listdir.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "131" }, "content": "eJwVjcsKwkAMRf8l0J02qLuCiODjB7pxJaFJmcFpZ5ikooj/blzdc87mfiBUGaGDYFa0QxxSXnhNJbZvmlle7SyGzw1y1AdW0bzUQfRQyML+35rdsdlebnRy7kXNxXzuKapxrLCCSSxk9ovruXc1mUoiEy8jJZXvD+tELfk=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0Js2VG8FEUHrD/TiqYRuyi5uu8smFaX478bLzLx3mQ184Qla8KpZWsQxptXtKYf6Q4vjd72w4qtBF+SJhSWtZWQ5Z1J/+rvqeKkO3YOutnsWNVCrIQZRF4qhZQM7mFl9cvZ0v/WGynOOpGxmoij8/QEssDAG" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0JttsN4KIoLWH+jFk4Ruyi5uu8smFYv478bLzLx3mQ/4whN04FWzdIhjTKurKYdmo8Xxu1lY8bVHF+SJhSWtZWQ5ZVJ//LvqcK7a/k4X2wOLGqjVIwZRF4qhZQs7mFl9cvZ0uw6GynOOpGxmoij8/QEs1DAH" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcEKwkAMRP8l0Js2aG8FEUHrD/TiSUI3ZRe33WWTlor478bLzLx3mQ/4wiO04FWztIhDTIvbUw71m2bHWz2z4npAF+SFhSUtZWA5Z1J/+ruquVTH7kFX2z2LGqjVMwZRF4qhZQM7mFh9cvZ0v/WGylOOpGxmpCj8/QEs+DAI" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1529" }, "content": "eJy1k91qGzEQhd9Ft3XwSJrR33UfITclFKOfERX1es3uJqSYfffKJYXmJraJe6NB6OgwR9/oJJZfRxZBlDaJjdjxkLgULiKcRFt4mEV4OolDHN40sov4tdV+vm5EnjguZ7FQoPAB7IOER2kC2qDwC0AA6PqJ5/F5yrxrZyUSGUvSqkAxVeW0IusTOMRckzIoCVyEpJ2VlQpHWy0p6YxDzhJlBrI2euUzduthLK22ix0c4/LjT//zz7D9Fr/2+sjzsl36stu3eenJtm/p8jgMfFh6s/P5EY5Te+kZd39D3DvB8TntW/5P9h3RO7wTv7S5jQcRuj0YDYBIrt+mdfMvZXU1ZbpI2bribM0yRjDGV6VdrsZnbzVZBBulyTEVjzpzjEZKMAmUKzUhl1olXaJMN1NWN1K+Q4KPKH/a/grKJD2ice8p6ztS9r06KJ4ty8qV+0jpiCqDtT7LmmxVSBGgt62oaEyqD2l2kjU6jOTvT1nfSPkOCT6i/Gn7ayhT//oW1u9dOi5xL4LeiH0b2iICAWzEWOvMfQPr+hv/zLPT" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir1&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir2&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir%2Fdir3&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK2UMoWO7I0X8ALTdhqIQBs6Go3x7rL8b/O/ato5qVFNIqWOWoclP+OZytx8aIv8bjYW/TI6zvWhc+GdZM5b1cZ0dLHGk0c2NiSHFh0ADj0GsK6FCDxA6DERd13rvUFMAB4uNg2ujeqkVpYpx+N9u96PFF7LQsKHJFoq//5bNzC0" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/112a941bab8e14cf78487338658c34703d3e63c58fae220bb188f33b394f670d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/112a941bab8e14cf78487338658c34703d3e63c58fae220bb188f33b394f670d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_listdir_fields.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5claEzIYNpEzJTUcS7O67+e2/zPy5WCq5zUbVI5/2U8opbKNy+YUF6tQupf+48sjx8JclrnUhOBTQe/605nJt9f4eL8UCiJmozJhZFrmNgSihu42bSmNGebtfBVGkuCZSsBEhC3x9L2zDP" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02VHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+mfnkeXhK0le60RyLKDx8G/N/tTsrnc4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoRIy3A==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02WHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+ufOI8vDV5K81onkWEDj4d+a/anprnc4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoTYy3Q==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "145" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TjqgydCRlMm5CZiiL+u+PqnnM29+NipeB6F1WL9N5PKa+4hcLtGxakV7uQ+ufOI8vDV5K81onkWEDj4d+a7tTsr3c4Gw8kaqI2Y2JR5DoGpoRi1aRzGzeTxox2eLsMpkpzSaBkJUAS+v4AoVoy3g==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields&limit=500&fields=_embedded.items.name%2C_embedded.items.type%2Ctype%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "158" }, "content": "eJx9yzEKgDAQBdG7/HqLaLDZq4hIJCsEEiNmGwm5uxYWNloOj6mYJS3ivXhwRVBJBTxW6LkLGD4cIGwuPdGh0Sf2f2jRJoJmdRFsCTGkoODBGEJe1yJ3mEbvvV2pBjGI" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_fields&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNjUsOgjAUAO/StdLSD1D2xAt4gUffayACbejTaIx3t4tZzGzmK5aTohjFwpzLKGXY0hOvkNfmAwfSuzmI5auVuJaHTJlO4DUdRVo/hKjaaD0RKqf83NlWm6GvqGEOAbzpO+1I6aC8q81E1NYgIoC2UVzETrwkrO/bdK/KtOcNmGqJsBX6/QFgXzDg" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/498cf01f49eed0509b641238723808bcca937625e02c0958083fd243dddaa24f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/498cf01f49eed0509b641238723808bcca937625e02c0958083fd243dddaa24f?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_listdir_on_file.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chaGZkOA0CZmpKOLdHVf/vbf5HxMbBjOYKFJ5sHamsvot1NS/IXt89RnFPnfWJ37YhlzWNiOfKkg8/lt3OHf78Q4X5QlZVETHUWLxqbmSXUiEZmMWlFi8Xt2uk6rgUgkEtQQgxu8Pf6MxNA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file%2Fzeroes.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "126" }, "content": "eJwtzEEOgyAQQNG7sHdARKicwwvQMApq0cCYVI13b5v0b1/yLxYyDsyyQLQVy/m+LavzmNsJfCwzHC55fENCsko1f67I5RGJSyGVMEL38peBRy1gJw/dsE7xXE4dQlfGpGN4Hc+oHFbz91sb0TZaKnZ/AHHxKJw=" } }, { "method": "PUT", "url": "https://uploader5j.disk.yandex.net/upload-target/20240706T222227.810.utd.9fojizlz6hh9sgn6ihmybi4ae-k5j.17053624", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file%2Fzeroes.txt&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_on_file&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK209A9hb7yAFxg6M4EItKGj0RjvLsv3bd5XTTuxGtQkUuqgdVryE89Q5uYDG9K72Uj0q9U414fOhXaQOW9VR7B96y/YOROYo+k4Bg5jBAZIwSFyYNvHlNBy6qINHoyxI3D06N0I6qRWkinj8b5d70cKrWUBoUMYlkq/P7YSMik=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/6a29148d7305ff607f65f5b6afaac53ddf5f296ccd2fc76254a002baf64d43ba?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/6a29148d7305ff607f65f5b6afaac53ddf5f296ccd2fc76254a002baf64d43ba?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_listdir_with_limits.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVUIzJYNJEzK3PhD/3XF1zzmb+zGh0mQ6E4AinbVjzItfu8Lt282eXu1MsI+N9Sx3W0nyUkeSQ3EI+39rdsdme7m5k3JPAhXoDJEFnuvwZASVxBCzMokQste767lXBaUSHUjL5KLQ9wdblDMF" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2VG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPtorGe520KS1jKSHLNDOPxdtT9Vu+7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwEU1Eg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2WG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPvYWc9yt4UkrWUkOWaHcPi7an+qmu7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwGk1Ew==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "150" }, "content": "eJwVjc0KwjAQhN8l0Js2aG8FEUHrC/TiqYRmSxbTJmSn/iC+u+tp5vvmMB8TCk2mNQHI0lo7xrT6rctcv93i6VUvBPvYWc9yt4UkrWUkOWaHcPi7qjlV++7mztp7EihAY4gs8FyGJyMozAzRSU1jNmYmhOT19XrpFUFzjg6kZnJR6PsDwI01FA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kT1uwzAMhe/CtQ5CS/7VnCNkKYrCkEUKERrFhqWkLQLfvUyQDp26tAtFQR+e3iOvkD9nBgMUFihg4DgyEROYK4TMMYF5ucLJxgdTCsQfwcv7WoBb2OYbDApVtcF2g82+7I1SRpdPiAZR+IXTdF4cD+FGVnXdtHXZCjJW5JuOakc4kqK+U+Q9l8iua2rf9r7T6G2lG0Xcke1Jl06NZHVPWFZepONEwYdfHcw2H+7+05vZPtudnHtOeZulDMeQsiQb3kM+yCWGnLaPpG6KkU9ZjKfbQOYlXCTv8B3or9PM5/EY3D/Jy7p+rHrhS0hhOoEReVS9ln+wqjut11dBp2yPYHQB94kIVMDkfWJpcV2/AGprqT8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kctOwzAQRf9ltqSq42fjdT+hG4RQFNtj1aJuotgtoCr/zqQqC1ZsYOPH+Oj63pkb1M8JwUJIMzTQY3YYAgawN0gVcwH7coPzkB8MJwg/UqT3pQE/41BXGDjjcsPMhulD21nOrWifGLOMET9jGS+zxz6tpFRKG9UabpUPPkomPBct1TT3Sg+t9JJ36DoljTNmp5zjJrKd3nVGU4WHKJR2vkNB0nkMKaZfHUxDPd79lze7fR72tB+w1G2lpT+lUilZ/57qkS451bJ9JPVjzniuZLysDZnmdKW8/Xegv04zXdwp+X+Sp3H9GPWM11TSeAZL8ox3gv5RkhveLq+EjnU4gRUN3DtCUANjjAXX47J8ATl+o98=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "567" }, "content": "eJy1kcFuwyAMht/F16WqQwgknPsIvUzTFEEwKlppokC7TVXefW7VHXbaZbtgwJ9+/b99hfI5ExjwcYEKBkqOvCcP5gqxUMpgXq5wsunBNAzRRwzcXysYF7LlBoNAITeoN6j2dW+EMI14QjSIzC+Up/My0hBvpGxbpdtaC+O0JS1GHaSSnn9aJa3yjXMOLSqhurpGok4iuiCFkrXqOqRAqg861KJn6TT5GOKvDmZbDnf/+c1sn+2O655y2RY+hmPMhZMN77Ec+JFiydtH0nFKiU6FjefbQOYlXjjv8B3or9PMZ3eM4z/J87p+rHqhS8xxOoFheRR9o1uBUmrRra+MTsUewTQV3CfCUAVTCJn4Ktb1C5s7pCg=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_limits&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK20HUoL7I0X8AJDZxqISBs6Go3x7rL8b/O/at45qVHNIqWOWsc1P+mMZWk+uBG/m41Fv6ympd51LryjLHmrmoGd78C5gUIkD76zA2NsjeVge2AwfTsR+WTAGUpTRB9haA3YHrvggjqpB8uc6XhfL7cjhR9lReFDEq6Vf39q5zDU" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/e2e4652449d7cd626519eac301e7182e2083bdd6f0240dfbca6c2930218a5747?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/e2e4652449d7cd626519eac301e7182e2083bdd6f0240dfbca6c2930218a5747?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_listdir_with_max_items.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjUEKwjAQRe8S6E4b1F1BRNB6gW5chaGZksGkCZmpVsS7O67+e2/zPyZUnExngkjhztox5sVvoVD7htnj2s4o9rmznvhhK3Je6oh8KiDh+G/N4dzs+ztclAdkUREdF4nFU3UvkuASrI4EE5uNSSghe328XQdVrSWCoJYJIuP3B/7cNDo=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2VG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPbZWU/8sBU5L3VEPhaQcPizZn9qdtc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sDzZH" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2WG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPa5s574YStyXuqIfCwg4fBnzf7UdNc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sMzZI" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2aG8FEcGfF+jFU1iaLVlMmpDdakV8d9fTzHzfYT4mVJxMb4JI4d7aMebFb6FQ+4bZ49rOKPa5s574YStyXuqIfCwg4fBnTXdq9tc7nLUPyKJDNFwkFk/VvUiCS7A6EkysVmFnNiahhOz1+HYZdKosEQSVTBAZvz9sVzZJ" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir4", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjcsKwjAQRf8l0J02+FgVRAQfP9CNqzA0UzKYNCEz1Yr4746re+85i/sxoeJoOhNECnfWDjHPfg2F2jdMHpd2QrHPjfXED1uR81wH5GMBCYc/a3anZnu9w1l7jyw6RMNFYvFU3YskuASLI8HEahXuzcoklJC9Ht8uvU6VJYKgkhEi4/cHbHs2Sg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir5", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2qHgpiAj+vEAvnsLSbMli0oTsViviu7ueZub7DvMxoeJoOhNECnfWDjHPfg2F2jdMHpd2QrHPjfXED1uR81wH5GMBCYc/a3anZnu9w1l7jyw6RMNFYvFU3YskuASLI8HEahXuzcoklJC9Ht8uvU6VJYKgkhEi4/cHbJ82Sw==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items%2Fdir6", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "153" }, "content": "eJwVjc0KwjAQhN8l0Js2qOChICL48wK9eApLsyWLSROyW62I7+56mpnvO8zHhIqj6UwQKdxZO8Q8+zUUat8weVzaCcU+N9YTP2xFznMdkI8FJBz+rNmdmu31DmftPbLoEA0XicVTdS+S4BIsjgQTq1W4NyuTUEL2eny79DpVlgiCSkaIjN8fbMM2TA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=0&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "70" }, "content": "eJwVxjEKgDAMBdC7/DmDk0OuIiJKfiHQULFZpPTu4pveQL43oTB/IDgYF81o0AFPRoduuyBbnhW6CqqHJ3QRtFI6/875ASfcFp0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgYM635CNlVVIWwGBdXYliFpqsj/XhKli666aTeAxNHVPTNXKJ8LggEfV2jAYurRe/RgrhALpgzm9QqTSw+GVggvMdT/rYFhRVduMDDC2h1ROyIPVBvGDJdPhBhCKr9ink/rgDbeyFYIqQRVzHQhCMmJok4iBtch06gpOtREdNgH2UvOue5pL3Dw1BNNtWpdJxUTQUpeo9PsY4i/NlhcOd7753ezf3HP9T5gLvtSDzvGXKqZ/YjlaJO72Lv3/iE7zCnhVGr3fJvJssZzVbbfTn8ttJz6MQ7/FF839mPbK55jjvMEpsYTprkSstOEtu32VtG5uBGMbGCMKZYKNTCHkLE+ybZ9Afvbp2s=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgYM635CNlVVIWwGBdXYliFpqsj/XhKli666aTeAxNHVPTNXKJ8LggEfV2jAYurRe/RgrhALpgzm9QqTSw+GVggvMdT/rYFhRVduMDDC2h1ROyIPVBvGDJdPhBhCKr9ink/rgDbeyFYIqQRVzHQhCMmJok4iBtch06gpOtREdNgH2UvOue5pL3Dw1BNNtWpdJxUTQUpeo9PsY4i/NlhcOd7753ezf3HP9T5gLvtSDzvGXKqZ/YjlaJO72Lv3/iE7zCnhVGr3fJvJssZzVbbfTn8ttJz6MQ7/FF839mPbK55jjvMEpsYTprkSstOEtu32VtG5uBGMbGCMKZYKNTCHkLE+ybZ9Afvbp2s=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUwDxi1v2EbKqqQtiMlVGNbRmSpor878VRuuiqm3YDSBxd3TNzg/w5I1gItEAFDmOLIWAAewPKGBPY1xuMPj4YUSC8Ul/+1wq6BX3eYBBMyB0zO6aPvLFC2No8MWYZK/yCaTovHTraSKmUNoobYXsp5KERwdS6QaZ16JtacxOC9NJgQDSmPbSq86zxKKU0HRcH3mqvNRfI6xIdp0A9/dpg9vl075/e7f7FP5f7iCnvczncQCkXM/dB+eSiv7q79/4h200x4phL97TNZF7oUpTdt9NfC83ndqDun+LLxn5se8ELJZpGsCWeiaY2yiihGNfrW0Gn7AewuoKBIuUCVTD1fcLtua5flvKmIw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgYM635CNlVVIWwGBdXYliFpqsj/XhKli666aTeAxNHVPTNXKJ8LggEfV2jAYurRe/RgrhALpgzm9QqTSw+GVggvMdT/rYFhRVduMDDC2h1ROyIPVBvGDJdPhBhCKr9ink/rgDbeyFYIqQRVzHQhCMmJok4iBtch06gpOtREdNgH2UvOue5pL3Dw1BNNtWpdJxUTQUpeo9PsY4i/NlhcOd7753ezf3HP9T5gLvtSDzvGXKqZ/YjlaJO72Lv3/iE7zCnhVGr3fJvJssZzVbbfTn8ttJz6MQ7/FF839mPbK55jjvMEpsYTprkSstOEtu32VtG5uBGMbGCMKZYKNTCHkLE+ybZ9Afvbp2s=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUwDxi1v2EbKqqQtiMlVGNbRmSpor878VRuuiqm3YDSBxd3TNzg/w5I1gItEAFDmOLIWAAewPKGBPY1xuMPj4YUSC8Ul/+1wq6BX3eYBBMyB0zO6aPvLFC2No8MWYZK/yCaTovHTraSKmUNoobYXsp5KERwdS6QaZ16JtacxOC9NJgQDSmPbSq86zxKKU0HRcH3mqvNRfI6xIdp0A9/dpg9vl075/e7f7FP5f7iCnvczncQCkXM/dB+eSiv7q79/4h200x4phL97TNZF7oUpTdt9NfC83ndqDun+LLxn5se8ELJZpGsCWeiaY2yiihGNfrW0Gn7AewuoKBIuUCVTD1fcLtua5flvKmIw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUU3tis+wnZVFVlERgUVGNbhqSpIv97cZQuuuqm3fAQR1f3MDconzOCAR8XaKDHdETv0YO5QSyYMpjXG4w2PRheIbzGUN/XBtyCtmwwMMLEjugdUQfaGcYM10+EGEIqv2CezovDPm6kkFJpSTUzzgunghZSUBo6KqxkrF6D1i1xSraUtEhbF7jkSolgO2qRt1yj510rcItOk48h/tpgtuV075/fzf7FPtf9gLnsS136IeZSzfqPWE59stf+7r1/yLopJRxL7Z63P5mXeKnK/bfTXwvN5+MQ3T/F14n9mPaCl5jjNIKp8YR1XEvdMSmUXN8qOhU7gFENDDHFUqEGphAy1iNb1y8bw6Sd" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUHgYM635CNlVVIWwGBdXYliFpqsj/XhKli666aTeAxNHVPTNXKJ8LggEfV2jAYurRe/RgrhALpgzm9QqTSw+GVggvMdT/rYFhRVduMDDC2h1ROyIPVBvGDJdPhBhCKr9ink/rgDbeyFYIqQRVzHQhCMmJok4iBtch06gpOtREdNgH2UvOue5pL3Dw1BNNtWpdJxUTQUpeo9PsY4i/NlhcOd7753ezf3HP9T5gLvtSDzvGXKqZ/YjlaJO72Lv3/iE7zCnhVGr3fJvJssZzVbbfTn8ttJz6MQ7/FF839mPbK55jjvMEpsYTprkSstOEtu32VtG5uBGMbGCMKZYKNTCHkLE+ybZ9Afvbp2s=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=1&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUwDxi1v2EbKqqQtiMlVGNbRmSpor878VRuuiqm3YDSBxd3TNzg/w5I1gItEAFDmOLIWAAewPKGBPY1xuMPj4YUSC8Ul/+1wq6BX3eYBBMyB0zO6aPvLFC2No8MWYZK/yCaTovHTraSKmUNoobYXsp5KERwdS6QaZ16JtacxOC9NJgQDSmPbSq86zxKKU0HRcH3mqvNRfI6xIdp0A9/dpg9vl075/e7f7FP5f7iCnvczncQCkXM/dB+eSiv7q79/4h200x4phL97TNZF7oUpTdt9NfC83ndqDun+LLxn5se8ELJZpGsCWeiaY2yiihGNfrW0Gn7AewuoKBIuUCVTD1fcLtua5flvKmIw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=2&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUU3tis+wnZVFVlERgUVGNbhqSpIv97cZQuuuqm3fAQR1f3MDconzOCAR8XaKDHdETv0YO5QSyYMpjXG4w2PRheIbzGUN/XBtyCtmwwMMLEjugdUQfaGcYM10+EGEIqv2CezovDPm6kkFJpSTUzzgunghZSUBo6KqxkrF6D1i1xSraUtEhbF7jkSolgO2qRt1yj510rcItOk48h/tpgtuV075/fzf7FPtf9gLnsS136IeZSzfqPWE59stf+7r1/yLopJRxL7Z63P5mXeKnK/bfTXwvN5+MQ3T/F14n9mPaCl5jjNIKp8YR1XEvdMSmUXN8qOhU7gFENDDHFUqEGphAy1iNb1y8bw6Sd" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=3&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kctuwyAQRf9ltnUUwGAI635CNlVVIR6Dgmpiy5A0VeR/L4nSRVfdtBtA4ujqnpkr1M8ZQUNIC3RgMDsMAQPoK6SKuYB+vcLR5gfDG4SXFNv/2oFf0NYbDIwwviFyQ4Y93WnGdK+eCNGENH7BMp0WjybdSC7EIAWVTJNBRAzcU6eCE9Q5wSVFFaQlMVDqeR+48DwKoYhHRRTuBu4QI1WSORJbdJ5CiunXBrOth3v/8q63L/a53XssdVvbYcZUajMzH6keTLYXc/fePmT9lDMea+tebjOZl3Ruyubb6a+F5pMbk/+n+LaxH9te8JxKmo6gWzxhu14K1TPG6bC+NXSqdgQ9dDCmnGqDOphiLNie/bp+ASQgqMg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=4&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zrKGAy2WfcI2VRVZWEzKKjGtgxJU0W+eydRuuiqm3YDSDx9/Tdzhfy5EBhwYYUCOoo9OUcOzBVCppjAvF5hsvHBKIboEjz/bwUMK9l8g0GgqHZY71AfytYIYWTzhGgQmV8pzad1oC7cyEopXauyFkZp5xtZoRp6X/q+FL3VlfCIyEjViGZwLfattkit0iidbFBITVrVTjfOcXScXfDh1waLzcd7//Ru9i/2me8DpbzPfHRjSJnNuo+Qj120l+7uvX/IDnOMNGXunm4zWdZwZuXu2+mvhZZTP4bhn+J5Yz+2vdI5pDBPYDgeRStr1dSlQInbG6NztiMYXcAYYsgMFTB7n4if1bZ9AW50pNY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&limit=1&offset=5&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "570" }, "content": "eJy1kUFuwyAQRe8y2zoKxoAN6x4hm6qqEMaDgmpsy5A0VeS7dxKli666aTeAxNPXfzNXKJ8LgoEhrlCBxdTjMOAA5gqxYMpgXq8wufRgFEF4iYH+twr8iq7cYOCMix1rd0wdam04N41+YswwRvyKeT6tHm28kUJK1cq65UR1oXGd4Ki0bHngapCKY+eDkD5gJ/vaBx24VrJvA28bXqu6Z7oLgvXCSYpO8xBD/LXB4srx3j+/m/2Le6b7gLnsCx12jLmQmf2I5WiTu9i79/4h6+eUcCrUPd9msqzxTMr22+mvhZZTP0b/T/G0sR/bXvEcc5wnMBTPuG5aqeuaC6a3N0Ln4kYwqoIxplgIqmAOISM95bZ9ATgppb4=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_listdir_with_max_items&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAQQNG7sNYyQAule+MFvMAIM2ljW0hBozHeXZb/bf5XzAexmMRcay6TlGFNz3jGvHQf3CO9u52qfCkZl/KQKdOBdUl7kcr5AL11PVkY0WAwbCN77bzWAX0wdIdBMVjrYTTRQIjaW2BwihX7QZzERnVOsb2vl1vLSltesVITxrXQ7w9gvTC1" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/179c04674e608a3ac3f6df927922ca9c3eb051f0669083d30cd2960f071f1f95?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/179c04674e608a3ac3f6df927922ca9c3eb051f0669083d30cd2960f071f1f95?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_makedirs_with_scheme.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "144" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiKD1B7pxFYbmloQmTchMfSD+u3F17zmb81ER4pJVnbpdB7VRrmCq4EQyd1qPIa12S9m3b1osXu0C0Y+dtp5nXcBpLSP4lEnc8e+aw7nZ93e61D+ApYLUMZFmWF/YPL04w6NDRK0JYg4kqP2JAuP7AxBEMz0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "325" }, "content": "eJy1jk0KwkAMha8yzMaNWNSd67oXdCMIZehEO2h/mARUxIXtynN4AVFEEdQrpDcyileQkLxAXpJvo8H73OueDh3OB4aSMAfMqL9ySNj/zpraAsbeFeTyTJzDAmI3dWBVIX410VZWe8HYfE6MACkgKVFq5mCdx2jpKIkwTiCFoDAeMmr/tPPTbrAAM43EDTHlfj3Ryn4wGqTgC9ISiBQQzQwEgA985yNfJR8STz7zU/GrruqSb3/ikT8XVe/kx54voiWf6kq6sqW3b+suiaM=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "295" }, "content": "eJytjk0KwkAMha8yzMaNWNSda7sXdCMIZehEO5T+MAkoiAvrynN4AVFEEaxXSG9kKh5BQvICSd6XrQbvC69HeuwwnRhKxgVgTuHGIWH4nXW1BYy9K8kVuWxOS4jd0oFVpeyrhbZyOgrmprWYAVJAUqLMpGCdx2jtKIkwTiCDoDQecur/dPDT4UIr23I7pOBL7gk1A0SzAiHyiZ985rvkS6LmK9eK382hqfjxrwfE+KaavZge+SZa8aU5SFf19O4Dh7F9rQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "279" }, "content": "eJyljU0KwkAMha8yzMaNtOjStd0LuhEKZehEO0h/mAQUxIV15Tm8gCiiCOoV0huZFm8gIXmBvLxvq8H70uuRHjtcTQxl4xKwoGjjkDDqbn1tAVPvKnJlIc5pBalbOLCqEr+KtZXXUTg3bcQMkEKSkeRmBdZ5TNaOsgTTDHIIK+OhoMFPh7FWtuX1SEFHDISWA6JZgpD4xE8+8136JfXmK78Vf5pDU/PjX7AE3lSzl7Aj30RrvjQH2epA776aanfV" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwVjs0KwjAQhN8l0Js2VG8FEcGfF+jFU1maKQltmpDd+oP47q6nmW/mMPMxEeKTM625XTqzMb5gVPAimVtrhzmtbks51G9aHF71ArGPxrrAky3gtJYBfMwk/vDPqv2p2l3vdFbfgUVBVPpIE1wo3D+D+J4HjwjtMhUs0uiuIOaZBPpkpJnx/QEdxzaV" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "164" }, "content": "eJw9jjsKwzAQRO8icJdY2OkMIQTyuYCbVGaxxkjYsoV2nQ8hd8+mSTVvZpr3NhHiF2cacz23ZmN8xqDFiyRurO2nZXVbSqF80ezwLGeIvVfWBR5tBi9r7sGHROL3v63YHYv6cqOTcgsWLaLRRRrhQubuEcR33HtE6JcoY5bqT7UaCGKaSKBOA02MzxdMzznu" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "174" }, "content": "eJw9jssKgzAURP8l4K41qDuhlEIfP+CmK7mYkQSNCbnXPij996YbV3NmZnM+ykNsMKpVt0undsomjLlYkcit1sMcVrOn6Mo3LQavcoHoR6WN40kncFjTAD5GEnv4b0VzKurrnc6ZO7DkIjl6TxOMS9w/ndieBwuP/EVKWKTaqN6oyS4CH2cSZLuRZsb3B51mPUg=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "191" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiQ0aUN2qxbx3V0vnuabGQbmrRKyX5zq1e0yqJ3yBUcxnjlTr7WNy+r2kEO9wezwVc/I+tFoF2jSBWlZi0U6ZmB/+GVVd6ra6x3OwgMSi2ERk2BCFwqZZ2BvyHpMKF2GgjM3f2r/1AlFhNHICi0vZZNzjClHYJS7I0TCzxfrV0Ox" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "397" }, "content": "eJy1jkFqwzAQRa8yaF1i2u6yTvaBZlMIGGFNapHaMtJAG0IXtVc9Ra8QCmpDcZMrjG7UcXBzgyI0X+jPzH87hd47r6ZqZsNmoalcOFtTWLr5sw2ENc2sx4Kc387PjVfKYCi8bci6WsbuGizs2qKBRoZhpYzsmWb3eti3xEAZSckrvUFjfcifLJV5KEqsMGu0l4DrUW9Gvc0eUa9z85e7UtCcmYAc4EgFF3siSBWGoB9QcPidj5A6/uY9f8n9kXPkPnXAp9Sllg//hCiZnxwhvUrKG0fRlj/kM6ZWooXkNDCJD2Ls5X3gHobCURAj9xP18gtWxbLw" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "194" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiS0aUJ2qxbx3V0vnuabGQbmrSKyT0716nYZ1E75gqMYz5yp19rOaXV7yKHeYHH4qhdk/Wi0CzTpgpTWYpGOGdgfflnVnar2eoez8IDEYljERJjQhULmGdgbsh4jSpeh4MLNn9o/dUKwJPZYjAzRciqb/GOMeQZGeTzCTPj5Ar/qRQo=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiODPC/TiKYRkSkKbJmS3ahHf3fU0M98cZj4qgUP2qlP3a682KlQMEgJzoU5rN+XFb22J7Wpnj3c7g/Vzp32kUVdQXqoDnYrlcPyz5nBu9reHvYjvQSyBRUyyI3ysZF6RgyEXkCCdIDjOdZVlRiqTZciXwU6E7w+UhTev" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_with_scheme&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzk0OwiAQQOG7sNYCZcpP98YLeIGhDGljLaSMRmO8u12+1fe+4kE8lyRGcb3cxEnMO+UjZubaRimntTzTGevSfXBL9O42YvnSMi3tLkulHXkpW5O5NzrahD0AEAwqOkXKOe8igc0GtCHVexjA2RBQDzZO5MNE2rjkDYRDZnrUFZmOl4xro98fMP8wXw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f231b6da2444e450b70e07787be46f3413e0284547699a156bce89ce137d8349?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f231b6da2444e450b70e07787be46f3413e0284547699a156bce89ce137d8349?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/f231b6da2444e450b70e07787be46f3413e0284547699a156bce89ce137d8349?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_makedirs_without_scheme.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiKD1BXrxVJZmSkKbJmS3/iC+u+tp5pvLNx8TIT4505jbtTMb4wtGBS+SubF2mNPqtpRD/abF4VUvEPvYWRd4sgWc1jKAT5nEH/9bdThX+/ZOF+0dWBREo480wYXC/TOobpWeB48IFQpinkmgF0aaGd8fszY0lQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "331" }, "content": "eJy1jkGqwkAMhq8yzMaNWNSda90LunkglKET7aDtlElERVxYV57DC4giiqBeIb2RUbzCIyR/IPmTb60hBB90R3cdTvuG0q4HzKm3dEjY+87q2gImwRXkfC6bgwISN3ZgVSH7aqStWDvRn/mcGAJSRFLizEzBuoDxwlHq5xRjkkIGUWEC5NT8aeun7WgGZhyLARLyYTXSyn5IaqTgy9IQjgwQzQSEgQ985yNfJR8STz7zU/Gr2lUl3/4PSV5dVLWVN3u+iJZ8qnbSlQ29eQMpwoxT" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "301" }, "content": "eJytjk0KwkAMha8yzMaNWNRd17oXdCMUytCJdpD+MIkoiAvblefwAqKIIqhXSG9kFI8gIXmBJO/LRoP3hdehHjhcjAylgwIwp+HaIeHwO2trC5h4V5Irctkcl5C4mQOrStlXkbZyGgZT87GYAFJAUuLMLMA6j/HKUVosKcYkhQyC0njIqfvT3k/7kVb2g26Rgi+8I+AMEM0cBMoHvvORr5IPiSef+an41dRNxbc//iDeF9XsxHfPF9GKT00tXdXR2zd3zYBd" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "285" }, "content": "eJytjU0KwkAMha8yzMaNtOiya90LuhEKZehEO0h/mEQUxIV15Tm8gCiiCNYrpDcyikeQkLxAXt630eB96XWkBw4XI0PZoAQsaLh2SDj83rraAqbeVeTKQpzjClI3c2BVJX4VayuvUTg1n4gJIIUkI8nNAqzzmKwcZeWSEkwzyCGsjIeCej/tx1rZD7JDCr7QQIA5IJo5CIyP/OAT36SfUg1fuFH8avdtzfc/sCXzqtqd5B34Klrzud3LVgd6+wZhgnqF" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "157" }, "content": "eJwVjssKwjAQRf8l0J02VHcFEcHHD3TjqgzNLQltmpCZ+kD8d8fVfS3O/ZgI8cmZ1twundkYXzBq8CKZW2uHOa1uSznUb1ocXvUCsY/GusCTLeC0lgF8zCT+8O+q/anaXe90Vt+BRYOo9JEmuFC4fwbFrdLz4BGhc6aCRRpFC2KeSaBnRpoZ3x/OKTft" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "167" }, "content": "eJw9jr0KwzAQg9/FkK2NSboFSin05wWydApHrGCTODG+S38offdel07SJw3S20SIX5xpzPXcmo3xGYOCF0ncWNtPy+q2lEL5otnhWc4Qe6+sCzzaDF7W3IMPicTvf1mxOxb15UYn9S1YFESlizTChczdI+jcKh33HhFaJ8qYpfq7Wk8IYppIoLcGmhifLwqwO0Y=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "177" }, "content": "eJw9jrkKwzAQRP9F4C6xsN0ZQgjk+AE3qcxijZHwJbTrHIT8ezaNq3kzU8x8zATxizO1uV0aszM+oVfjRSLX1nbjsro9xZC/aXZ45TPEPgrrAg82gZc1deBjJPGHf5ZVp6y83ums3IBFjai0Ew1wIXH7DDq3SsudxwStIyXMUmxUblTpHcEURxLowZ5GxvcHaLc+oA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "194" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiQ0bUJ2qxbx3V0vnuabWZaZt5qRfXKqV7fLoHbKFxzFeOZMvdY2ptXtIYd6g8Xhq16Q9aPRLtCkC1Jai0U6ZmB/+GVVd6ra6x3OwgMSi2ERM8OELhQyzyB1KxuyHmeUc4aCCzd/av/UCUWE0cgjWk5lk32Mc47AKItHiISfL82ARQk=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fleaf_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "403" }, "content": "eJy1jsFKAzEQhl9lyFm6qLee23vBXoTCEnanbqi7CclIK+LB3ZNP4SsUIVpkbV9h8kbOltU3kJD5Q/6Z+b8nhd5br6ZqZsJmoalaWNNQWNr5zgTChmbGY0HWP87PjReqxFB448jYRsZuHBZmbbAEJ8OwUqXsmWa3eti3xEAZSclrvcHS+JBvDVX2gfJQVFhj5rSXjMtRr0a9zu5Rr/PyN3qlwJ2xgCzgCAZ/9kSoagxB36EQ8RsfIXX8xXv+lPst58h96oBPqUstH/6PUmI/OEJ6kaBXjqItv8tnTK2kC8xpwBIfxNjL+8A9DIWjUEbuJ+r5B1QPtaA=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "197" }, "content": "eJw9js0KwjAQhN8l0Js2tL0VRAR/XqAXT2FJtiS0aUJ2qxbx3V0vnuabWZaZt4rIPjnVq9tlUDvlC45iPHOmXms7p9XtIYd6g8Xhq16Q9aPRLtCkC1Jai0U6ZmB/+GVVd6ra6x3OwgMSi2ERE2FCFwqZZ5C6lQ1ZjxHlnKHgws2f2j91QrAk9liM/KLlVDaZyBjzDIwyeoSZ8PMFphtGYg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fparent1%2Fparent2%2Fparent3%2Fanother_directory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwVjs0KwjAQhN8l0Js2qLeCiODPC/TiKYRkSkKbJmS3ahHf3fU0M98cZj4qgUP2qlP3a682KlQMEgJzoU5rN+XFb22J7Wpnj3c7g/Vzp32kUVdQXqoDnYrlcPyz5nBu9reHvYjvQSyBRUyyI3ysZF5R5hY25AISpBYKx7muMs5IZbIMuTPYifD9AUemOQc=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme%2Fdirectory&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_makedirs_without_scheme&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzk0OgjAQQOG7dK30B2gLe+IFvMC0Mw1EoA0djcZ4d1m+1fe+YiOeM4pR3Ka7uIj5oHTGzFzqKGVc8xOvUJbmAzvSu9mJ5UtLXOpD5kIH8JL3Kn0KYeiV1UoH1cZE1hsyqotOA0RoyQ+IXa+Mc72O1iTvAtloQKM1mMwpM21lBabzJcFa6fcHaGoxjg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8fbb9506101b03cfe682e204c71aaca3e89dd45027751c62f87be6c2a1d62df2?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8fbb9506101b03cfe682e204c71aaca3e89dd45027751c62f87be6c2a1d62df2?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/8fbb9506101b03cfe682e204c71aaca3e89dd45027751c62f87be6c2a1d62df2?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_mkdir_and_exists.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "140" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxFJbuloQmTchupSL+u+tp5r3DzMf4SpPpjBcp3Fk7xrziHkpo37Agbe1CYl8Hi4FnW4nzWkfiSwHx579rTtfm2D/hpn0gFgXRcGnGUJ1OONoCC5udSSQ+o3497oOiUCoRhNRMEJm+P7RRMaY=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjc0KwjAQhN9loTdtqN4KIoI/L9CLp7A0WxKaNCG7lYr47q6nme87zHzAV5qgBy9SuDdmjHl1eyyhfePiaGsXEvPqjAs8m0qc1zoSnwuKP/1dc7w0h/sTr9oHYlEQDZtmF6rVCUtbYGH1KjrYQSLx2enl4zYoCqUSUUjNhJHp+wMPeDOz" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwVjc0KwjAQhN8l0Jt2sd4KIoI/L9CLp7A0WxKaNCG7lYr47q6nme87zHyMrzSZ3niRwj3AGPPq9lhC+8bF0dYuJPA6gAs8QyXOax2JzwXFn/6uOV6a7v7Eq/aBWBREw6bZhWp1wtIWWFi9is7sTCLx2enl4zYoCqUSUUjNhJHp+wMPnDO0" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_mkdir_and_exists&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_move.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwVjEEKwjAQRe8S6E4btLuCiKD1At10JUPzS4pJEzLTooh3d1z9997if4wvmExrvEjm1toxpNXtKc/1mxaHV71A7HawbuanLeC0lhF8ziT+9G9Vc6mO3UBX5R4sKqLziGmD2ZkI8cnp//3WqwpiDiTQMlFgfH9YkCy1" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02VHcFEcHHD3TjSobmlgSTJmSmRRH/3XF1zzmb+zG+YjK98SKFe2vHmBe3pRLaN80Or3aG2LWzLvDTVnBe6gg+FhJ/+Ldmf2p21zudlQewqIjOI+UVyi7UzmxMgvjs9OZ2GVQFqUQSaJkoMr4/kREuwg==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/move?from=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir1&path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir2&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "135" }, "content": "eJwVjcsKwjAQRf8l0J02WHcFEcHHD3TjSobmlgSTJmSmRRH/3XF1zzmb+zG+YjK98SKFe2vHmBe3pRLaN80Or3aG2HVnXeCnreC81BF8LCT+8G/N/tR01zudlQewqIjOI+UVyi7UzmxMgvjs9OZ2GVQFqUQSaJkoMr4/kTUuww==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_move&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAURdG9MNYCLYXSuXEDbuCX90kbayEFjca4dzu8Z3K/Yt45ilHMteYyShnW9MSZ8tJ8aAO/m42rfGmJpdxlyrxTXdJWZMAUHZkWzinfeXiEKbQ6eA/TGxsH3Tm4yLCKMQxKO6NaY3uA/EQ2iJN4cJ0Tjvf1cjuy8iOvVPmQSGvh3x+3kDHk" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/cdbf7a42d770939d9dcbc21c99d4546f8137d7fed60ed88017402465dda9ba6c?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/cdbf7a42d770939d9dcbc21c99d4546f8137d7fed60ed88017402465dda9ba6c?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_none_args.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/4deb67f875582dfa8dd53c5d3b72e8fb49ce7cc1502765175dc3af1183a575b6/668ddef2/nsHIkeXKnaRGpTyn0UiRqaUl8Jt3QPRPLeFAjvpBi81sWp-27VfwQ64jjvznGt8kNwE-ofj0cgVKPtPiYwpOA==?uid=455675172&filename=CsVGRa8itZzMzH19HCCF4ceXpFpwJAUHpCRAqGOb4O6I59R-oDeDyKMqTq8daIAvY89CJ64noQqRebmQ3C08d8%3D&disposition=attachment&hash=&limit=0&contenttype=application%2Foctet-stream&owneruid=455675172&fsize=72&hid=3e96286ac2b9f0703688be31e7dd0843&media_type=data&tknv=v2&etag=747ce618999f04e43b6435ab69d7108a", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 410, "headers": { "content-type": "text/html", "content-length": "177" }, "content": "eJyzySjJzbHj5bLJSE1MsbMpySzJSbUzNTBQ8MwrSS3KS8xRCE4tKkstUnAtKsovstGHKLDRBysHakvKT6kE0cmpIPV2NhmG+HQDZW30oUpBdgI1QHl56Zl5FfqGeoYWegbISvRhFuhDHQoAD8A4Lg==" } } ] ================================================ FILE: tests/recorded/sync/test_operation_error_triggers_retry.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxFYbmtgm2TZiZikX8d+PqnnM292MCozeNCapZGmu7MS1+SznWK80e73qG2tfO+ihPy5C0cAc5ZdJw/LfqcK72twddCrcQLaJlXMpg0phmB+bETjkOA1gcQ3k1GzNBQ/Ll+X5tiyqmPJKilJ5GwfcHzvU3sw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFEOwiAMANC78L9SC+jcObwAShWdYVvpVGK8uzHx+yXvbbLw2Qwmq851sHad71NMLEQTpGsdocWS+AWFdfDe/b3TKBdWS0gBCd0BMfQBIWwdrJrgiI9a4pKf7SR7JtYSfMs3kW78xeQ2O+o9ms8XuncpHw==" } }, { "method": "PUT", "url": "https://uploader22o.disk.yandex.net/upload-target/20250203T005850.563.utd.b0vsnaqhwycr9e2etn54yhjrr-k22o.23172840", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUhJLEkEABG+A3s=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK30h6Ew7I0X8AJDOw1EpA0djcZ4d1m+b/O+at45qVHNIqWOWoc1P+OZytJ8aIv8bjYW/bI6LvWuc+GdZMlb1Q4cDoY6j95ZDgzO+zRxS25wJnAP2HoLiAN0CRkmMNAFDGT64EM7WXVSD5Y5x+N9vdyOFH6UlYQPSbRW/v0BSEUwiw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/242980a569621ece4266fbe3a2820ce749361499845f9e4b4045c9ca07c6c3b1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/242980a569621ece4266fbe3a2820ce749361499845f9e4b4045c9ca07c6c3b1?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgjAURuG9dKz0QQvCnLgBN3Dt/QlEoA29Go1x7zI83+R81bRjVL2aRHLptY5LevKZ8lx9aGO8qw2iX1bzXB46Zewkc9qK7phNjJHhGGQ8rKsjLncbAo3GwLSNdXDwwXm2MC4EH5q6BtnWdBatOqkVMiU+3tfhdqRgzQsJDhlpKfj9AavhMUw=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/9dd0cccde2dea04e123ce8b155af00e07612e2e4524d1e025545633ea17091e7?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/9dd0cccde2dea04e123ce8b155af00e07612e2e4524d1e025545633ea17091e7?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/copy?from=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Ftest_file.txt&path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&overwrite=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgjAQQNG7dK0UaMdS9sYLeIGhMw1EoA0djcZ4d7v8b/O/aj44qlHNIrmMWoc1PemMeWk+uBO/m51FvzpNS3nolPlAWdJetKPJdWQ7sN6iA0seDFmPFFuqMrXoOXCwFzCA3jlygdvgqe8HA2EAdVIby5yovm/Xe03hLa8oXCXiWvj3B5Y7MYU=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7db71d415494a754d953d49adf0d94ab0a9ecec46535a977d7ce0c9d22835c85?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7db71d415494a754d953d49adf0d94ab0a9ecec46535a977d7ce0c9d22835c85?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry%2Fcopy.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_operation_error_triggers_retry&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OwiAQQOG7sNZSftqB7o0X8AIwDGljLaSMRmO8u12+b/O+Yt4pi0nMzLVNUuJanukc6tJ9wpbo3W3E8qVkWtpdlkp74KVsTYJ3oHuPuY85Db0ZlM4jOp9UjgYtRBvJa3I4OACLCAR2NG40SlMEBeIkHsRzScf7erkdyfSoa2A6JIe10e8PeMkw/w==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7987209cf0bfd503512f6c89d1fb3c47b4be92e8c58774cc7e746386312eb717?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7987209cf0bfd503512f6c89d1fb3c47b4be92e8c58774cc7e746386312eb717?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_patch.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "129" }, "content": "eJwVjc0KwkAMhN8l0Js2qLeCiODPC/TiScJuSorb7rJJRRHf3Xia+T4G5gNSeYAOxKxohxhSXuKayti+aY78amc2fG4wjvrAypqXGlgPhUz2f9fsjs32cqOT957VHMzj7oMgsIKJTXL0g+u5dzSeSiJjNwMl5e8PhkItDg==" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFYqSS0ugYlVAkWUPNVzFRIVyhJzSlMVlWprAVjPFBg=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "537" }, "content": "eJy1kTFPwzAQhf9K8cJAq56d5BJ7ZmHvwhS59lW1aGLLcSKqqv+da4GBiQUkSyed3t377vkiRjuQMKLQVPpkizuKtaD3cBDmcl2LTFOcs6M+eBbVTYNtI1tlsNJaEbRa6xobqSxWeKi6RgOi9tgp0ug1dqzV1KpO7r13yqoKO4u+IjZx81Ti0KccE+USaGLHL4zP1pkdXx6HlV0t9jTTg2Ael8kWurEoUPUG2o2UO9kZUAbwCcAA8Ooh+nAIv8r43CNLfJjezPbVPnPdsf/2RxYuDgONhQO4A6YcFibov4P561TSvD8F90/rOcByTnS/OYvb7y5hCnEUhkeAn1YIVY2yvn4AIaeY7A==" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFbKK81NSi0CMk2MamsBDR8NYw==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "549" }, "content": "eJy1kTFvwyAQhf9KytKhiYKxfRjmLt2zdLIwnBXUYCPAVqMo/72XtB06dWklJCT0Hu+7dxc2mYBMs4K59NEUe2Rbhu9+ZPpy3bKEeV6Sxd47EjVtC7KtpNBQKyWQS6VUA20lDNQw1l2rOIBy0AlU4BR0pFUoRVcNzllhRA2dAVcjhdgllzn0Mc0RU/GYKfEL4/PpTIkvj2FjNqs5LfhAnmkJAyamG0FsNqEpeOMSXDQ7LndVdag6zYXm8MS55pwsYXZ+9L/KaPQjSZzPb3r/ap7pPhDL/kcvdg4Bp0Jl3GFj8isR9N8l/XVDcRlO3v7T91RgOUe8z5zYbdOrz36emCYLp6MEQKskNNcPzwecmA==" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVkouLS7Jz40vKMovSC0qyUwtVrJSqFYqSS0ugYlVAkXySnNydBSU8kpzk1KLoPzaWgDlExcB", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "509" }, "content": "eJy1kc1qwzAMgN/F17XUdhL557xH6GWn4NoKNUtiYztlI/Tdpw422GG3DQQ66NPPh3a2ugWZZQ1rG7Nr/soODN/ixOx+P7CCNW3F4xgDQf0wgBqEkhY6YyRyZYzpYRDSQQdTpwfDAUwALdFAMKCJNaikFpcQvHSyA+0gdEhL/FZbWsZcUsbSIlZm122eqVDQNXzsk1z2R66OQpyFtlxaDk+cW86pfUkhTvEXTH1jpHQlJMT6ak8v7pnymVRPP3x9WhZcG0nSETvLJd7ogvFL/q/N83aZo/+n8fS09p7x07mwxwdvsca0MkstnMJIJcVAE+4fhJCPlA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_patch&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_permanent_remove.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "140" }, "content": "eJwVjUsKwkAQBe8ykJ1mUHcBEcHPBbJxFZrMCxOcH9OdoIh3t129qtq8j/EVk+mMFyncWTuGvLgtlbl9U3J4tQli1511Mz9tBeeljuBTIfHHf2sO52Z/e9BFuQeLiugMBTVSQpKhIuYVZmMixGenX/drryqIJZBAy0SB8f0Bt5YxtQ==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "146" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVYbmlgSbB5lpUcR/d1zdc87mfoyvmExnvEjhztpxzovbUgntm5LDq00Qu+6sC/y0FZyXOoJPhcQf/605nJv97UEX5R4sKqIzFNRICUmGiphXaHehmo2JEJ+dPt6vvaoglpkEWiaaGd8f5AUzkQ==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove%2Fdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "72" }, "content": "eJwNxzEKgDAMBdC7/DlDFpdcRUSUpBBoqNgsUnp3u703kN9jEKi/IJwWt6maQgY8LTpkPwjZ8qoQJlQPT8jGy62Ubis85w9RhBb8" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_permanent_remove&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_public_listdir.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "138" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TTVRmTKRlMm5CZiCL+u+Pq3nM252MWlJC86c3tMpiNCQVnhSCSubfWxVT9FjK1b1g9vtoVxT531hM/bEFOtTjkYwYJh79rulOzv45w1j8gi4LoTLneI7kpEounoh3BJUcQ1PIMkfH7A93CMNc=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "768" }, "content": "eJy1Ul1v0zAU/S9+XUccu86Hpb2MCUEHDI12DBCKnPgmtRLHqe1Gzab+d5wOtkckBC/2PdfH95577Ec0CL9FHEnlWh59FVdhX4PzkQ9LMezLTlVFp5yXykZPEC2QnwY4XbIB9ELP4PmwsiA8yJAimLBznJzHyTqmHBMe0zOMOcaBpY1Utfoj7ZeCFqaZ+CZ//8BuWjmu3Oawv9u+dtsP7X2/ucZyg7sGdjB+oWXbHrJmx/Tt5eA+2ebtxzN7jcfD9G0XrZJy0LfTzcr0a3pn7vsr0VxcvPTZ2y702Xo/OB5Fk5DqlWsjGe3eFZdaE2DwefJN4BegS5By1v/4dx52SiuPOMELZOraQYhD6IwNAZo9Nl50p5zyoB3i338cF8iCM3tbQaFm55aMJSmLU8IrVkss4ipjS5JKIBlITMokE6TCeZLiLK9YRRORhRFYKSqJUxGXNA94yfKsRHPpUTllesTjlGGcZjmlabwkOQ1varSG3oeu7jTw00y/xfxrJYNVY/hC/6l+cBEOqg5zHI8/AYjB7HY=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Ffirst.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwtzEsOgyAQANC7sHeA4aPlHF4AhWqDQQtDo2l69y7a/ct7s7XEO3NsJTqq47wd2+5DLBLTtkB41ASXzyGekCM5rdVfdOTLEomjQCOstKO0AqUF1AYaBZjU8xVOmowtVefB7/M84FWa79Kv7rG/KcE+XxZeKeE=" } }, { "method": "PUT", "url": "https://uploader12klg.disk.yandex.net/upload-target/20250616T160216.245.utd.b3qvdxtb56rs4n8aocc82yrua-k12klg.727930", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Ffirst.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwljssKwjAURP8l0J0mqLuCiODjB7pxVWJzQ4JpE3KnUhH/3Suu5szZzLzVSAjZqVZdz51aqVDJSwlA4daYIeXZrW2J+mUnR4ueCOa5MS7yw1TiPNeB+FAswv7nmt2x2V5u9iTcEUMKJPoy31Mc+hQZLlaxfyHgY2VoLJBx0FiSBckdbxPT5wsrwThG" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fsecond.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "127" }, "content": "eJwtzEsKwyAQANC7uI+OxozRc/QCiqZpUhI/E7CU3r0Uun7w3mytaWGOrUS5OSGu/Dx9TBVh4/HRdv7yR0ydH4mc1uPfB/L1nkgoUBOgxJtEUHLmagR+UeQhhK1gsdZE05epdI255nYO++9VYOyMaNnnC3f1KBs=" } }, { "method": "PUT", "url": "https://uploader60j.disk.yandex.net/upload-target/20250616T160218.230.utd.bbbjq6q997d7xf5qx46prpso-k60j.20798669", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fsecond.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "160" }, "content": "eJwljs0KwjAQhN8l0JsmqLeCiODPC/TiqazJlgTTJGQ3UhHf3RVP8813mXmrGdlnp3p1PQ9qpXzFSYpnLtQbY2Nubg0l6Bckh4tOyOa5MS7Qw1Sk3KpFOhRgv/+5bnfstpcbnIQHJJbCEmNp9xjsGAOxC1XsXwgQ2pyc5oVlnXEuERjlzwSR8PMFY484mg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fthird.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwtzEsOgyAUAMC7sBd4VPmdwwsQQWwhSOGZaJvevYt2P5k32VpYiSUbYu2WsaPm3fnQlE45Un/viV6u+HDSEtCO4+0vBnQtBmSCi4lLkDNILsBQDYoe6KnBZ1lfISufHovbl4i9TqfBa0i/WnHQI5DPFzIMKrU=" } }, { "method": "PUT", "url": "https://uploader78klg.disk.yandex.net/upload-target/20250616T160219.817.utd.9tqnfzel7dkjcaocgtsp5x9ty-k78klg.701841", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic%2Fthird.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "159" }, "content": "eJwljsEKwjAQRP8l0JsmqLeCiKD1B3rxVGKyJYtpE7IbqYj/7hZPM/PmMPNRE3BIXrXqdu3VRoUCo4TAnKk1xsVU/dZm1G87e1j0DGxeO+ORnqYApVoc0ClbDseVNYdzs+/u9iK+B2IJLDLk+ojohojEHovQP1jrgMVrXljGGaYcLYPcGW0k+P4AKp44OQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=500&sort=modified&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "3976" }, "content": "eJzNlmlPG0kQhv/LSPGXAO77sGStEnJgzgRswma1Qn1U2xPbYzMzNoYo/31rWBLYKAFyrSLNh+lRT3VX9fs+1e+z+mIOWSeLeZmtZacw9RAjxKzzPpulVEGddchaNsmnOb5Jgu/1rHaTrMPXsryGaZV1/nqfzV09wiDtlJdVvVGvaox1HTjlE8BR4ab/jm4mhBJc3SyVMcLkOlHrVPUp7xDWoeoxIR1CcNZ0FvOU3zutyi8xPpX4Qz6F0+vFa1jV7fnE5UUTKUr8BImopFWS3AluVABnbATJo7eWenBNrJFjUuFcxyKA0N4ppoxlMjqrtSTOa8G8S0onwoAlL0UAxqOwNnmlnPSEMWYJx1jzhZ/k4XQMF00CL+zupTwYx+V2NVgtjkeb1WhvfFIMdkgckMkQzmD5hvvxeGWGZ3J6+HRevSqHW/uPyx2yXF28PWtvKz+fHl4cbM+KPj+enRTP3LDbvVlnUeLRZKO6nleddvvCxXyjGrdju/d6/2DE+mF0tDNmr5tiQMzdxzLFWVhMoWgOpYRqtigDnOZNxYWUSkuqWcdaiIK6SGli0UKToQdrXOBaeiyjd5JQR7mwjERNQzKSGxdJFIGpyMRV6GVe5bMCjwmLSLSx+K8VlmjUwmzabABXrRrpXWfzcTM/eyfzMl+i9H5R/A9rGazyhHngmyvqfJmXi+q0ql29wOyyMAHX6PHKGTeHFWfnxWTmIpQbMa/GGxeuiLDaKBftZtjmQXIfOaqQGJDBcW8DCEYJoQLF6Rj13lB88QlSAkeY45om5ZWMIIJpKyOJABrbRbXVG8PJTuEOX877FwUZ5IdnJ0912s3PisMd2fd/bo0uN+H5OAx6ZO9cbg1G4sl6bz7LRd9Evnxe1U98NRjzlztVjx2E3d2lGD7iz/D5Y5HHLmk1qTWO737yewuTmM+qvEYBdF1duzBqDrw1ctWo27riC/4XZkXdyKDRZbcx7yP24sq+LSwOlKfX0Ruzd6lsjXCo0J+aCGlYUEyawKRkwUlLo6feRte6UXr3o85b9bhYdpe8BTXa5wFEWOZwXp2G2aJoePhh7YZ4FeCe413I+8+Mu5hnHsY88xnzGL+XeYkrwNyAC+85EUQETNUIlhi1AhjcZp7GsZVaKeqFxGoGQSNhJnjNeUouMa9DhMSSE4xw7RNWWUglYozGUwm/D/MkeTsoD4+398148Pr8O5gnqYhoGMUsAOqLEGGDMARCdJpBCgw/YZEIIxTBIJJIUXCKFSHeEB/hy8yzTGlFv415P2EndzLvh+P/GuYh0UzSllmPQiSCB2ukp8Q4LU3Tf63iyroUOXMkIXo5IzoGoFKBB0H8Pcx7Y9+evdsZXqrhZnnWO1p51x8Yt/dqBnsnR+NptS2e9XqrFRwmmGwepXdb575Yri8LIC8rF175rzDvxvA/H3qMX0HPO2YdIKB8JEaD8lQL6xyeYHA6WLgfeg9AwtehV4/y8k7m3Z5wB/IYeRDybk27Rh67F3kBG3dEpjsVuBLYF63XEtNlELBR6HAbeVEbgS0AR3hzE1wHDvhFkWRto3dpTeAJjDaJYGvgSWqwMQiLnYc4beXvg7zJc7bc26+2z14cP9sbfgfyAkcSEIPmZuDximM1NYzGpABvHcJpvFe4QBP2VuwNXnKdOEFvGpp0MJrSLyJPUKkJUuWbkPcTdnIn8n44/i9CnnBAmUDZsURwGz5wKblIQIAjlqP1MhKKd1GGdpXKYkcOlGrKnRYQ+H3IGxxM+7t5sd0f0sM3u4O9lX16utp887buTbaKunzn2RO99XJ4sv9UEXPhX/OjlPb6K++TVc/XXzz5CvI++f0XEI9dEc/YxBQoIRQPUTAQeEfnePEQFIJ20d9PvAcQ4TPi/f1/+frDh38A0cXQgA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Ffirst.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Ffirst.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "505" }, "content": "eJxFkduOmzAURf8lUnhrMDY2MBKqkrklIdNUKEzTvoyMbWILMBc7DKTqv5dpK1U6L+c8bK191s+F7EWxuFtIa1tz57q8eddVQ7noV1yZcjVRzcW46q/ux+pCRnzPy6OcBjmmJAoQKjD3AigIhBxEoOAQQMRFiBEKKfCY5zEQEBRRQrjALgkx8IUnXG22u1KcE03T5/Y0aZCptDtvguKgOp0m+JR/38rbvXgsWbYDL+94m0l//WnXNso/hRwNj8auc5OV6DkxO3hkh8PgX5boYZ7PV8Vj4BSqEprWIi5Ub+zKjtaZS7SNUVY1OqbWUiZroa0jqZExfIoON3ws+bA32Xh9lfdGvpRnnSWAZ6C6iE4M31BelmN46XCdblrztb9svyzhpk/AME4/OndP8rZOp+O+0Sf02pz1A/3HtERr9z9HpWplZ0TWaDsDvNmpFbEVo13Cp7aiSjuzB9G/fRTxMSYBnn/sFEbdROxhR85n4gd5AHwczk4gDhnEGDKKI4/nsyBOnVpwRf8m84Zd/xS1pR7iAS1+/QYSrqbv" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/2c6411b9ba7b5a69733f5d172e622d090fd2023de85338a01c11c07639a66de5/68504e1e/nsHIkeXKnaRGpTyn0UiRqXB7fLiqnRK5TbYHhzCeEkcUI0Mw5HUh4A-Ipoi4T8d3vEstAbsUk3GKsI2OcLLv4g==?uid=0&filename=first.txt&disposition=attachment&hash=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Ffirst.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=15&hid=647b704582c6258c2552ca591db1b9da&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "15" }, "content": "eJxLrUjMLchJVUjOzytJzSsBAC/sBgg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Fsecond.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Fsecond.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "507" }, "content": "eJxNkctu2zAQRf/FgLWrRVEiJQYQisZG4kfdGH4kRjYBKY4kRhL1IK3ILvrvVdouCsxm7uLinJmfk7yDdHI3ya1tzJ3ryvpDlzWX0M2kMsXsyrWEYdZd3M/VlZQLliSCpShMcQhEksgjOJIpixIcBNjHRCLGGRKChNyTns8pDUjIkpBSyl0aERSAl7raLFcFnDea7x+b41Wjk9q3L+y1fd9kN5rNu3Z1GAQ/niK+3dWwPR+KyqyDxWo1DLBPoZwf0vflh9D9l14DejQ82Yls6i/G+XpRMkZOqkrQvILYQFJrObODdUaLpjbKqlrH3Fqe5BVo6+Tc5DF+YN9v5KmQ/dqchstzPjf5tjjr0wbJEyozaKF/8UVRDFHWkmp/35hdly1/TPF9t0H9cH1t3TUVTbW/Pq1rffSf67Ne8H9QU/+b+x9IqSplR8gxsCPBm702EFsY7BQ/NCVX2hk/Ad3bp0pACA2JF2InNeoGMfadfIwFx4yDFExIFIVAhRcGjI9HpwkPEwZOBVLxv82yTi5/TG2h+7j3J79+Aw9Kq1w=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/d6ab9ccb9f07f27e5d581528df98c2442325d09a90bb57a1d13a664579c7666a/68504e1f/nsHIkeXKnaRGpTyn0UiRqW9ZqjKgz6gCrqISxbaTU8aMPoeMXSkmsJ4DIIxxeRfelCSfjHwbnv-vne0GsacPbg==?uid=0&filename=second.txt&disposition=attachment&hash=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Fsecond.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=23&hid=ba29aedb9bd087e6b1749aa1d6ca7c9e&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "23" }, "content": "eJwrycgsVgCikoxUheLU5Py8FIW0zJxUAGVuCHI=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&path=%2Fthird.txt&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "15" }, "content": "eJyrViqpLEhVslJKy8xJVaoFAClzBR0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&path=%2Fthird.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "505" }, "content": "eJxFkW9vmzAQh79LpPBuwRhsoBKaknZpmj/NxqCJ+iYy+AweYAg4FDrtu49ukybdm7ufdHqeu5+zvAUxu5vlWjfdnWny+k2VNePQLrjsisXIFIdh0d7Mj9b0uQ+ECMS5JTyXAicJIRQTNyE+saY09VNB3RQ4TogAQMwGTFPXxuAC9sCkHkEOYGSqbvNUwHmnWPjYRKNCsQyv8bGK9lJto8wKT/v4MPiry3B/etVP5Ubp9keCl+7mMTs/ryjyxuSb/V2IQzQkifDpl0/rZTa3H6b6fJM8QIaQJShWQaBz2fKFHrQxSTR1J7WsVcC0ZmlegdJGzro8wGt//06OBe+3XTzcXvL7Lj8UZxXvEI9RmcEV+pOdFMXgZVdShaum+9pmm+c5XrU71A/j69Xc0qSpwvG4rVVkv9Rn9cD+Mc3tpfmfo5SV1BNiWis9AVz02EyYMOg5Xjclk8qY/gDt5UPEmS7sEsvFhujkOwQYG/k09nyBKVDHoXbKHQwOdyzbd4hjQeoynhgVcMn+buZ1evsjqgvVB709+/UbQqyoVA==" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/9d9e55f0dd1f876ed5b556257b59519d9c9cf67ced2b5fee0a3e26c732e7e28e/68504e20/nsHIkeXKnaRGpTyn0UiRqUOmTLinJTg1RWLUMx9B_xCWZtIlHntrjb2A7HGgXNB608ybQ3SffMTxbbf96E-FAg==?uid=0&filename=third.txt&disposition=attachment&hash=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D%3A%2Fthird.txt&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=22&hid=89f26e64463cd42e4d41394541ec7adb&media_type=document&tknv=v3", "headers": { "connection": "keep-alive" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "22" }, "content": "eJwrycgsVgCikoxUIM4sSlFIy8xJBQBc9ggR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir%2Fpublic", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "147" }, "content": "eJwljsEKwjAQRP8l0Js2qLeCiKD1B3rxVNZkSxbTJmQ3ooj/7oqnmfcuM28zo4TkTWcu58GsTCg4KQSRzJ21Lqbq15CpfcHi8dkuKPaxsZ74bgtyqsUhHzJI2P9cszs22/4KJ+0DsiiIxpjrLZIbI7F4Kmr/QgcF5xxBUC9MEBk/X6GcM/M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=2F9Lz5OkdvJsUxuVhCshMkXnUK0dU0lgeqevW3bkkx8gq5mRBpsPrgHN%2BrK0vxyZq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_listdir&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzk0OgjAQQOG7dK10Sn+g7IkX8AJDZxqIQBtajcZ4d1m+1fe+YuM6JxKDuI13cRHzwfGMudZcBinDmp50xbw0H9yJ383OVb6UpKU8ZMp8YF3SXiQF5gDQ6eAdaCTbeYDJOG9N7wDt1PYQWVHnJw1WGYutU9GhMr512ttTrrzlFSufLxHXwr8/QQIwSA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dceec0073c9603ad57900b46954860a5b280fe1d79b305145a261f6a14926395?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dceec0073c9603ad57900b46954860a5b280fe1d79b305145a261f6a14926395?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dceec0073c9603ad57900b46954860a5b280fe1d79b305145a261f6a14926395?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_public_settings.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "309" }, "content": "eJyVjcFKAzEQhl9lyFnae8/tvWAvQqGsu2Md1E1IRlDEg7snn8JXKEK0yNq+wuSN/LfoA0iYyZDJ/31PjmP00c3cXNLNstLrpZdW08ovHiQptzqXyLX6+Lg4fTxzDac6SlDxLWLngWu5Em4oIExr14Azm15UI2/FSaeKtgn3l7dSbxKrSrtNa0fh5CH1xL8mav5UE2juOKVqy1DYmx2o9PZlO/tEfeMcbCg92bH0pbP9P7TgfFim8oLkq2Xcnb3jMZcOONCPowd7wmKHeW8Djc0ytNmGiXv+AcSZkZg=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4btLuCiKD1At10VcZkaoJpEjITUcS7O67+f2/zPmpFdsmqXl0vo9ooV3ARcMyZeq1NSNVuIfv2DdHiq43I+rnT1tNDF6RUi0E6ZmB3+LumOzX7YYKz/BGJBVhmzvUWvJkJmX28k4QY1xyAUdILBMLvDxFuMU0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "770" }, "content": "eJy1kt2O0zAQhd/Ft+3iv8ROLO3F7lagVqKIpZQWhCrHdrqmcRxit0tY9d1xCogrhJDgxp6xP52ZOfYT6GR8AAJoGw4CbuUs7SsTIoxp2XXHqrFqF0yMtt0HMAVx6MwF71PSSjcmv0FVb2Q0OgEEkfwKsSvMVhgLQgTBE4QEQolyXtva/hH7IX8wQwJD8bhYb3QVPlVxWQ138fYO+ZuvzcvNZH6bQT15v5q/eD13p5ulfW6hLCa4braSou3m3duMLT/DBas6dz+8Wvh2Rdd+087k/vr6V51j36Q6DzF2QUA4SG2fhQPUUOn5fnaPDsMbd1w/Jn5nXGW0Hvt/+lsvG+tsBIKgKfB1nS6ASGHwfQrA6LWPsrmc2WhcAOLDx/MU9Cb4Y6/Mzo6eZXnOeI45EZpWmnHFuKR1WWKkKNaGsgwTnhmKs6xUJi9qznSRK1YXisoKI1RLyiVjqgSj9MkG61sgMM8R4pyhEiHCcpxe0ztn2piqhsuo36f52cy/7qTr7Sl9nv+kn1w0X2yd5jifvwHASeqs" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVipILC4uzy9KUbJSUDI0MjZRqgUAR9IGGA==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/download?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FcdIgDR0kySmuVw&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 403, "headers": { "content-type": "application/json", "content-length": "122" }, "content": "eJyrVkotKsovUrJScskszg6uzM3JzMsOSCwuLs8vSglKLSzNLEpNcQUr0VFKSS1OLsosKMnMzwNqgKlSKIIqA6rITS0uTkxPBcpeWHSx4cLWCxsvNl/YerHpYuPFfoUL+y9sAAruu7D7Yo9SLQCU7TbL" } }, { "method": "PATCH", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrVipILC4uzy9KUbJSUDI0MjZR0lFQSixLzMxJTMpJjS/NK8nMAUoZ1gIAHrUNXw==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/public-settings?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&allow_address_access=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "21" }, "content": "eJyrVkosS8zMSUzKSY0vzSvJzFGyMqwFAFhtB9Q=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2FcdIgDR0kySmuVw&offset=0&limit=20", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_public_settings", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "139" }, "content": "eJwVjUEKwjAQRe8S6E4btLuCiKD1At10VcZkaoJpEjITUcS7O67+f2/zPmpFdsmqXl0vo9ooV3ARcMyZeq1NSNVuIfv2DdHiq43I+rnT1tNDF6RUi0E6ZmB3+LumOzX7YYKz/BGJBVhmzvUWvJkJmX28k4QY1xyAUdILBMLvDxFuMU0=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_public_settings&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_publish_unpublish.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 409, "headers": { "content-type": "application/json", "content-length": "313" }, "content": "eJyVjcFqAjEQhl9lyLno3bPehXopCLLdndZguwnJCC3Fg7unPkVfQQpRka2+wuSN+q/YByghkyEz//d9GA7BBTMyYxtX00KWU2driTM3ebNRuJaxDVyKC++T6+KdqTiWwXqxrkbs3nNpnyxX5BGmuanAGQ0fip434yhDQVn49eOLjcvFur51c0P+aiJxxDcXVX+yAUSvHGPxzJDol54pt3rSnR5wf3DO2uWW9JLb3OjxX2KQ9poob5H91IS30W98ptwACP6lN2FOGOzQH7WjvmiCOGk3MJtf0MSTWg==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwtjUEKwjAQRe8y0J02qLuCiKD1At24KmMzJcE0CZmJKOLdHcHVf+9v3hsWEpcsdHA5D7ACV2hWcSKZO2OmkKpdY/btC6OlZxtJzGNjrOe7KcSplon4kFHc/vc1u2Oz7a94Uh6IRUV0xlxvwbMba/yTpoSWHFBI4zMGps8XeWMyLg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "776" }, "content": "eJy1Ul1v0zAU/S9+bUv8lTixtIdCQWHaYJ0KWotQ5MT26jWJk9htKVP/O04B8YQQErzY51rH59x77GfQCb8FHEjjdjxai0XYV8r5yIel6PZlbdy22Lc/EJgCf+rU5cIQilY0Y/FbcjUo4ZUMFAxxPIN0hrMVopykHNIJhBzCwGqsNNr8kXaRrYqdOgWiejnp7vL89u5GLyJdfziuF5OH5SZ7t6F5jx6f+uU2fb3OyY2Zv7olqZuzFe2Wb6z42uG8Pxz76Dopu+b+9P7ativy0T60C/F4dfXLZz/UwWfrfed4FJ2ENC/cLpIR3t0fnjZvZz05knoe+IVqSiXl2P/z3+dZm8Z4wDGcAqu1UwEH6OwQABjztl7UlzPjVeMA//T5PAWDcnY/VKowY2o0jhMWI4a5RhlOM1RphhKSVJKWqIJQJJJqoQRCKJZxylSpqcjSJMUlUiXNCGEQllTIBIzSB+OMbQFHLIaQpQQncZwxhsJ72qZRrQ+u7jLs96R+NvOvO+kGcwjf5z/phxTVF6PDHOfzN6yv7Tw=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=eB%2BpPHHMPLfD%2FflUwYD%2BXQZ9NZ4Hq1gjqQh8EYH3LiACM38sA7T4pQFoazp2Hqvwq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2F2kRvjZI-q3w3lA&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=eB%2BpPHHMPLfD%2FflUwYD%2BXQZ9NZ4Hq1gjqQh8EYH3LiACM38sA7T4pQFoazp2Hqvwq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2F2kRvjZI-q3w3lA&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/unpublish?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "141" }, "content": "eJwtjUEKwjAQRe8y0J02qLuCiKD1At24KmMzJcE0CZmJKOLdHcHVf+9v3hsWEpcsdHA5D7ACV2hWcSKZO2OmkKpdY/btC6OlZxtJzGNjrOe7KcSplon4kFHc/vc1u2Oz7a94Uh6IRUV0xlxvwbMba/yTpoSWHFBI4zMGps8XeWMyLg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "624" }, "content": "eJy1kUFuwyAQRe/Ctokyg8HYrHuEbKqqssAMCqoxliFRqyh3L47aZVVVajfwBz2G/4crW0w5Mc1cyK/68GQe636kXA6lLsNytlPIp+E8fyq2Y+V9ofuFtRaziVvxLTyuZAq5inDgcg9iz/sjCt10GsQDgAaoVEwu+PAjNlC05NzGXX/vewoxFKY57FjyPlPVVea0VsG2XKmY6X4WCsXM9PPLbcdWyum8jjSEzZ2QslUSFdcee971OHqFbdOOTlgcAUzrhDdkEFE62SmyXpi+aztukazom0YBWGFcy7bWl5BDmplGJQFU1/AeOVcC69xSjDSX+mq+h91SjMOXmb92sqzhUr/pn/rXKdJb8DXH7fYBhoG7Uw==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=eB%2BpPHHMPLfD%2FflUwYD%2BXQZ9NZ4Hq1gjqQh8EYH3LiACM38sA7T4pQFoazp2Hqvwq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2F2kRvjZI-q3w3lA&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=eB%2BpPHHMPLfD%2FflUwYD%2BXQZ9NZ4Hq1gjqQh8EYH3LiACM38sA7T4pQFoazp2Hqvwq%2FJ6bpmRyOJonT3VoXnDag%3D%3D&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/public/resources?public_key=https%3A%2F%2Fyadi.sk%2Fd%2F2kRvjZI-q3w3lA&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJwdijEKwkAQRa8ybC05gLVaWngDSUZZxB2Z3VQiJKYR9ArewcJFg0SvMHMjR7v/33t7h8zEbuwmPm7mlGZUh2r6ZyNXYSzZ75KnYMUCI9VcIgRKsPp1hTVbjHG5RvNylQzayV1u8pK3tnoBGez0epQnyMPmRxszJ8kmBj1LDwaypZ022hbu8AXBiUjR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_publish_unpublish&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_remove_trash.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "136" }, "content": "eJwVjcsKwjAQRf8l0J02aHcFEcHHD3TTVRmaW1JMmpCZFkX8d8fVPeds7sf4gsm0xotkbq0dQ1rdnvJcv2lxeNULxG4H62Z+2gJOaxnB50ziT/9WNZfqeO/pqtyBRUV0hoKYNgxSiL3ZmQjxyenP49apCmIOJNAyUWB8f+cvMA0=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash%2Fdir-to-remove", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "152" }, "content": "eJwlzc0KwjAQBOB3CfRmGtRbQUTw5wV68VSWZkuCSRN2t0UR390VTzPzXeZtAuFkOhNEKnfOjaks3kKN7Qtmj892RnHr1vnID0fIZaER+VhBwuFnzf7U7K53OGvvkUWHaAyEuaw4CAEHNR/JSrF/NRuTUULx+nu79DoFc00gqDJBYvx8ASNYNbQ=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash%2Fdir-to-remove&permanently=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "696" }, "content": "eJy1kt1KAzEQRt8lt7Z0NpufTa59hN6IyDLZzNrgbrdk06KUvrvTWoUK4o0SSAg5+eaQzFGUtx0JL2LKYiFaGgPFSFH4o0iFxln4x6PY4nhllmVaZhqnAzFNr6ln8LQQXSYs51tCglRLsEsw68p5WXuwdwAegPlIA/1EuS9qyuk5bdsdls2l5vziVw94z+ua5rIqPLUfCm3JOG9W37XGKaY+/Von0zztc0dtOpNKa2N1ZaXHTvUksavJKd0FVauAlmytySqQAbWV0cpaKhmaoBQGiIYAoQctJaHj6Kv7Rc/f+rUS+6YxPGyFVVOhsY0NnGwsGiRXY3CgKxc5ppvGkbaFBefzf+xyOvArt5/if269D0Pq/imem+Sm0zId0pymrfAcD9LVtnGNsZXRpydGp4IDHy3EkMZUhNcA3Bl9PxNv4HR6ByvGy9E=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir-to-remove_2af88686871a181a6787b74067a6ae93ab90519d&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir-to-remove_2af88686871a181a6787b74067a6ae93ab90519d&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_remove_trash&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/recorded/sync/test_rename.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwVjUsKwkAQBe8ykJ1m0OwCIoKfC2STlTSZFyY4P6Y7ooh3t129qtq8j/EVs+mNFyncWzuFvLotlaV9U3J4tQlinzvrFn7YCs5rncDHQuIP/9Z0p2Z/HemsPIBFRXTuFYkizMZEiM9OH26XQVUQSyCBlpkC4/sDtpYtdg==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2%2F&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjUEKwjAQRe8S6E4bqruCiKD1At24kqH5JcGkCZmpKOLdHVf/vbf5H+MrZtMbL1K4t3aKeXVbKqF90+LwaheIfXbWBX7YCs5rncDHQuIP/9bsT81uuNFZeQSLiujcKxZKUHOhdmZjEsRnp0fXy6gqSCWSQMtMkfH9AfReL4M=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/move?from=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2&overwrite=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjUEKwjAQRe8S6E4brLuCiKD1At24kqH5JcGkCZmpKOLdHVf/vbf5H+MrZtMbL1K4t3aKeXVbKqF90+LwaheIfe6sC/ywFZzXOoGPhcQf/q3Zn5puuNFZeQSLiujcKxZKUHOhdmZjEsRnp0fXy6gqSCWSQMtMkfH9AfSCL4Q=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir1&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "145" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh8KF7UDm/osNQJmOC1uBEnsvdl/YqQAU2ApU2nyx4WKjnpKOUkpqcXJRZkFJZn4e0Myg1OL80qLkVIW8/BKFtPzSvBSQmtSiovwioKxLZnG2X36JG0jcFSxWCwATl0jR" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename%2Fdir2&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_rename&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK0U+kNa9sQLeIFpZxqIQBs6Go3x7nb5vs37iuWkJCaxMJc6SRm3/MQrlLX7wIH07g5i+RokrvUhc6ETeM1HldhD9BhdSNiTGq0ZE4TkndIAUUGEBM7YocdgDBrvnR6s0075QForsuIiduIlY3vf5ntLpr1swNQkwVbp9wfWITH9" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/d0ac9dc8bfd0e26546fabf9823aac2acafa84510db44d499831583829be332e5?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_restore_trash.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "137" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmyxbTJmSnooj/7nqaeY+B+TgpPLrGCZC18X6IaQ1bylP9piXwq14Y/rnzYdKHL6xpLQPrKRPk+HfV4Vzt2ztdrHesMIBFb1Okwj0KqbiNmxmSgh3drp0heM6RwGZGisrfHxzpMIM=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmS4JtE3anooj/7nqaeY+B+bgoPLrGRaBo4/0w5TVsqaT6TUvgV70w/HPnQ9KHF9a8ysB6KoR4/LvqcK727Z0u1jtWGMCitymycA8hjSZDErdxMyPmYHe3a2cInstEYDMjTcrfH0IsMl8=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir&permanently=false&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2F&offset=0&limit=500&fields=type%2C_embedded%2C_embedded.offset%2C_embedded.limit%2C_embedded.total%2C_embedded.items", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "667" }, "content": "eJy1kstOAzEMRf8lW1rVzuQxZM0ndIMQGqWJAxHzqDJpBarm33HLSywQG8jCUeTjm6srn0R92ZNwIuYiVqKjYUcxUhTuJHKlYRbu7iRGP3wx9JwTt5eVCIV8PbNCglRrsGvELVqn0Em8AnAAzEfq6SdKflJTyQ957Pa+Pl5+mp/c5tbf8L2luW4ql65wmQp1tfj5cfPmZphiTvlXeR6dDiVQl8+k0tpYjVY68JYPGYnGQtMgWU9SGalCUgZRq0gesPXSAxiKqK3yCKh000opE7H0u+WLKXd21bVWshoEHVTCRBoshsYno4IPlKIyprXG28DDYRoGGivbms+R70s+cqTdh90/93rY9Tn8kzxvxLdlKnTMc55G4VieM7g2rWykRQPLPaNT9T23VqLPQ67CaQBeg5Rm4gcsyyvFkbyC" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&offset=0&limit=20&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/trash/resources/restore?path=trash%3A%2Fdir_8726700c5c4f1fe5071c3af64cacefd466876a7c&overwrite=false&force_async=false&name=%2FYaDiskTest%2Ftest_restore_trash%2Fdir", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxVJZmS4JtE3anooj/7nqaeY+B+bgoPLrGRaBo4/0w5TVsqaT6TUvgV70w/HPnQ9KHF9a8ysB6KoR4/LvqcK727Z0u1jtWGMCitymycA8hjSZDErdxMyPmYHe3a2cInstEYDMjTcrfH0IsMl8=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash%2Fdir&fields=type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "14" }, "content": "eJyrViqpLEhVslJKySxSqgUAJDMEvA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_restore_trash&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOwiAQQNG7sNbSAezQ7o0X8AKUGUJjW0hBozHeXZbvb/5XxIODmESsNZdJSr+mJ51dXrqP24nf3c5VvkDSUh4yZT5cXdJepFI+kEUwaBXAMATCcfYMaC+NI7FRpE0wI3vdQ7AEFrBHPbNmVNaJk9i4xkTtfbveGytveXWVWwluLfz7A19PMMA=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/22cfd87147821166fd79bce17851169de42d34f49ec301f8d1817073be3e728a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/22cfd87147821166fd79bce17851169de42d34f49ec301f8d1817073be3e728a?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_save_to_disk.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "136" }, "content": "eJwVjcEKwjAQRP8l0Js2qLeCiKD1B3rxFJZmSoppE7Lbooj/7vY084aB9zUTJCRvGvO4d2ZnQsGgEEQyN9b2MS1+T3msPzR7vOsZYteD9SO/bAGnpfTgSyYJ522rTtfq2D7ppr0Di4JoOKYVTpLbPmoRTDmSQL0DRcbvD3lAL/k=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "130" }, "content": "eJwtzEkOwiAUANC7sO9npsA5egES6CAEkX6MQ7y7C92/vDfZe1qJJztiOz2lo5VriKkrm8sG8TgzPEON6QE1oVdK/sWEoW8JqWBCM8PNwrWWzAKTBgZGcPfxKi5vc2n1GHq+oBN83dfblH/1zI0Ulny+Gv0p3A==" } }, { "method": "PUT", "url": "https://uploader48klg.disk.yandex.net/upload-target/20250616T155308.036.utd.9vuzl9kg7lpniu57jt921fhfq-k48klg.716328", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzElVSM7PK0nNKykGAEGtBw8=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources/publish?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt&allow_address_access=false", "headers": { "content-type": "application/json", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJyrViooTcrJTI4vTi0pycxLL1ayUqiurQUAa34I3g==", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "154" }, "content": "eJwdjsEKwjAQRP8l0Js2WG8FEUHbH+jFU1iTDQmmTchuSkX8d6OnmTcMzLzFjOyiEb0Yb5PYCZfRVnDMiXopdYjF7CH59gWLwa1dkOV6kMbTU2akWLJGOidgd/plzfHSdMMdrtVPSFyBqyiCFRVH9e90QyqP4LWyPmDLG9ddxjkFYKxPLATCzxcZ1jai" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fpublic_file.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1317" }, "content": "eJy1VNty0zAQ/ZfM4JfSWLJ1c2Y8TCBtCeXWkJaUl8zKkohIfKkt51KGf0cKlM7AAy8w47Gt1Wp3z+45+jpowK0Go4Gy3XoU38LEf+e6c7Hzr2UHW7109TLsxk0vN7ZYGrvRQ7d3g6cDd2i0PxssflVBGVZ/uhWtBqeV30tQQk8RO8VsjpMRTUdInCA0Qsh7lbWyxv7VrbP3PgsW/oAtfXE/SnB67+JmA7YKkRT1JpFhWaiUI8RwBoZiiqXJqBQpMyaTOMRaQUKZ9y2IgYwJ4IRSwQwAoBQhSvwpI3EBRlGdgU6oASZxyqFghHOOqVGFwMdYP2Gv9cHHu32+7y/ev9Mf3k77Hdvcv3dnN2t8//IO7T6O38BhdaK2i+kuPbtSJ+a16LBe6PL+4vnY9ERV4+ld/IrJppwd3r2qq3l6Uy+qCXzO88c8fbvxeVbONd0ojg+g7NCPSMX9F9rR2afJ/qYVZ59DM7Sy8NAmVRd9qaswlFZ3dd8WemlDxz1uxinmySjFCpI0Q0wIYiTTicZKYArGUEWA60yngiUFB4UNlylhSiCqJcGMmQISdQy9tZ2tKz8mThHiIhUio0hg4rlQl6EAn7UbjL4+oHko5l9X0rR266n3n+J/ezrQe2s8Dv8HlbNb2/bdsnPg+i6waqMh8PGoj8dhqXpXbWpQuh0GXQ0PUCm9H7Z9fJSZEZykvFDUFAXXnIpMpBghjAQkSUYEGClZohXRIEBIkBQo8piMAEKQkjETFBFpaFx1L6drvbisYHbRzA8VurazuzlvJrevS3Z9ysg5//BGvB2fczWdL67WO0fRdTVuzTk5XffkxrVTWL+w0xkVlxjvx1W9vYLxk3Tin2e9VfmvXkYBYtB//pv6Iw+pqTvrPB1ycA6KVRh/tIJulUcbW1qXo6ioKxdIEViaByk/Sc6PYo58q3S7/C1XuAJyLKKVN8ssoxikRgnXyBijEuVHSjOCITFao+iR//kD+yO3rrb5No2086L66z3x7TuucJio" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/public/resources/save-to-disk?public_key=https%3A%2F%2Fyadi.sk%2Fd%2Fuj5s5RZDxVr8Eg&name=saved_public_file.txt&save_path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "160" }, "content": "eJwdjsEKwjAQRP8l0Js2WG8FEUHrD/TiKazJhgTTJmQ3pSL+u6mnmTcMzHzEhOyiEb2430axEy6jreCYE/VS6hCL2UPy7Rtmg2s7I8vlII2nl8xIsWSNdE7A7rRlzfHSdMMDrtWPSFyBqyiCBRVH9e90w4ZGpfIMXivrA7a8cl1nnFIAxvrHQiD8/gBxTDkU" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk%2Fsaved_public_file.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1183" }, "content": "eJy1U1tr1EAU/i+B5sW2mcncA0EWS7VUhdattE/LmZs77G4Sk9nt1tL/7sxqFUTxRSEkOWfOfOf2fY/FAHFZNIUN06qp7uAsfeduilVMr8UEO7eI/SKfVtmwi2Gr18EsfFi707iPxXERHwaXELInWR1ssvWnYDM6iM6miBrV7ATxE8znuG4YaZB6gVCDUIra9Db48NewKXxJubBMF8ImFfqtkOj2sRrWELqMZFlySYW1sUQgxLECzzDD2iumJeHeK40z1hJqxlOsoR4UlyAoY5J7AEAEIUbTLa+xAW+ZU+Bq5oFrTAQYToUQmHlrJD5gbZwN8FyO7c1247rc/Oimfjsatwi5s4TPBcOibsAbjgkyREttwdcgjLZaWoQtoFpoxMAgi2VKriRIYb2iDCFsTC1rieQBehem0HdpHCIdCUmkEpgSqtLM+00uIGWdiuax+L6U52L+dSXDGHZpxf8J/+m4cPvgUx/pD7oYdmHcTospQtxOeXtrB3nvBzY2xTLGYWqqyvb33boH68bTzOXTB+is25+O2+pAbdAKAYhaCWmowKAdMZI7izRJRCEOa60tBcDUeG4IY0ojioS1jALRRFRcMkS151U3vblYudvLDq5fD/OHDt2E689zMZzdvd3wmxNOz8WHd/L97FzYi/nt1eo+MnTTzUZ/Tk9WW/oxjhewehUurpm8xHg/6/rdFcyOyFl6Xm6DbX/MsswtZrW1v9VamRob+inERIoWYgSzzCQolzAt23IdNiG2qDR9FzM1MlfbLJyj+vwgnTINzI2LXzJmwbVYlsvk1kqxPKm0Noe897a2RCGmKIbaO4fKnyponzVQxlW3a3ekdBE+tX9V5dNXMNVuWQ==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_save_to_disk&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzkEOgjAQQNG7dK20hU5t2Rsv4AUGZiYQgTa0Go3x7rL8q/e/auU6JVK9ul3v6qSmneWIqdZceq3HJT3pjHluPrgRv5uNq35ZTXN56JR5xzqnrWhofexaBgHTCaI4a9xFWhQrRJGCExiMF/Y4dM6MRiyAD6O3AUKMAQ658poXrHy8CC6Ff39hhjEh" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/526932e5f503faaf41047f2af1fdd9d84f5b06fe6ab340c0f15568c618589985?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/526932e5f503faaf41047f2af1fdd9d84f5b06fe6ab340c0f15568c618589985?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_streaming_requests.json ================================================ [ { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/0000?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 404, "headers": { "content-type": "application/json", "content-length": "137" }, "content": "eJyrVspNLS5OTE9VslK6MPfCVoWLzRe2XNhwYfeFfRcbL/YoXNgL5Oy82HRhh4LChX0X9l/YerHhwoaLbRd2XOzTU9JRSkktTi7KLCjJzM8DmuBfkFqUCGIr5OWXKKTll+algBSlFhXlFwGlXTKLs+FK/PJL3EAKXMGStQAQHEAr" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/last-uploaded?limit=10&fields=items.type", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "171" }, "content": "eJyrVsosSc0tVrKKrlYqqSxIVbJSSsvMSVWq1Rlk/NhaACXZOPU=" } } ] ================================================ FILE: tests/recorded/sync/test_upload_and_download.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "143" }, "content": "eJwVjc0KwjAQhN8l0Js2qLeCiKD1BXrxFJbulhTTJGQ3/iC+u9vTzPcdZr7GF5pMZ7xI5s7aMaSKW8hz+4GI9G4jiX3uLM78sIU41TISnzKIP66uOZybfX+Hi/aBWBREw9UcEqDTDYfpFVcwG7OQ+IR6d7sOikJLDiCkZoLA9PsDUgsyzA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download%2Fzeroes.txt&overwrite=true&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "127" }, "content": "eJwtzEEOwiAQQNG7sC8MAy2Rc3gB6tCiNJXAtNUY764m/u1L/kukGifhRWIuzSu1leUeKFbdz5KuLctnWCk+5BrZW2v+3nGoc2SFgBYcDGf8Zk/SGZAbk9QjakTql33MU6FjZ7i1dMmuy7+xAXQ4gHh/AG9fKAI=" } }, { "method": "PUT", "url": "https://uploader15g.disk.yandex.net/upload-target/20240706T222249.730.utd.1b2122d5lvbkfpdwvt0jshck7-k15g.3027260", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "450" }, "content": "eJxdUNtq20AQ/RdD9FZrL9qLAqIU4sRNDaV2XEJfzGhnVG0kr1RpFV9K/z1K+1Y4L3MGzu33oh6oWtwu6hj78TZNsTuFtgOkYYl+bJYXCEjn5TCl72dKoEzJM1sxq0DZXGrIudKmynQphEDGNaugtDMpFbi8dLIUDiwKlaEkl2ptc+QO0jCuPzf0/CXA9qF/ugS299tf2An33T8E/PHtxHZmu9sMzSd6sXx1meJVbJ5Xj2u1f2SH3d2GnVZS26dm+tquP+w7xQKq0428m/Fx8lhkas6luBFJ5VsKcKTiSkNH4zKeYzK36bvRR9+FAmIEVx8pxKSGsS6S1h99LFjiuhBn9hAvPRWRzvFG3Pct+JDMK9Fw+M9m9FcqOMusMjqp55+RTgLnYJ2stJaZltxYI1CQcrwUNjkSevgnj52b/kaITXgtXkVCEX4WaDFzYh7MUlayDHNdOhCzjEJmuFOLP2/Nv5CJ" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/ea57b148f085a58936a91567f46b222d0160fab891535ac9bc3b2ca8d254d3ec/6689d1ca/nsHIkeXKnaRGpTyn0UiRqdo2cViGndZQw0S7RSLrkAej81Eyutz2LXEJH5UJ0_SDL0wE368TkuOlH-Uo50nd5w==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1048576&hid=73c3a11a8c3f66346317872d2e5c1b28&media_type=document&tknv=v2&etag=d8d4c2d1c8e4b04d96bca23175d071c5", "headers": { "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1048576" }, "content": "eJztwTEBAAAAwqBK65/OEL5AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8BjCrLQE=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_and_download&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK30l5ayJ17AC0zbmUAE2tBqNMa7y/J9m/dl84HERja3VurIeVzzM12hLN0H9oTvbsfGX5KnpT54LnhAW/JeuYxEvdfKJqt6cDLowShhnCVpAlFIKkZS1vSD8NIbGQTEGLQXGsg46diFbdjmnM73bbqf2XArKzQ8hWCt+PsDdXQxBA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/1cff59326d625a71b38420476f14bffbd2ccf26458091941b0accb3903af4717?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/1cff59326d625a71b38420476f14bffbd2ccf26458091941b0accb3903af4717?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_upload_download_non_seekable.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "152" }, "content": "eJwdjcsKwjAQRf8l0J02qLuCiKD1B7pxFcbmlpSmSehMfCD+u9HVPeds7lu5BYNqlBNJ3Gjd+5jtmtJYvyhYPOsA0feNtiNPegHHvPTgQyJx+1+rdsdq217pVLgDSxEpY3Lykayx8RH+EGIwDEx081ArNUNctOX3cu6KCubkSVDKQJ7x+QJKJjZ/" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable%2Fzeroes.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEkOAiEQAMC/cB/o9LAN7/ADKK3oKCI0LjH+3Zh4rqTeIjfaiyAyc+1BqVHP15ioOTzJdOyrfMWS6CkLcdB6/vvEsR2IFQJqcGA3iDgjSA2LHJyk5wL1kiltb+zN/eFwMYN6303rL9baIhjrxecLqAwogg==" } }, { "method": "PUT", "url": "https://uploader72j.disk.yandex.net/upload-target/20240706T222320.409.utd.8tn0pmhedbqt85vw7295uessc-k72j.44620568", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "447" }, "content": "eJxdUEtrGzEY/C+G6FavHqtXQBSbpEnjUIiJW/dktNKnrLCtVXe1qe2Q/55teyvMZWZghpm3WdtDmF3P2lLycF1VvvudDp310M99HPbzs00eTvN+rP7QSoFzvHYiCBcYtbVoPPDAFKVKKtlwESbfUYmVFEphYKJm3GuBm5pYRkglhNKegK7ScP91D9tVsuu7/HxOeBPXv9zDU/u4+V4vst5v4yLTp9Isl/wCZdztctSrn+Np80Oe7+9IvHlefcphuV3f0vDSuNtvCrPFFbuZ8HmM3tScC8mJpCjEAyR7BHOBvoNhXk4FTWtyN8QSu2RsKda1R0gFtXZoDTrEYywGI9elMqm7cs5gCpzKFf2SDzYmNL0E/e6/miFewBCMMWonI2jKbFA8YEmpFjWwmtIgtJaCcKExOoKP9l+279z4t7/s06t5pQiKfTFKNY3QlnsOmIKTNvAglFc0QEMC8bP3Dwmxj/Y=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/8ecc54c6f6cf32a46bde5f38228787b56fcc5c270876880e36435d960b41a311/6689d1e9/nsHIkeXKnaRGpTyn0UiRqcJQhLUV4Ap9kXiAp2QtbBB5zetu__pi9KYuxUW7yHG1iDTK-pfBXRE2fgbcEN803A==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1000&hid=f923af85f0722964e3422f6997615690&media_type=document&tknv=v2&etag=88bb69a5d5e02ec7af5f68d82feb1f1d", "headers": { "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1000" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_download_non_seekable&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgyAQQNG7sG6FQRRxb3qBXmCAmWiqQoQ2bZrevS7/2/yvmA9iMYq51lxGKcOanvGKeWk+uEd6NztV+QIZl/KQKdOBdUl7kUNvKGh2BnpllYuKSOuujUAKAIGd99CiYetcgI4DeaOsxg6C5Xbwg7iIjeqc4vm+TfczK215xUqnMK6Ffn93yTE2" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/864ec2f94160709d0ee2253d1e011a1f9bb13a4f799c15fceb4072a51c7f38b8?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/864ec2f94160709d0ee2253d1e011a1f9bb13a4f799c15fceb4072a51c7f38b8?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_upload_generator.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_generator", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "140" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxVYbm1hTTJGQmooj/7ri655zN/RhfMJnOeJHMnbVjSNWtKc/tm6LDq40Q+9xYN/PDFnCqZQQfMonf/1uzOzbby41Oyj1YVERnqDkkcsMdEYUkFbMyC8Qnp1/Xc68qWHIggZaJAuP7A7WGMak=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_generator%2Fzeroes.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzEsKwyAQANC7uM9oRxOj58gFLKNNG4liRvqjdy+Frh+8t1hbTMKLlbkeXspecwkUm51uQNdjg2fYKT5gj+yN0X8fOLRLZIkKjbJqWhBRowaHCjoTOArnbMfUiiuh21czlRLGfB+2X6znkx21mcXnC6k4KKQ=" } }, { "method": "PUT", "url": "https://uploader76j.disk.yandex.net/upload-target/20240706T222323.920.utd.9dabl75fro9oau7zr4pdf2elw-k76j.38175348", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_generator%2Fzeroes.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "447" }, "content": "eJxdUF2P0zAQ/C+Vzm/X2G7s2CdZ6I7eB7oC4nQgeKoc7/pitXFSx2mbIv47Ad6Q9mF3RprZmZ+LJqFf3CyanPvhpiigO8V9ZwHTEsKwW042Ap6XaSz+nEXtFGMlo/W8lFp7TxX3K+1UxWpEzjmzDJjiVCshBABIDpqiAyY1CqwLKZUGhljE4enDDr8/R/vy2L9OkX4NL4cv95u1u72k+tR8c4Ien67H02FTtf5tFJ9v0/tPPHxM18e0ya932k6MUsvvHtL68XA/+e3zj9PVaj3PuzGAKYWQlWAVJz7sMdoWzQVTh8MynzOZ0/TdEHLoorE5W9e0GDNp7NAYsg9tyIYS18U8o9s89WgynvMVf+j3NkQyt4Rp+5/NEC5o5p8oaWbCa76yXglPK861LHFVcu6l1pVkQmpKWoRg/2lD58a//nkXj+bICWb7ZpSqa6mtAIGUo6usF14qmBvHmnkGi1+/AVKZkSc=" } }, { "method": "GET", "url": "https://downloader.disk.yandex.ru/disk/bc811410bbc8499ff082f39c871bee2221a1d182098555ddd62d90ecd169e5eb/6689d1ee/nsHIkeXKnaRGpTyn0UiRqQELDcAzrbwhVc50vH-uwqL7mfgu5OArCN2iMr-vrLtTB9ay100a2BFrDGqEyf_KYw==?uid=455675172&filename=zeroes.txt&disposition=attachment&hash=&limit=0&content_type=text%2Fplain&owner_uid=455675172&fsize=1000&hid=f923af85f0722964e3422f6997615690&media_type=document&tknv=v2&etag=88bb69a5d5e02ec7af5f68d82feb1f1d", "headers": { "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "text/plain", "content-length": "1000" }, "content": "eJwzMBgFo2AUDHcAAK0au4E=" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_generator&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUEOgyAQQNG7sG6FGQXEvekFeoERhmiqQoQ2bZrevS7/2/yvmA+OYhBzrbkMUvo1PcOV8tJ8aA/8bnau8gUyLOUhU+aD6pL2Ii0pAECkEJzvlYNeY6cRNUcdyajoO5xAm0n3EVtUrTeO2EyE1jqwQVzExnVO4XzfxvuZlbe8UuVTIq2Ff39TMDCh" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7a011122add9c809185245225ef5fa60fc42b156b58f23203c69ae6ba277917d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/7a011122add9c809185245225ef5fa60fc42b156b58f23203c69ae6ba277917d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_upload_url.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "134" }, "content": "eJwVjUEKwkAMRe8S6E4btLuCiKD1At10VUInZYrTzjDJiCLe3bj6773N/4DPPEMLXjVJiziFWNye0lK/aXP8qjdWfB7QLfLAzBJLnljOidSf/q1qLtWxG+hq3LOoidqMJYVIbiw5wA5WVh+dvdxvvanymgIpW5kpCH9/gL8vNQ==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fexample_file.txt&overwrite=false&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "128" }, "content": "eJwtzFEKwyAMANC7+F9NY5zUc+wCglntWmqxkW2O3X0M9v3gvVWufFNBZZHjDMa0YysxcR2p6LScq37FPfFT7yyByP59kFhnFoOABB78FcHR6LTFi26SNLa6zDLZXtj2E1y5Z370LeOw/mLyMIF1pD5fsEAozA==" } }, { "method": "PUT", "url": "https://uploader14o.disk.yandex.net/upload-target/20240707T205415.326.utd.2urigt93zoe3zs05ojhewzlh2-k14o.47090354", "headers": { "content-type": "application/octet-stream", "connection": "close" }, "content": "eJwrSS0uUUjLzElVSM7PK0nNKykGAEGtBw8=", "response": { "status_code": 201, "headers": {}, "content": "eJwDAAAAAAE=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources/download?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fexample_file.txt&fields=href", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "451" }, "content": "eJxdkMtu2zAQRf/FQLi0+BTJAEKQpIjrPmDEcYzYG4MihxVriVIt2pFa5N+jtLsCdzNnMRf3/JlVJ/Cz61mVUtdfZ5lrX2PdGgenuQv9cT6a6GCYn87Zx5lJSQXOlafAcu5AKsosWCMZ11gIoUnufUlpTogDrkBJz7mhWjMD2jBLsjxXJQalsth/Xh7h5Ws060W3GSN+DutfL9svbFVt7P6bhQsflqPe0jLdLo5A5Irvd/vX7/XPzXb/eM93d7vFQzi75Z2AZv20Al6P949X7NOUm3NwBRcil4JIinyoIZoGChhM09Vw+ADzNCQ0beraPqTQxsKkZGzVQEyoMn1VoDo0IRUY2TamiR7S2EGRYEhX9KGrTYhocgWnw39lffgNBVGomnCptSCmBEwlYO+9o45NojQnhnoAjBpwwfz77Fp7/tuejvFSXCiCZH4USpPSOiYxzok2XhBBSq9FqdhkWpdk9vYOwJaSXw==" } }, { "method": "POST", "url": "https://cloud-api.yandex.net/v1/disk/resources/upload?url=https%3A%2F%2Fdownloader.disk.yandex.ru%2Fdisk%2F7725068f2e364de7823ceca73490555916ffb22611de48e87f44a2993ae9a3c1%2F668b0e88%2FnsHIkeXKnaRGpTyn0UiRqXVJ3OhTcZLcev4xIy9V2btAGke17O4ZYZwMljTVZQC4YBYGFiudIB5emRSOe4lyCQ%253D%253D%3Fuid%3D455675172%26filename%3Dexample_file.txt%26disposition%3Dattachment%26hash%3D%26limit%3D0%26content_type%3Dtext%252Fplain%26owner_uid%3D455675172%26fsize%3D18%26hid%3Db9951abe027e0fffd2d3905941a2fee0%26media_type%3Ddocument%26tknv%3Dv2%26etag%3D891bcd3700619af5151bf95b836ff9b1&path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fuploaded_from_url.txt&disable_redirects=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzU0OgjAQQOG7dK209A9kb7yAF5h2poEItKGj0Rjvbpfv27yvmA9KYhIzc6mTlHHNTzxDWboP7EjvbieWr17iUh8yFzqAl7xXGWzs0Y/KjjqhIrQhKSSjowtoxkh+IHUxLuhgAbw2KlG0g9POelAAUZzERjxnbO/b9d6SaSsrMDVJsFb6/QG/2jIS" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/b4c1d680482fd0ed4bf0de32c5bd38ce67e0935b2b4aa6230fec4752546a0aac?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/b4c1d680482fd0ed4bf0de32c5bd38ce67e0935b2b4aa6230fec4752546a0aac?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url%2Fuploaded_from_url.txt", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "1181" }, "content": "eJy1VFmP1DgQ/i+RyAuzE9+OW4rQAmJ29tCIoRkx89Kq2OVt7+ToTZymG8R/x24uCbFaHkCxEtmpVH1HVd4WMMSwD9Myb+YIcZmLVWE7hKE4K+bwBosVrc8KO/Y9DnETXHr/tthNYQ8RNxPO4zLZFFQIKZWWVLOVr40ilqLV1BLCHNbSeInIpdPKEsV0q4xriRLMcE88sy2jghiWPqLcs1R4t7RdsD8p/buzYoA+J1123QgO3cZPY79Zpu48HmIqj4fgE80UaCdMPF2KZYSJX4hOa031SooVVQ8JWRGS4j/hTPL8aCX60QUf/hdBH3rcxOMus4p4iNWug5At9KHLZ9sYd/Oqqtz4ejhxns5dmO/PjzA4PJxPS5W3lW+xTpczQDTTTIJmXKBTNZfeoGe14txabUXtuHfKSsGZSnRAukSTtpVSdUuwhmqYf7u8x1d/DHB9sVsfB/IyXP/76uZ3frVd27s/Le7F4fJoblgbf724R6qvxN3t3eu/un/WN3fPn4jbx7cXz8LiLh9L7K9fXKHojk+eP+BP03q0BNd8VrnMFLOhzTftLBOx3TiHGMahgRjBbnMnl1uYt03ZhT7EhpR2HGLu7yxhkwV8wJ6dJCyTYDhtvqqYB6OhdblNx60xkkKLhGkk3nvHHDdEGkGBeURS9ugCfMjsRrucqsf7Yd/sWYkR/m5qQ1vruCZEUQNeUklbb2Rbc+W9aWkeCIjbZGM2aVXdwtP0XOMcq5humw+8M+Hqvzr6C4ac5SOKPOFbYFLlkRcejKpBJ5a18gBAOCFSJDS+pRa8k2gAmfSgWso1WCW01lR6Z2t6wvgx+6njUkUn0+Y7qE24D3MyJ/1oNCNci1pqyiQ16t17RFVqpA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_upload_url&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOwjAMANG7ZA1N3PS/R1yAC7i2o1aUJmoMAiHuTpZvNvM1yyHBTGZRTXmylrb45DOmtfrgzvKudlH7AstrvtuY5EBd454tM7R+aJGYJdRNAOyJ644J3TD7MBfOI/jgGhpBupr6kRgGTw5c33RkTuYhukQu7+vlVqjySBuqlBJwy/L7A+NiMk0=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dd15385acddef24f1a7cd26dca08b3fba7cb913f04c91e62c79cd183c010746c?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/dd15385acddef24f1a7cd26dca08b3fba7cb913f04c91e62c79cd183c010746c?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } } ] ================================================ FILE: tests/recorded/sync/test_wait_for_operation.json ================================================ [ { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_wait_for_operation", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "142" }, "content": "eJwVjcsKwjAQRf8l0J02qLuCiODjB7pxFYZmQoJpJmSmPhD/3XF1zzmb+zGxYTCDiSKVB2unTItfQ039G4rHV19Q7GNjfeK7bci0tAn5UEHi/t+63bHbXm5wUh6RRUV03BOSuEDNUcUGkqiYlZlRInl9u55HVcG5ZhDUEiAzfn8iTjKJ" } }, { "method": "PUT", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2Fdirectory", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 201, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "115" }, "content": "eJwVzEEKwkAMQNG7BLrTBnVXEHGhvYAXCJOUGZx2hiQVi3h3x+V/i/+BqDLBANG92oAYcll5TzX1Gy0s734Rx9cBOdkTVaysGsQulTye/9adrt3xzkkleNENdjCLx8JtOd4eLV3mmsmlyUTZ5PsDK2QoMg==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2Fdirectory&permanently=true&force_async=true", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 202, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "156" }, "content": "eJwNzUsOgjAUQNG9dKz0S+ljTtyAG+jnNRCBNvRpNMa9y/Ceyf2y+cDMRjYT1TZyHtfyTFdfl+7j94TvbkfiL8nT0h68VDw8LWVv3HgMUcesrBNGBZM8BBwAc4/QZwtRKh1FUgLCANoCCis0CrDOSSNdYhe2Ic0lne/bdD+TcKurJzwl+7Xh7w+bcTEi" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "24" }, "content": "eJyrViouSSwpLVayUsrM0y0oyk8vSi0uVqoFAG0lCNg=" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "GET", "url": "https://cloud-api.yandex.net/v1/disk/operations/4aebc3cf268042b4da9be79ef5e95f69c123c0d209b79369e0603e096881418d?fields=status", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 200, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "20" }, "content": "eJyrViouSSwpLVayUiouTU5OLS5WqgUATRwHWA==" } }, { "method": "DELETE", "url": "https://cloud-api.yandex.net/v1/disk/resources?path=disk%3A%2FYaDiskTest%2Ftest_wait_for_operation&permanently=true&force_async=false", "headers": { "content-type": "application/x-www-form-urlencoded", "connection": "keep-alive", "authorization": "OAuth supposedly_valid_token" }, "content": "eJwDAAAAAAE=", "response": { "status_code": 204, "headers": { "content-type": "application/json; charset=utf-8", "content-length": "0" }, "content": "eJwDAAAAAAE=" } } ] ================================================ FILE: tests/test_session.py ================================================ # -*- coding: utf-8 -*- import yadisk from yadisk.types import HTTPMethod from urllib.parse import urljoin, urlparse from typing import Optional __all__ = ["AsyncTestSession", "TestSession"] def _ensure_trailing_slash(s: str) -> str: if not s.endswith("/"): return s + "/" return s class TestSession(yadisk.Session): __test__ = False def __init__( self, session: yadisk.Session, disk_base_url: Optional[str] = None, auth_base_url: Optional[str] = None, download_base_url: Optional[str] = None, upload_base_url: Optional[str] = None ): self._session = session self.disk_base_url = disk_base_url self.auth_base_url = auth_base_url self.download_base_url = download_base_url self.upload_base_url = upload_base_url def send_request(self, method: HTTPMethod, url: str, **kwargs) -> yadisk.Response: url_parsed = urlparse(url) kwargs.setdefault("headers", {}) new_base_url: Optional[str] = None if url_parsed.hostname == "cloud-api.yandex.net": new_base_url = self.disk_base_url elif url_parsed.hostname == "oauth.yandex.ru": new_base_url = self.auth_base_url elif url_parsed.hostname == "downloader.disk.yandex.ru": new_base_url = self.download_base_url else: subdomain, _, domain = (url_parsed.hostname or "").partition(".") assert domain == "disk.yandex.net", f"Got unexpected URL: {url}" assert subdomain.startswith("uploader"), f"Got unexpected URL: {url}" if self.upload_base_url is not None: new_base_url = f"{self.upload_base_url.rstrip('/')}/{subdomain}" if new_base_url is not None: url = urljoin(_ensure_trailing_slash(new_base_url), url_parsed.path.lstrip("/")) if url_parsed.query: url += "?" + url_parsed.query return self._session.send_request(method, url, **kwargs) def close(self) -> None: self._session.close() class AsyncTestSession(yadisk.AsyncSession): __test__ = False def __init__( self, session: yadisk.AsyncSession, disk_base_url: Optional[str] = None, auth_base_url: Optional[str] = None, download_base_url: Optional[str] = None, upload_base_url: Optional[str] = None, ): self._session = session self.disk_base_url = disk_base_url self.auth_base_url = auth_base_url self.download_base_url = download_base_url self.upload_base_url = upload_base_url async def send_request(self, method: HTTPMethod, url: str, **kwargs) -> yadisk.AsyncResponse: url_parsed = urlparse(url) kwargs.setdefault("headers", {}) new_base_url: Optional[str] = None if url_parsed.hostname == "cloud-api.yandex.net": new_base_url = self.disk_base_url elif url_parsed.hostname == "oauth.yandex.ru": new_base_url = self.auth_base_url elif url_parsed.hostname == "downloader.disk.yandex.ru": new_base_url = self.download_base_url else: subdomain, _, domain = (url_parsed.hostname or "").partition(".") assert domain == "disk.yandex.net", f"Got unexpected URL: {url}" assert subdomain.startswith("uploader"), f"Got unexpected URL: {url}" if self.upload_base_url is not None: new_base_url = f"{self.upload_base_url.rstrip('/')}/{subdomain}" if new_base_url is not None: url = urljoin(_ensure_trailing_slash(new_base_url), url_parsed.path.lstrip("/")) if url_parsed.query: url += "?" + url_parsed.query return await self._session.send_request(method, url, **kwargs) async def close(self) -> None: await self._session.close()