tripleuni


Nametripleuni JSON
Version 0.4.2 PyPI version JSON
download
home_pageNone
Summarypython library for tripleuni
upload_time2024-10-28 14:38:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseCopyright (c) 2016 The Python Packaging Authority (PyPA) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords web tripleuni
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tripleuni
A python library for tripleuni.
## Installation
```bash
pip install tripleuni
```

## Usage
### Login
you need to login to use the library
#### login in terminal
```python
from tripleuni import TripleClient
client = TripleClient()
client.sendVerification("your email address")
client.verifyCode("your verification code")
```
#### login by token
```python
from tripleuni import TripleClient
client = TripleClient("your token")
```

### list of methods
```python
### login
def sendVerification(self, email: str) -> dict:
def verifyCode(self, code: str) -> dict:

### get post and comment
def getPostList(self, page: int = 0) -> dict:
def getDetail(self, uni_post_id: int) -> dict:

### post operations
def followPost(self, uni_post_id: int) -> dict:
def reportPost(self, uni_post_id: int, comment_order: int, comment_msg: str, report_msg: str) -> dict:

### comment and reply
def commentMsg(self, uniPostId: int, msg: str, real_name: str = 'false') -> dict:
def replyMsg(self, uni_post_id: int, comment_father_id: int, msg: str, real_name: str = 'false') -> dict:

### chat
def createChatSession(self, uni_post_id: int, real_name: str = 'false') -> dict:
def sendChatMsg(self, chat_id: int, msg: str) -> dict:
def sendChatMsgToPost(self, uni_post_id: int, msg: str, real_name: str = 'false') -> dict:

### chat with bot
#### return a string of chat messages
def chatWithChatbot(self, msg: str, history: str = '[]') -> str:
#### return a iterator of chat messages
def streamWithChatbot(self, msg: str, history: str = '[]') -> iterator:
```

### Some examples
```python
# get post list
postList = client.getPostList(page=1)

# comment a post
client.commentMsg(1234, "hello", real_name='false')

# send chat message to post owner
client.sendChatMsgToPost(1234, "hello", real_name='false')

```

## For Maintainers

### Build
```bash
py -m pip install --upgrade build
py -m build
```

```bash
py -m pip install --upgrade twine
twine upload dist/*
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tripleuni",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Zilong ZHOU <zzl0712@outlook.com>",
    "keywords": "web, tripleuni",
    "author": null,
    "author_email": "Zilong ZHOU <zzl0712@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/ab/70/5d9d15fdac16306e010a35b96e091d212aa78f897bc2c936c2c3bcfcd9f2/tripleuni-0.4.2.tar.gz",
    "platform": null,
    "description": "# tripleuni\r\nA python library for tripleuni.\r\n## Installation\r\n```bash\r\npip install tripleuni\r\n```\r\n\r\n## Usage\r\n### Login\r\nyou need to login to use the library\r\n#### login in terminal\r\n```python\r\nfrom tripleuni import TripleClient\r\nclient = TripleClient()\r\nclient.sendVerification(\"your email address\")\r\nclient.verifyCode(\"your verification code\")\r\n```\r\n#### login by token\r\n```python\r\nfrom tripleuni import TripleClient\r\nclient = TripleClient(\"your token\")\r\n```\r\n\r\n### list of methods\r\n```python\r\n### login\r\ndef sendVerification(self, email: str) -> dict:\r\ndef verifyCode(self, code: str) -> dict:\r\n\r\n### get post and comment\r\ndef getPostList(self, page: int = 0) -> dict:\r\ndef getDetail(self, uni_post_id: int) -> dict:\r\n\r\n### post operations\r\ndef followPost(self, uni_post_id: int) -> dict:\r\ndef reportPost(self, uni_post_id: int, comment_order: int, comment_msg: str, report_msg: str) -> dict:\r\n\r\n### comment and reply\r\ndef commentMsg(self, uniPostId: int, msg: str, real_name: str = 'false') -> dict:\r\ndef replyMsg(self, uni_post_id: int, comment_father_id: int, msg: str, real_name: str = 'false') -> dict:\r\n\r\n### chat\r\ndef createChatSession(self, uni_post_id: int, real_name: str = 'false') -> dict:\r\ndef sendChatMsg(self, chat_id: int, msg: str) -> dict:\r\ndef sendChatMsgToPost(self, uni_post_id: int, msg: str, real_name: str = 'false') -> dict:\r\n\r\n### chat with bot\r\n#### return a string of chat messages\r\ndef chatWithChatbot(self, msg: str, history: str = '[]') -> str:\r\n#### return a iterator of chat messages\r\ndef streamWithChatbot(self, msg: str, history: str = '[]') -> iterator:\r\n```\r\n\r\n### Some examples\r\n```python\r\n# get post list\r\npostList = client.getPostList(page=1)\r\n\r\n# comment a post\r\nclient.commentMsg(1234, \"hello\", real_name='false')\r\n\r\n# send chat message to post owner\r\nclient.sendChatMsgToPost(1234, \"hello\", real_name='false')\r\n\r\n```\r\n\r\n## For Maintainers\r\n\r\n### Build\r\n```bash\r\npy -m pip install --upgrade build\r\npy -m build\r\n```\r\n\r\n```bash\r\npy -m pip install --upgrade twine\r\ntwine upload dist/*\r\n```\r\n\r\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2016 The Python Packaging Authority (PyPA)  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "python library for tripleuni",
    "version": "0.4.2",
    "project_urls": null,
    "split_keywords": [
        "web",
        " tripleuni"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f46b2d6cc4d07862c8b74d261754594869f5f3bb4ec9ccaba964feeb0d5b7d11",
                "md5": "da524cb176b4d0c831d62ce2eb3db738",
                "sha256": "80a7bca4188bd5624196a070c7b034d27e512f62973554afb6fa52e3e71a7f10"
            },
            "downloads": -1,
            "filename": "tripleuni-0.4.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "da524cb176b4d0c831d62ce2eb3db738",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6091,
            "upload_time": "2024-10-28T14:37:59",
            "upload_time_iso_8601": "2024-10-28T14:37:59.330351Z",
            "url": "https://files.pythonhosted.org/packages/f4/6b/2d6cc4d07862c8b74d261754594869f5f3bb4ec9ccaba964feeb0d5b7d11/tripleuni-0.4.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab705d9d15fdac16306e010a35b96e091d212aa78f897bc2c936c2c3bcfcd9f2",
                "md5": "0319ba314ed3d1d6b5250ecbda1bbfe7",
                "sha256": "654e7ed15e3f4a7e397eda545350054c562333aabfb1172e3028b6cb46e0b8d4"
            },
            "downloads": -1,
            "filename": "tripleuni-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0319ba314ed3d1d6b5250ecbda1bbfe7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8409,
            "upload_time": "2024-10-28T14:38:01",
            "upload_time_iso_8601": "2024-10-28T14:38:01.098567Z",
            "url": "https://files.pythonhosted.org/packages/ab/70/5d9d15fdac16306e010a35b96e091d212aa78f897bc2c936c2c3bcfcd9f2/tripleuni-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-28 14:38:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tripleuni"
}
        
Elapsed time: 0.37593s