diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2014-10-29 14:32:24 +0100 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-03-03 22:22:14 +0100 |
commit | 4c14f36ab73f227bdd7ed636667d8035c33986e0 (patch) | |
tree | 7deb8919953a72a93553f95b3643e75afdb75110 /pyaggr3g470r/lib | |
parent | Release 6.1. Updated NEWS.rst (diff) | |
download | newspipe-4c14f36ab73f227bdd7ed636667d8035c33986e0.tar.gz newspipe-4c14f36ab73f227bdd7ed636667d8035c33986e0.tar.bz2 newspipe-4c14f36ab73f227bdd7ed636667d8035c33986e0.zip |
global esthetics tweak
Diffstat (limited to 'pyaggr3g470r/lib')
-rw-r--r-- | pyaggr3g470r/lib/__init__.py | 0 | ||||
-rwxr-xr-x | pyaggr3g470r/lib/client.py | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pyaggr3g470r/lib/__init__.py b/pyaggr3g470r/lib/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pyaggr3g470r/lib/__init__.py diff --git a/pyaggr3g470r/lib/client.py b/pyaggr3g470r/lib/client.py new file mode 100755 index 00000000..da6b1727 --- /dev/null +++ b/pyaggr3g470r/lib/client.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +import json +import requests +URL = 'domain.net' + + +def get_client(email, password): + client = requests.session() + client.get(URL + 'api/csrf', verify=False, + data=json.dumps({'email': email, + 'password': password})) + return client + + +def get_articles(client): + return client.get(URL + 'api/v1.0/articles/').json |