BASC-py4chan icon indicating copy to clipboard operation
BASC-py4chan copied to clipboard

Proposed pychan Abstract Class

Open antonizoon opened this issue 9 years ago • 1 comments

Since I am going to try and create py8chan and py420chan wrapper classes (since their APIs were based on 4chan's API), I have been refactoring the BASC-py4chan wrapper to make it more extendable.

However, maybe it might be a good idea to create an abstract class like we did in the BASC-Archiver, which defines a standard interface with default functions that is extended and overrided by py4chan or py8chan.

That way, most of the code to generate attributes can be shared, while special features of a website (such as 8chan's multiple images on one post) can also be supported with a few overrides.

antonizoon avatar May 21 '15 07:05 antonizoon

It looks like with py8chan, I have abandoned the idea of direct inheritance from py4chan (because 4chan's API stands to diverge, and 8chan will be moving to Infinity-Next). When 4chan's API shifts, that would have an effect on all the others, which often rarely change.

For now, we're just going to fork the wrapper each time and adapt it to new chans whenever necessary.

However, a pychan abstract class like that found in BASC-Archiver would still be desirable, though I would need Dan's help setting this up.

antonizoon avatar Nov 12 '15 20:11 antonizoon