diff --git a/.gitignore b/.gitignore index 47b6178..d3c3f58 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ __pycache__/ *.egg-info/ dist/ build/ -.venv/ \ No newline at end of file +.venv/ +.idea/ +**/.DS_Store \ No newline at end of file diff --git a/justoneapi/__init__.py b/justoneapi/__init__.py index aebf1b8..c1afe52 100644 --- a/justoneapi/__init__.py +++ b/justoneapi/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.1.0" +__version__ = "1.2.0" diff --git a/justoneapi/apis/bilibili.py b/justoneapi/apis/bilibili.py index 7a585be..1a67064 100644 --- a/justoneapi/apis/bilibili.py +++ b/justoneapi/apis/bilibili.py @@ -15,6 +15,7 @@ def get_video_detail_v2(self, bvid: str): } return request_util.get_request(url, params) + # todo next main version, change 'aid' to 'param' def get_user_video_list_v2(self, uid: str, aid: str = None): url = f"{config.BASE_URL}/api/bilibili/get-user-video-list/v2" params = { diff --git a/justoneapi/apis/weibo.py b/justoneapi/apis/weibo.py index 578ec90..1b9dddf 100644 --- a/justoneapi/apis/weibo.py +++ b/justoneapi/apis/weibo.py @@ -55,3 +55,11 @@ def get_weibo_detail_v1(self, id: str): } return request_util.get_request(url, params) + def get_user_detail_v1(self, uid: str): + url = f"{config.BASE_URL}/api/weibo/get-user-detail/v1" + params = { + "token": self.token, + "uid": uid, + } + return request_util.get_request(url, params) + diff --git a/pyproject.toml b/pyproject.toml index 3db33ee..8faa5ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "justoneapi" -version = "1.1.0" +version = "1.2.0" description = "Official Python SDK for Just One API" authors = [{ name="Just One API", email="justoneapi@gmail.com" }] readme = "README.md" diff --git a/tests/test_weibo.py b/tests/test_weibo.py index 4336948..e914956 100644 --- a/tests/test_weibo.py +++ b/tests/test_weibo.py @@ -24,3 +24,8 @@ def test_get_weibo_detail_v1(self): result, data, message = self.client.weibo.get_weibo_detail_v1(id="5062665714010525") if result: print(json.dumps(data, ensure_ascii=False)) + + def test_get_user_detail_v1(self): + result, data, message = self.client.weibo.get_user_detail_v1(uid="2387903701") + if result: + print(json.dumps(data, ensure_ascii=False))
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: