Ejemplo n.º 1
0
def create_payment_request():
    """
    Create a new `Picture`.
    """
    print request.data
    
    picture = PictureStore.create(Picture(**loads(request.data)))

    return (jsonify({'created_at': picture.created_at,
                     'updated_at': picture.updated_at,
                     'author': picture.author,
                     'file_id': picture.file_id,
                     'id': picture.id,
                     'edition': picture.edition}),
                     201)
Ejemplo n.º 2
0
def get_payment_request(picture_id):
    """
    Get an existing `Picture`.

    :param picture_id - Picture id

    """
    print picture_id
    picture = PictureStore.retrieve(picture_id) 
    return (jsonify({'created_at': picture.created_at,
                     'updated_at': picture.updated_at,
                     'author': picture.author,
                     'file_id': picture.file_id,
                     'id': picture.id,
                     'edition': picture.edition}),
                     200)