add methods for Client

This commit is contained in:
Taehoon Kim
2015-04-18 22:21:27 +09:00
parent a81fff0211
commit 7ef3f2e25e
4 changed files with 46 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ fbchat
.. image:: https://pypip.in/license/fbchat/badge.svg?style=flat
: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
============

View File

@@ -1,7 +1,7 @@
# -*- coding: UTF-8 -*-
"""
Facebook Chat(Messenger) for Python
Facebook Chat (Messenger) for Python
"""

View File

@@ -7,3 +7,45 @@ Core components for fbchat
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

View File

@@ -43,7 +43,7 @@ setup(
author=author,
author_email=email,
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
@@ -64,7 +64,7 @@ setup(
'Topic :: Multimedia :: Graphics :: Presentation',
'Topic :: Software Development :: Libraries :: Python Modules',
],
description="Facebook Chat(Messenger) for Python",
description="Facebook Chat (Messenger) for Python",
keywords=["facebook chat fbchat"],
include_package_data=True,
license=license_content,