add methods for Client
This commit is contained in:
@@ -14,7 +14,7 @@ fbchat
|
|||||||
.. image:: https://pypip.in/license/fbchat/badge.svg?style=flat
|
.. image:: https://pypip.in/license/fbchat/badge.svg?style=flat
|
||||||
:target: https://pypi.python.org/pypi/fbchat
|
:target: https://pypi.python.org/pypi/fbchat
|
||||||
|
|
||||||
Facebook Chat(`Messenger <https://www.messenger.com/>`__) for Python.
|
Facebook Chat (`Messenger <https://www.messenger.com/>`__) for Python.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Facebook Chat(Messenger) for Python
|
Facebook Chat (Messenger) for Python
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,3 +7,45 @@ Core components for fbchat
|
|||||||
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
import time
|
||||||
|
|
||||||
|
class Client:
|
||||||
|
"""A client for the Facebook Chat (Messenger).
|
||||||
|
|
||||||
|
See http://github.com/carpedm20/fbchat for complete
|
||||||
|
documentation for the API.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, email, password):
|
||||||
|
"""A client for the Facebook Chat (Messenger).
|
||||||
|
|
||||||
|
:param email: Facebook `email` or `id` or `phone number`
|
||||||
|
:param password: Facebook account password
|
||||||
|
|
||||||
|
import fbchat
|
||||||
|
chat = fbchat.Client(email, password)
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
if not (email and password):
|
||||||
|
raise Exception("id and password or config is needed")
|
||||||
|
|
||||||
|
|
||||||
|
self.email = email
|
||||||
|
self.password = password
|
||||||
|
|
||||||
|
def listen(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def getUserId(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def sendMessage(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def sendSticker(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def markAsRead(self):
|
||||||
|
pass
|
||||||
|
4
setup.py
4
setup.py
@@ -43,7 +43,7 @@ setup(
|
|||||||
author=author,
|
author=author,
|
||||||
author_email=email,
|
author_email=email,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 1 - Planning',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'Intended Audience :: Information Technology',
|
'Intended Audience :: Information Technology',
|
||||||
@@ -64,7 +64,7 @@ setup(
|
|||||||
'Topic :: Multimedia :: Graphics :: Presentation',
|
'Topic :: Multimedia :: Graphics :: Presentation',
|
||||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||||
],
|
],
|
||||||
description="Facebook Chat(Messenger) for Python",
|
description="Facebook Chat (Messenger) for Python",
|
||||||
keywords=["facebook chat fbchat"],
|
keywords=["facebook chat fbchat"],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
license=license_content,
|
license=license_content,
|
||||||
|
Reference in New Issue
Block a user