Example #1
0
def getPhotosByTag(tag):
        try:
            url = Flickr_Urls._SEARCH_URL.format(tag).encode('utf-8')
            photoList = HttpUtils.sendRequest(url)
            p = models.RelatedList(photoList)._photoList
            return p
        except Exception as e:
            raise e.message()
Example #2
0
def getInfoOnRelatedPhotos(photoList):
    # get info on each photo and
    outputPhotoList = []
    dateConflictHash = {}

    if photoList is not None:
        for photo in photoList:
            url = Flickr_Urls._GET_INFO_URL.format(photo._id).encode('utf-8')
            photoInfo = HttpUtils.sendRequest(url)
            info = photo.populatePhotoInfo(photoInfo)
            if info is not None:
                #to do:  resolve conflicting taken dates
                outputPhotoList.append(info)
    # generate json data for timeline of photos
        return outputPhotoList
    else:
        return None