Compare commits
No commits in common. "master" and "1.0.6" have entirely different histories.
10
addon.xml
10
addon.xml
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<addon id="script.module.vk" name="vk" version="2.0.2" provider-name="inpos">
|
<addon id="script.module.vk" name="vk" version="1.0.6" provider-name="inpos">
|
||||||
<requires>
|
<requires>
|
||||||
<import addon="xbmc.python" version="3.0.0"/>
|
<import addon="xbmc.python" version="2.14.0"/>
|
||||||
<import addon="script.module.requests" version="2.25.1"/>
|
<import addon="script.module.requests" version="2.12.4"/>
|
||||||
<import addon="script.module.simplejson"/>
|
<import addon="script.module.simplejson"/>
|
||||||
</requires>
|
</requires>
|
||||||
<extension point="xbmc.python.module" library="lib" />
|
<extension point="xbmc.python.module" library="lib" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<description lang="en">vk.com API Python wrapper</description>
|
<description lang="en">vk.com API Python wrapper</description>
|
||||||
<disclaimer lang="en">Based on code taken from https://pypi.python.org/pypi/vk/</disclaimer>
|
<disclaimer lang="en">Based on code taken from https://pypi.python.org/pypi/vk/</disclaimer>
|
||||||
<license>GPLv3</license>
|
<license>GPLv3</license>
|
||||||
<website>https://git.ukamnya.ru/ukamnya/script.module.vk</website>
|
<website>https://github.com/inpos/script.module.vk</website>
|
||||||
<source>https://git.ukamnya.ru/ukamnya/script.module.vk</source>
|
<source>https://github.com/inpos/script.module.vk</source>
|
||||||
</extension>
|
</extension>
|
||||||
</addon>
|
</addon>
|
BIN
lib/vk/__init__.pyc
Normal file
BIN
lib/vk/__init__.pyc
Normal file
Binary file not shown.
@ -7,11 +7,11 @@ from vk.logs import LOGGING_CONFIG
|
|||||||
from vk.utils import stringify_values, json_iter_parse, LoggingSession, str_type
|
from vk.utils import stringify_values, json_iter_parse, LoggingSession, str_type
|
||||||
from vk.exceptions import VkAuthError, VkAPIError
|
from vk.exceptions import VkAuthError, VkAPIError
|
||||||
from vk.mixins import AuthMixin, InteractiveMixin
|
from vk.mixins import AuthMixin, InteractiveMixin
|
||||||
|
from sys import version_info
|
||||||
|
|
||||||
VERSION = '2.0.2'
|
VERSION = '2.0.2'
|
||||||
|
|
||||||
|
if version_info[0] >= 2 and version_info[1] >= 7: # http://xbmc.ru/forum/showpost.php?p=107619&postcount=20
|
||||||
logging.config.dictConfig(LOGGING_CONFIG)
|
logging.config.dictConfig(LOGGING_CONFIG)
|
||||||
logger = logging.getLogger('vk')
|
logger = logging.getLogger('vk')
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ class Session(object):
|
|||||||
def access_token(self, value):
|
def access_token(self, value):
|
||||||
self._access_token = value
|
self._access_token = value
|
||||||
if isinstance(value, str_type) and len(value) >= 12:
|
if isinstance(value, str_type) and len(value) >= 12:
|
||||||
self.censored_access_token = '{}***{}'.format(value[:4], value[-4:])
|
self.censored_access_token = '{0}***{1}'.format(value[:4], value[-4:]) # http://xbmc.ru/forum/showpost.php?p=107619&postcount=20
|
||||||
else:
|
else:
|
||||||
self.censored_access_token = value
|
self.censored_access_token = value
|
||||||
logger.debug('access_token = %r', self.censored_access_token)
|
logger.debug('access_token = %r', self.censored_access_token)
|
||||||
|
BIN
lib/vk/api.pyc
Normal file
BIN
lib/vk/api.pyc
Normal file
Binary file not shown.
@ -33,7 +33,7 @@ class VkAPIError(VkException):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_pretty_request_params(error_data):
|
def get_pretty_request_params(error_data):
|
||||||
request_params = error_data.get('request_params', ())
|
request_params = error_data.get('request_params', ())
|
||||||
request_params = {param['key']: param['value'] for param in request_params}
|
request_params = dict((param['key'], param['value']) for param in request_params) # http://xbmc.ru/forum/showpost.php?p=107615&postcount=16
|
||||||
return request_params
|
return request_params
|
||||||
|
|
||||||
def is_access_token_incorrect(self):
|
def is_access_token_incorrect(self):
|
||||||
|
BIN
lib/vk/exceptions.pyc
Normal file
BIN
lib/vk/exceptions.pyc
Normal file
Binary file not shown.
BIN
lib/vk/logs.pyc
Normal file
BIN
lib/vk/logs.pyc
Normal file
Binary file not shown.
BIN
lib/vk/mixins.pyc
Normal file
BIN
lib/vk/mixins.pyc
Normal file
Binary file not shown.
BIN
lib/vk/tests.pyc
Normal file
BIN
lib/vk/tests.pyc
Normal file
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
from collections import Iterable
|
from collections import Iterable
|
||||||
|
BIN
lib/vk/utils.pyc
Normal file
BIN
lib/vk/utils.pyc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user