Skip to content

Commit b02a8ff

Browse files
committed
adapter refactoring: separated superclass
1 parent f574059 commit b02a8ff

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/adapter/adapter.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import abc
2+
3+
class Adapter(object):
4+
def __init__(self):
5+
self._list = self._get_list()
6+
7+
@abc.abstractmethod
8+
def _get_list(self):
9+
return []
10+
11+
def get_list(self):
12+
return self._list
13+
14+
def is_found(self, topic):
15+
return topic in self._list
16+
17+
@abc.abstractmethod
18+
def get_page(self, topic, request_options=None):
19+
pass

0 commit comments

Comments
 (0)