1616
1717log = logging .getLogger (__name__ )
1818
19+
1920class ContentType :
2021 """
2122 Content type defines the structure or schema of a page or a
@@ -49,7 +50,8 @@ def entry(self, entry_uid: str):
4950 raise PermissionError ('Please provide valid content_type_uid' )
5051 if entry_uid is None :
5152 raise PermissionError ('Please provide valid entry uid' )
52- entry = Entry (self .http_instance , self .__content_type_uid , entry_uid = entry_uid )
53+ entry = Entry (self .http_instance ,
54+ self .__content_type_uid , entry_uid = entry_uid )
5355 return entry
5456
5557 def query (self ):
@@ -84,9 +86,11 @@ def fetch(self):
8486 ------------------------------
8587 """
8688 if self .__content_type_uid is None :
87- raise KeyError ('content_type_uid can not be None to fetch contenttype' )
89+ raise KeyError (
90+ 'content_type_uid can not be None to fetch contenttype' )
8891 self .local_param ['environment' ] = self .http_instance .headers ['environment' ]
89- uri = '{}/content_types/{}' .format (self .http_instance .endpoint , self .__content_type_uid )
92+ uri = '{}/content_types/{}' .format (
93+ self .http_instance .endpoint , self .__content_type_uid )
9094 encoded_params = parse .urlencode (self .local_param )
9195 url = '{}?{}' .format (uri , encoded_params )
9296 result = self .http_instance .get (url )
@@ -111,6 +115,7 @@ def find(self, params=None):
111115 if params is not None :
112116 self .local_param .update (params )
113117 encoded_params = parse .urlencode (self .local_param )
114- url = '{}?{}' .format ('{}/content_types' .format (self .http_instance .endpoint ), encoded_params )
118+ url = '{}?{}' .format (
119+ '{}/content_types' .format (self .http_instance .endpoint ), encoded_params )
115120 result = self .http_instance .get (url )
116121 return result
0 commit comments