Skip to content

Commit

Permalink
Merge pull request #4 from TitaniumHocker/v0.4
Browse files Browse the repository at this point in the history
V0.4
  • Loading branch information
TitaniumHocker committed Jul 9, 2020
2 parents bb438b4 + 89b1a50 commit 7d408b7
Show file tree
Hide file tree
Showing 19 changed files with 423 additions and 532 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install flake8 pytest freezegun
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand Down
6 changes: 4 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ pytest-cov = "*"
pylint = "*"
jedi = "*"
tox = "*"
twine = "*"
sphinx = "*"
coverage-badge = "*"
pallets-sphinx-themes = "*"
mypy = "*"
freezegun = "*"

[packages]
requests = "*"
click = "*"
pallets-sphinx-themes = "*"

[requires]
python_version = "3.7"
488 changes: 110 additions & 378 deletions Pipfile.lock

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ gvapi

.. |pypgk| image:: https://github.com/TitaniumHocker/gvapi/workflows/Python%20package/badge.svg?branch=master

.. |coverage| image:: https://img.shields.io/badge/coverage-92%25-green?style=flat-square
.. |coverage| image:: https://raw.githubusercontent.com/TitaniumHocker/gvapi/master/media/coverage.svg

.. |version| image:: https://img.shields.io/badge/version-0.2-red?style=flat-square
.. |python| image:: https://img.shields.io/badge/python-3.5%20|%203.6%20|%203.7%20|%203.8-blue?style=flat

.. |python| image:: https://img.shields.io/badge/python-3.5%20|%203.6%20|%203.7%20|%203.8-blue?style=flat-square

.. |requirements| image:: https://img.shields.io/badge/requirements-requests%20%26%20click-blue?style=flat-square
.. |requirements| image:: https://img.shields.io/badge/requirements-requests%20%26%20click-blue?style=flat

.. |doc| image:: https://readthedocs.org/projects/gvapi/badge/?version=latest
:target: https://gvapi.readthedocs.io/ru/latest/?badge=latest
:alt: Documentation Status

.. |version| image:: https://badge.fury.io/py/gvapi.svg
:target: https://badge.fury.io/py/gvapi
:alt: Latest Version
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
# -- Project information -----------------------------------------------------

project = 'gvapi'
copyright = '2020, Titanium Hocker(Ivan Fedorov)'
copyright = '2020, Ivan Fedorov'
author = 'Titanium Hocker(Ivan Fedorov)'

# The full version, including alpha/beta/rc tags
release = '0.3'
release = '0.4'


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/gvapi.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Пакет gvapi API
===============
API пакета gvapi
================

Модуль gvapi.hero
-----------------
Expand Down
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
**Фичи:**

- Создание объекта героя с соответствующими атрибутами
- Возможность использоваться расширенного доступа на базе API
- Отслеживание ошибок с соответствующими исключениями
- Автоматическое обновление данных внутри объекта
- Отслеживание ошибок с соответствующими исключениями
- Возможность использоваться расширенного доступа с использованием токена

**Полезные ссылки:**

Expand All @@ -28,7 +28,8 @@
Помощь
------

Нашел ошибку? Открой issue на `GitHub <https://github.com/TitaniumHocker/gvapi/issues>`_
Нашел ошибку, есть вопрос или предложение?
Открой issue на `GitHub <https://github.com/TitaniumHocker/gvapi/issues>`_

Индексы и таблицы
=================
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
Данный скрипт выведет примерное количество золота героя и количество кирпичей.

.. code-block:: bash
python3 simple.py
Золото: около 2 тысяч, Кирпичи: 382
ЗЛ: 8.0k, КП: 43.0%
5 changes: 1 addition & 4 deletions examples/simple.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from gvapi import Hero

hero = Hero('Mars', token='awudhawiudh')

print('Золото: {}, Кирпичи: {}'.format(hero.gold, hero.bricks))
print('ЗЛ: ~{}k, КП: {:.1f}%'.format(hero.goldf, hero.bricks_percent))
7 changes: 5 additions & 2 deletions gvapi/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class GVAPIException(Exception):
От данного исключения наследуются остальные исключения пакета.
'''

class UnknownGod(GVAPIException):
'''Бог не был найден.'''


class APIUnavailable(GVAPIException):
'''API недоступно.'''
Expand All @@ -18,8 +21,8 @@ class UnexpectedAPIResponse(GVAPIException):
'''Непредвиденный ответ API.'''


class TokenWasResetted(GVAPIException):
'''Токен был сброшен и требует обновления.'''
class InvalidToken(GVAPIException):
'''Токен невалилен или был сброшен.'''


class NeedToken(GVAPIException):
Expand Down

0 comments on commit 7d408b7

Please sign in to comment.