"""
__version__ = '1.0'
-from . models import *
+from . models import Status, User, DirectMessage, Friendship, SavedSearch, SearchResult, models
from . error import TweepError
from . api import API
-from . cache import *
+from . cache import Cache, MemoryCache, FileCache, MemCache
from . auth import BasicAuthHandler, OAuthHandler
from . streaming import Stream
import mimetypes
from . binder import bind_api
-from . parsers import *
from . error import TweepError
from . auth import BasicAuthHandler, OAuthHandler
+from tweepy.parsers import *
"""Twitter API"""
class API(object):
parser = parse_trend_results
)(self)
+
+""" Pack image file into multipart-formdata request"""
def _pack_image(filename, max_size):
"""Pack image from file into multipart-formdata post body"""
# image must be less than 700kb in size
return cache_result
# Open connection
+ # FIXME: add timeout
if api.secure:
- conn = httplib.HTTPSConnection(_host, timeout=10.0)
+ conn = httplib.HTTPSConnection(_host)
else:
- conn = httplib.HTTPConnection(_host, timeout=10.0)
+ conn = httplib.HTTPConnection(_host)
# Build request
conn.request(method, url, headers=headers, body=post_data)