From f765a8a6b10705ef53617bb3ba48d1e601ac2a36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20T=C3=A4sler?=
Date: Sun, 14 Jul 2019 01:54:01 +0200
Subject: [PATCH] API v2: get followers, get followed
---
README.rst | 4 ++++
wykop/api/v2/clients.py | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/README.rst b/README.rst
index 8c2e5ce..f87bda0 100644
--- a/README.rst
+++ b/README.rst
@@ -402,6 +402,10 @@ API w wersji 2 posiada następujące wbudowane metody.
+-------------------+--------------------------------+
| ? | unblock_profile |
+-------------------+--------------------------------+
+| ? | get_followed |
++-------------------+--------------------------------+
+| ? | get_followers |
++-------------------+--------------------------------+
| **Search** |
+-------------------+--------------------------------+
| ? | search_links |
diff --git a/wykop/api/v2/clients.py b/wykop/api/v2/clients.py
index ad1801a..df16a25 100644
--- a/wykop/api/v2/clients.py
+++ b/wykop/api/v2/clients.py
@@ -199,6 +199,20 @@ def get_link_downvoters(self, link_id):
}
return self.request('links', api_params=api_params)
+ def get_followed(self, username, page=1):
+ api_params = {
+ 'followed': username,
+ 'page': page
+ }
+ return self.request('profiles', api_params=api_params)
+
+ def get_followers(self, username, page=1):
+ api_params = {
+ 'followers': username,
+ 'page': page
+ }
+ return self.request('profiles', api_params=api_params)
+
# mywykop
@login_required