~paulliu/friends/add-twitter-contacts

« back to all changes in this revision

Viewing changes to friends/utils/avatar.py

  • Committer: Robert Bruce Park
  • Date: 2012-11-06 17:46:30 UTC
  • mfrom: (14.1.18 upload)
  • Revision ID: robert.park@canonical.com-20121106174630-h1ro8s27s7yzp3oa
Add uploading support to Facebook, including tests.

This introduces a new Uploader class to complement the Downloader, and
they have a lot of shared code in the HTTP class.

I've also ripped out the get_json helper method, because it's meaning
is now ambiguous and somewhat redundant. You must now explicitly call
either Downloader() or Uploader() depending on what you're trying to
do.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from gi.repository import Gio, GLib, GdkPixbuf
29
29
from hashlib import sha1
30
30
 
31
 
from friends.utils.download import Downloader
 
31
from friends.utils.http import Downloader
32
32
 
33
33
 
34
34
CACHE_DIR = os.path.realpath(os.path.join(