Merge pull request #89 from crustymonkey/master
Small update to Python Gallery 3 client library
This commit is contained in:
commit
77c4d5b792
@ -22,7 +22,16 @@ __all__ = ['Album' , 'Image' , 'LocalImage' , 'RemoteImage' , 'LocalMovie' ,
|
||||
'RemoteMovie' , 'getItemFromResp' , 'getItemsFromResp']
|
||||
|
||||
from datetime import datetime
|
||||
import json , weakref , types , os , mimetypes , re
|
||||
import weakref , types , os , mimetypes , re
|
||||
try:
|
||||
import json
|
||||
except:
|
||||
try:
|
||||
import simplejson
|
||||
except ImportError , e:
|
||||
raise ImportError('You must have either the "json" or "simplejson"'
|
||||
'library installed!')
|
||||
|
||||
|
||||
class BaseRemote(object):
|
||||
def __init__(self , respObj , weakGalObj , weakParent=None):
|
||||
|
@ -26,7 +26,15 @@ from G3Items import getItemFromResp , getItemsFromResp , BaseRemote , Album , \
|
||||
RemoteImage , Tag
|
||||
from urllib import quote , urlencode
|
||||
from uuid import uuid4
|
||||
import urllib2 , os , json
|
||||
import urllib2 , os
|
||||
try:
|
||||
import json
|
||||
except:
|
||||
try:
|
||||
import simplejson
|
||||
except ImportError , e:
|
||||
raise ImportError('You must have either the "json" or "simplejson"'
|
||||
'library installed!')
|
||||
|
||||
class Gallery3(object):
|
||||
"""
|
||||
@ -129,7 +137,6 @@ class Gallery3(object):
|
||||
uri(str) : The uri string defining the resource on the defined host
|
||||
"""
|
||||
url = self._buildUrl(uri , kwargs)
|
||||
print url
|
||||
return self.getRespFromUrl(url)
|
||||
|
||||
def addAlbum(self , parent , albumName , title , description=''):
|
||||
|
@ -21,4 +21,4 @@
|
||||
from G3Items import *
|
||||
from Gallery3 import *
|
||||
|
||||
__version__ = '0.1.4'
|
||||
__version__ = '0.1.5'
|
||||
|
Reference in New Issue
Block a user