Code Monkey home page Code Monkey logo

fs-pochta-api's People

Contributors

fadeddexofan avatar forkhammer avatar john-phonk avatar targyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fs-pochta-api's Issues

Получение всего списка моих отправлений

Добрый день. Есть ли возможность каким-то образом получать через API получения всего списка моих отправлений на сайте?

Нашёл только возможности для проверки статуса по отправлениям, по которым информация уже известна заранее, и добавление новых отправлений, но нужной мне функции не нашёл - возможно, что-то упускаю.

Ошибка в helpers.Order

Здравствуйте, столкнулась с пробемой при применении метода helpers.Order.add_items().

`
def add_items(self, items: List[Item]) -> None:
"""
Добавление товарных вложений РПО.

    :param items: Список вложений
    """
    if not items:
        self.items = items
    else:
        self.items.extend(items)

В то же время в __init__.py:self.items = None`

Таким обрзам, вызывая метод add_items с ненулевым списком вызовет:

File "/root/.cache/pypoetry/virtualenvs/server-slTVhXXG-py3.7/lib/python3.7/site-packages/pochta/helpers.py", line 432, in add_items self.items.extend(items) AttributeError: 'NoneType' object has no attribute 'extend'

Необходимо заменить базовое значение items на пустой список.

Не работает в 3.6.9 и 3.7.0

3.6.9:

In [7]: from pochta import Tracking
  File "/home/argon/.Envs/burgundy/lib/python3.6/site-packages/pochta/api/archive.py", line 1
    from __future__ import annotations
                                      ^
SyntaxError: future feature annotations is not defined

3.7.0:

In [1]: from pochta import Tracking
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-031241b76e05> in <module>
----> 1 from pochta import Tracking

ImportError: cannot import name 'Tracking' from 'pochta' (/home/argon/.pyenv/versions/pochta/lib/python3.7/site-packages/pochta/__init__.py)

В итоге на 3.7.0 копаясь в сорцах выяснил что документация отстает от АПИ и на самом деле надо писать
from pochta import SingleTracker

Потом - вылазят совершенно не информативные ошибки:

image

Но в целом что-то удается получить из АПИ:D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.