@@ -13,7 +13,7 @@ def __init__(self, project_id, name=None):
13
13
self ._project_id = None
14
14
self ._project_name = None
15
15
self ._tags = set ()
16
- self ._type = None
16
+ self ._datasource_type = None
17
17
self ._updated_at = None
18
18
self .name = name
19
19
self .owner_id = None
@@ -61,8 +61,8 @@ def tags(self):
61
61
return self ._tags
62
62
63
63
@property
64
- def type (self ):
65
- return self ._type
64
+ def datasource_type (self ):
65
+ return self ._datasource_type
66
66
67
67
@property
68
68
def updated_at (self ):
@@ -79,14 +79,14 @@ def _parse_common_tags(self, datasource_xml):
79
79
self ._set_values (None , None , None , None , None , updated_at , None , project_id , project_name , owner_id )
80
80
return self
81
81
82
- def _set_values (self , id , name , type , content_url , created_at ,
82
+ def _set_values (self , id , name , datasource_type , content_url , created_at ,
83
83
updated_at , tags , project_id , project_name , owner_id ):
84
84
if id is not None :
85
85
self ._id = id
86
86
if name :
87
87
self .name = name
88
- if type :
89
- self ._type = type
88
+ if datasource_type :
89
+ self ._datasource_type = datasource_type
90
90
if content_url :
91
91
10000
self ._content_url = content_url
92
92
if created_at :
@@ -109,10 +109,10 @@ def from_response(cls, resp):
109
109
all_datasource_xml = parsed_response .findall ('.//t:datasource' , namespaces = NAMESPACE )
110
110
111
111
for datasource_xml in all_datasource_xml :
112
- (id , name , type , content_url , created_at , updated_at ,
112
+ (id , name , datasource_type , content_url , created_at , updated_at ,
113
113
tags , project_id , project_name , owner_id ) = cls ._parse_element (datasource_xml )
114
114
datasource_item = cls (project_id )
115
- datasource_item ._set_values (id , name , type , content_url , created_at , updated_at ,
115
+ datasource_item ._set_values (id , name , datasource_type , content_url , created_at , updated_at ,
116
116
tags , None , project_name , owner_id )
117
117
all_datasource_items .append (datasource_item )
118
118
return all_datasource_items
@@ -121,7 +121,7 @@ def from_response(cls, resp):
121
121
def _parse_element (datasource_xml ):
122
122
id = datasource_xml .get ('id' , None )
123
123
name = datasource_xml .get ('name' , None )
124
- type = datasource_xml .get ('type' , None )
124
+ datasource_type = datasource_xml .get ('type' , None )
125
125
content_url = datasource_xml .get ('contentUrl' , None )
126
126
created_at = datasource_xml .get ('createdAt' , None )
127
127
updated_at = datasource_xml .get ('updatedAt' , None )
@@ -143,4 +143,4 @@ def _parse_element(datasource_xml):
143
143
if owner_elem is not None :
144
144
owner_id = owner_elem .get ('id' , None )
145
145
146
- return id , name , type , content_url , created_at , updated_at , tags , project_id , project_name , owner_id
146
+ return id , name , datasource_type , content_url , created_at , updated_at , tags , project_id , project_name , owner_id
0 commit comments