add methods for Client
This commit is contained in:
@@ -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
|
||||||
|
2
setup.py
2
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',
|
||||||
|
Reference in New Issue
Block a user