File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ > ** Notice:** Currently this project is just a framework. It does not work yet.
2+ > If you wan't to get updated when 1.0.0 is released, then click Watch -> Custom -> Releases -> Apply
3+
14[ ![ Contributors] [ contributors-shield ]] [ contributors-url ]
25[ ![ Forks] [ forks-shield ]] [ forks-url ]
36[ ![ Stargazers] [ stars-shield ]] [ stars-url ]
Original file line number Diff line number Diff line change @@ -18,3 +18,7 @@ black = "^21.5b1"
1818[build-system ]
1919requires = [" poetry>=0.12" ]
2020build-backend = " poetry.masonry.api"
21+
22+ [tool .isort ]
23+ profile = " black"
24+ multi_line_output = 3
Original file line number Diff line number Diff line change 1+ """ReplAPI-it is a project originally started in Node.js by RayhanADev.
2+ This is a Python flavor which intends to mimic the same functions and classes.
3+ """
4+
5+ from .core import ReplAPI # noqa: F401
Original file line number Diff line number Diff line change 1+ from .post import _Post
2+ from .user import _User
3+
4+ defaultInitVars = {"username" : None }
5+
6+
7+ class ReplAPI (object ):
8+ """Base class for all ReplAPI-it features.
9+ Everything should be accessed through this class.
10+ Do not import anything else unless you know what you are doing."""
11+
12+ def __init__ (self , initVars : dict = {}):
13+ self .vars = {** defaultInitVars , ** initVars }
14+
15+ self .User = _User
16+ self .Post = _Post
Original file line number Diff line number Diff line change 1+ class _Post (object ):
2+ def __init__ (self , num : int ):
3+ """Get post data."""
4+ self .num = num
5+
6+ def postDataFull (self ) -> dict :
7+ # Grab post data, return dict
8+ example = {"title" : "Some title here" }
9+ return example
Original file line number Diff line number Diff line change 1+ class _User (object ):
2+ def __init__ (self , username : str ):
3+ """Get user data."""
4+ self .username = username
5+
6+ def userGraphQLDataFull (self ) -> dict :
7+ # Grab data, return info
8+ example = {"karma" : 102 }
9+ return example
You can’t perform that action at this time.
0 commit comments