{"id":15558601,"url":"https://github.com/mozillazg/python-shanbay","last_synced_at":"2025-06-26T03:04:12.384Z","repository":{"id":11742077,"uuid":"14270014","full_name":"mozillazg/python-shanbay","owner":"mozillazg","description":"提供一系列操作扇贝网 (www.shanbay.com) 的 API（不再维护）","archived":false,"fork":false,"pushed_at":"2017-02-09T12:50:39.000Z","size":72,"stargazers_count":43,"open_issues_count":3,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-14T06:53:30.492Z","etag":null,"topics":["python","shanbay"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozillazg.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-10T03:26:05.000Z","updated_at":"2021-08-29T09:32:20.000Z","dependencies_parsed_at":"2022-08-20T09:01:02.441Z","dependency_job_id":null,"html_url":"https://github.com/mozillazg/python-shanbay","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mozillazg/python-shanbay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozillazg%2Fpython-shanbay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozillazg%2Fpython-shanbay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozillazg%2Fpython-shanbay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozillazg%2Fpython-shanbay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozillazg","download_url":"https://codeload.github.com/mozillazg/python-shanbay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozillazg%2Fpython-shanbay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260022759,"owners_count":22947219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","shanbay"],"created_at":"2024-10-02T15:39:53.032Z","updated_at":"2025-06-26T03:04:12.353Z","avatar_url":"https://github.com/mozillazg.png","language":"Python","readme":"python-shanbay\n==============\n\n提供一系列操纵扇贝网 (www.shanbay.com) 的 API 。\n\n|Build| |PyPI version|\n\n\n\n* Documentation: http://python-shanbay.rtfd.org\n* GitHub: https://github.com/mozillazg/python-shanbay\n* Free software: MIT license\n* PyPI: https://pypi.python.org/pypi/shanbay\n* Python version: 2.6, 2.7, pypy, 3.3, 3.4, 3.5\n\n\nFeatures\n--------\n\n* send/reply message\n* manage team\n* support shanbay api v1\n\n\nInstallation\n------------\n\nTo install python-shanbay, simply:\n\n.. code-block:: bash\n\n    $ pip install shanbay\n\n\nBasic Usage\n-----------\n\nOAuth2 认证 API（可以通过 `这个脚本`__ 获取 token)\n\n__ https://gist.github.com/mozillazg/4af649ff88612b2de7c7\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from shanbay import API\n    \u003e\u003e\u003e token = {\n    \"access_token\": \"7ANNoQFY02rJkqqm8Zi67aQ9N6ES8G\",\n    \"expires_in\": \"1592000\", \"expires_at\": 1328664099.868803,\n    \"token_type\": \"Bearer\", \"state\": \"H3rTN84NG2TdunSt9bG02acEkSNWiW\",\n    \"scope\": [ \"read\", \"write\" ]\n    }\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e api = API('client_id_xxyyyx', token)\n    \u003e\u003e\u003e api.user()\n    {u'avatar': u'http://qstatic.shanbay.com/avatar/media_store/3034aee41d32d464aac362cf608cb735.png?imageView/1/w/80/h/80/',\n u'id': 1279912,\n    u'nickname': u'\\u266b mozillazg',\n    u'username': u'mozillazg'}\n    \u003e\u003e\u003e\n\n用户名密码认证 API（不支持 REST API）\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from shanbay import Shanbay, Message\n    \u003e\u003e\u003e shanbay = Shanbay('username', 'password')\n    \u003e\u003e\u003e shanbay.login()\n    True\n    \u003e\u003e\u003e message = Message(shanbay)\n    \u003e\u003e\u003e message.send_message(['mozillazg'], 'hello', 'hello')\n    True\n\n\n使用案例\n----------\n\n已知以下项目使用了本模块, 欢迎添加你的项目 ;)\n\n* `python-shanbay-team-assistant \u003chttps://github.com/mozillazg/python-shanbay-team-assistant\u003e`__\n\n\n.. |Build| image:: https://api.travis-ci.org/mozillazg/python-shanbay.png?branch=master\n   :target: https://travis-ci.org/mozillazg/python-shanbay\n.. |PyPI version| image:: https://img.shields.io/pypi/v/shanbay.svg\n   :target: https://pypi.python.org/pypi/shanbay\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozillazg%2Fpython-shanbay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozillazg%2Fpython-shanbay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozillazg%2Fpython-shanbay/lists"}