Skip to content

Commit

Permalink
missing field on Image resource
Browse files Browse the repository at this point in the history
* add the variation_id field to the Image resoure.
* cleanup up the formatting
  • Loading branch information
marz619 committed Apr 16, 2020
1 parent 95a6c4d commit edc8d9b
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions gapipy/resources/tour/image.py
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# Python 2 and 3
from __future__ import unicode_literals

from ..base import Resource
Expand All @@ -16,7 +15,10 @@

class ImageFile(BaseModel):
_as_is_fields = [
'url', 'data', 'mime_type', 'exif',
'url',
'data',
'mime_type',
'exif',
]


Expand All @@ -25,9 +27,24 @@ class Image(Resource):
_resource_name = 'images'

_as_is_fields = [
'id', 'href', 'modification', 'description', 'keywords',
'attribution', 'channels', 'variations', 'type',
'id',
'href',
'variation_id',
'attribution',
'channels',
'description',
'keywords',
'modification',
'type',
'variations',
]
_date_time_fields_local = [
'date_created',
'date_last_modified',
]
_resource_fields = [
('original', 'Image'),
]
_model_fields = [
('file', ImageFile),
]
_date_time_fields_local = ['date_created', 'date_last_modified']
_resource_fields = [('original', 'Image')]
_model_fields = [('file', ImageFile)]

0 comments on commit edc8d9b

Please sign in to comment.