upd requests / python 3.6
This commit is contained in:
22
README.rst
22
README.rst
@@ -1,3 +1,18 @@
|
|||||||
|
.. image:: http://img.shields.io/badge/python-3.6-orange.svg
|
||||||
|
:target: https://pypi.python.org/pypi/django-th/
|
||||||
|
:alt: Python version supported
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: http://img.shields.io/badge/python-3.5-orange.svg
|
||||||
|
:target: https://pypi.python.org/pypi/django-th/
|
||||||
|
:alt: Python version supported
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: http://img.shields.io/badge/license-BSD-blue.svg
|
||||||
|
:target: https://pypi.python.org/pypi/django-th/
|
||||||
|
:alt: License
|
||||||
|
|
||||||
|
|
||||||
============
|
============
|
||||||
Wallabag API
|
Wallabag API
|
||||||
============
|
============
|
||||||
@@ -7,7 +22,7 @@ Python API for Wallabag v2
|
|||||||
Requirements :
|
Requirements :
|
||||||
==============
|
==============
|
||||||
|
|
||||||
* requests 2.5.0
|
* requests 2.13.0
|
||||||
|
|
||||||
|
|
||||||
Installation:
|
Installation:
|
||||||
@@ -37,7 +52,7 @@ Creating a post :
|
|||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
from wallabag_api.wallabag import Wallabag
|
from wallabag_api.wallabag import Wallabag
|
||||||
# settings
|
# settings
|
||||||
params = {'username': 'foxmask',
|
params = {'username': 'foxmask',
|
||||||
'password': 'mypass',
|
'password': 'mypass',
|
||||||
'client_id': 'myid',
|
'client_id': 'myid',
|
||||||
@@ -67,6 +82,8 @@ Testing :
|
|||||||
|
|
||||||
Install Wallabag V2 on your own host like explain here http://doc.wallabag.org/en/v2/user/installation.html
|
Install Wallabag V2 on your own host like explain here http://doc.wallabag.org/en/v2/user/installation.html
|
||||||
|
|
||||||
|
Then run the development version (with make run)
|
||||||
|
|
||||||
Then create a client API like explain here http://doc.wallabag.org/en/v2/developer/api.html
|
Then create a client API like explain here http://doc.wallabag.org/en/v2/developer/api.html
|
||||||
|
|
||||||
this will give you somthing like this
|
this will give you somthing like this
|
||||||
@@ -79,4 +96,3 @@ Then replace the client_id / client_secret / login / pass to wallabag_test.py an
|
|||||||
|
|
||||||
python wallabag_test.py
|
python wallabag_test.py
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
from wallabag_api import __version__ as version
|
from wallabag_api import __version__ as version
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'requests==2.5.0',
|
'requests-2.13.0',
|
||||||
]
|
]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
@@ -16,13 +16,13 @@ setup(
|
|||||||
"wallabag_api-" + version + ".zip",
|
"wallabag_api-" + version + ".zip",
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 3.4',
|
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
|
'Programming Language :: Python :: 3.6',
|
||||||
'Topic :: Internet',
|
'Topic :: Internet',
|
||||||
'Topic :: Communications',
|
'Topic :: Communications',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
VERSION = (1, 1, 0) # PEP 386
|
VERSION = (1, 2, 0) # PEP 386
|
||||||
__version__ = ".".join([str(x) for x in VERSION])
|
__version__ = ".".join([str(x) for x in VERSION])
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from wallabag import Wallabag
|
|||||||
|
|
||||||
class TestWallabag(unittest.TestCase):
|
class TestWallabag(unittest.TestCase):
|
||||||
|
|
||||||
host = 'http://localhost:8080'
|
host = 'http://localhost:8000'
|
||||||
client_id = ''
|
client_id = ''
|
||||||
client_secret = ''
|
client_secret = ''
|
||||||
token = ''
|
token = ''
|
||||||
@@ -20,12 +20,14 @@ class TestWallabag(unittest.TestCase):
|
|||||||
|
|
||||||
def test_get_token(self):
|
def test_get_token(self):
|
||||||
params = {"grant_type": "password",
|
params = {"grant_type": "password",
|
||||||
"client_id": '1_37e16ub8a62oc4gwcg0o0wssks800kw0ok408kkwo4kosgc88g',
|
"client_id":
|
||||||
"client_secret": '49etxpn66da8okg4cs40sswsog0sskwg4woc400c4w4w8s4wo4',
|
'1_4wqe1riwt0qoks844kwc4go08koogkgk88go4cckkwg0408kcg',
|
||||||
"username": 'foxmask',
|
"client_secret": '4mzw3qwi1xyc0cks4k80s4c8kco40wwkkkw0g40kwk4o4c44co',
|
||||||
"password": 'ratatab00m'}
|
"username": 'wallabag',
|
||||||
|
"password": 'wallabag'}
|
||||||
data = Wallabag.get_token(host='http://localhost:8080', **params)
|
print(self.host)
|
||||||
|
data = Wallabag.get_token(host=self.host, **params)
|
||||||
|
print(data)
|
||||||
self.assertTrue(isinstance(data, str), True)
|
self.assertTrue(isinstance(data, str), True)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user