@@ -124,12 +124,12 @@ def delete(self, template_id):
124
124
results = self .request ('DELETE' , uri )
125
125
return results
126
126
127
- def get (self , template_id , is_draft = None ):
127
+ def get (self , template_id , draft = None ):
128
128
"""
129
129
Get a template by ID
130
130
131
131
:param str template_id: ID of the template you want to retrieve
132
- :param bool is_draft : Defaults to None. If True, returns the most
132
+ :param bool draft : Defaults to None. If True, returns the most
133
133
recent draft template. If False, returns the most recent published
134
134
template. If None, returns the most recent template version
135
135
regardless of draft or published.
@@ -139,8 +139,8 @@ def get(self, template_id, is_draft=None):
139
139
"""
140
140
uri = "%s/%s" % (self .uri , template_id )
141
141
params = {}
142
- if is_draft is not None :
143
- params ['draft' ] = str (is_draft ).lower ()
142
+ if draft is not None :
143
+ params ['draft' ] = str (draft ).lower ()
144
144
results = self .request ('GET' , uri , params = params )
145
145
return results
146
146
@@ -154,15 +154,15 @@ def list(self):
154
154
results = self .request ('GET' , self .uri )
155
155
return results
156
156
157
- def preview (self , template_id , substitution_data , is_draft = None ):
157
+ def preview (self , template_id , substitution_data , draft = None ):
158
158
"""
159
159
Get a preivew of your template by ID with the
160
160
provided substitution_data
161
161
162
162
:param str template_id: ID of the template you want to retrieve
163
163
:param dict substitution_data: data to be substituted in the
164
164
template content
165
- :param bool is_draft : Defaults to None. If True, previews the most
165
+ :param bool draft : Defaults to None. If True, previews the most
166
166
recent draft template. If False, previews the most recent published
167
167
template. If None, previews the most recent template version
168
168
regardless of draft or published.
@@ -173,8 +173,8 @@ def preview(self, template_id, substitution_data, is_draft=None):
173
173
"""
174
174
uri = "%s/%s/preview" % (self .uri , template_id )
175
175
params = {}
176
- if is_draft is not None :
177
- params ['draft' ] = str (is_draft ).lower ()
176
+ if draft is not None :
177
+ params ['draft' ] = str (draft ).lower ()
178
178
results = self .request ('POST' ,
179
179
uri ,
180
180
params = params ,
0 commit comments