Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -15,7 +15,7 @@ from .client import *
|
|||||||
|
|
||||||
|
|
||||||
__copyright__ = 'Copyright 2015 by Taehoon Kim'
|
__copyright__ = 'Copyright 2015 by Taehoon Kim'
|
||||||
__version__ = '0.0.3'
|
__version__ = '0.1.0'
|
||||||
__license__ = 'BSD'
|
__license__ = 'BSD'
|
||||||
__author__ = 'Taehoon Kim'
|
__author__ = 'Taehoon Kim'
|
||||||
__email__ = 'carpedm20@gmail.com'
|
__email__ = 'carpedm20@gmail.com'
|
||||||
|
@@ -154,6 +154,10 @@ class Client(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def getUsers(self, name):
|
def getUsers(self, name):
|
||||||
|
"""Find and get user by his/her name
|
||||||
|
|
||||||
|
:param name: name of a person
|
||||||
|
"""
|
||||||
payload = {
|
payload = {
|
||||||
'value' : name.lower(),
|
'value' : name.lower(),
|
||||||
'viewer' : self.uid,
|
'viewer' : self.uid,
|
||||||
@@ -174,6 +178,11 @@ class Client(object):
|
|||||||
return users # have bug TypeError: __repr__ returned non-string (type bytes)
|
return users # have bug TypeError: __repr__ returned non-string (type bytes)
|
||||||
|
|
||||||
def sendMessage(self, message, thread_id):
|
def sendMessage(self, message, thread_id):
|
||||||
|
"""Send a message with given thread id
|
||||||
|
|
||||||
|
:param message: a text that you want to send
|
||||||
|
:param thread_id: a thread id that you want to send a message
|
||||||
|
"""
|
||||||
timestamp = now()
|
timestamp = now()
|
||||||
date = datetime.now()
|
date = datetime.now()
|
||||||
data = {
|
data = {
|
||||||
@@ -211,6 +220,11 @@ class Client(object):
|
|||||||
|
|
||||||
|
|
||||||
def getThreadList(self, start, end=None):
|
def getThreadList(self, start, end=None):
|
||||||
|
"""Get thread list of your facebook account.
|
||||||
|
|
||||||
|
:param start: the start index of a thread
|
||||||
|
:param end: (optional) the last index of a thread
|
||||||
|
"""
|
||||||
if not end:
|
if not end:
|
||||||
end = start + 20
|
end = start + 20
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user