1<?xml version="1.0" encoding="ascii"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3 "DTD/xhtml1-transitional.dtd"> 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 5<head> 6 <title>googleapiclient.model</title> 7 <link rel="stylesheet" href="epydoc.css" type="text/css" /> 8 <script type="text/javascript" src="epydoc.js"></script> 9</head> 10 11<body bgcolor="white" text="black" link="blue" vlink="#204080" 12 alink="#204080"> 13<!-- ==================== NAVIGATION BAR ==================== --> 14<table class="navbar" border="0" width="100%" cellpadding="0" 15 bgcolor="#a0c0ff" cellspacing="0"> 16 <tr valign="middle"> 17 <!-- Home link --> 18 <th> <a 19 href="googleapiclient-module.html">Home</a> </th> 20 21 <!-- Tree link --> 22 <th> <a 23 href="module-tree.html">Trees</a> </th> 24 25 <!-- Index link --> 26 <th> <a 27 href="identifier-index.html">Indices</a> </th> 28 29 <!-- Help link --> 30 <th> <a 31 href="help.html">Help</a> </th> 32 33 <th class="navbar" width="100%"></th> 34 </tr> 35</table> 36<table width="100%" cellpadding="0" cellspacing="0"> 37 <tr valign="top"> 38 <td width="100%"> 39 <span class="breadcrumbs"> 40 <a href="googleapiclient-module.html">Package googleapiclient</a> :: 41 Module model 42 </span> 43 </td> 44 <td> 45 <table cellpadding="0" cellspacing="0"> 46 <!-- hide/show private --> 47 <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" 48 onclick="toggle_private();">hide private</a>]</span></td></tr> 49 <tr><td align="right"><span class="options" 50 >[<a href="frames.html" target="_top">frames</a 51 >] | <a href="googleapiclient.model-module.html" 52 target="_top">no frames</a>]</span></td></tr> 53 </table> 54 </td> 55 </tr> 56</table> 57<!-- ==================== MODULE DESCRIPTION ==================== --> 58<h1 class="epydoc">Module model</h1><p class="nomargin-top"><span class="codelink"><a href="googleapiclient.model-pysrc.html">source code</a></span></p> 59<pre class="literalblock"> 60Model objects for requests and responses. 61 62Each API may support one or more serializations, such 63as JSON, Atom, etc. The model classes are responsible 64for converting between the wire format and the Python 65object representation. 66 67</pre> 68 69<hr /> 70<div class="fields"> <p><strong>Author:</strong> 71 jcgregorio@google.com (Joe Gregorio) 72 </p> 73</div><!-- ==================== CLASSES ==================== --> 74<a name="section-Classes"></a> 75<table class="summary" border="1" cellpadding="3" 76 cellspacing="0" width="100%" bgcolor="white"> 77<tr bgcolor="#70b0f0" class="table-header"> 78 <td colspan="2" class="table-header"> 79 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 80 <tr valign="top"> 81 <td align="left"><span class="table-header">Classes</span></td> 82 <td align="right" valign="top" 83 ><span class="options">[<a href="#section-Classes" 84 class="privatelink" onclick="toggle_private();" 85 >hide private</a>]</span></td> 86 </tr> 87 </table> 88 </td> 89</tr> 90<tr> 91 <td width="15%" align="right" valign="top" class="summary"> 92 <span class="summary-type"> </span> 93 </td><td class="summary"> 94 <a href="googleapiclient.model.Model-class.html" class="summary-name">Model</a><br /> 95 Model base class. 96 </td> 97 </tr> 98<tr> 99 <td width="15%" align="right" valign="top" class="summary"> 100 <span class="summary-type"> </span> 101 </td><td class="summary"> 102 <a href="googleapiclient.model.BaseModel-class.html" class="summary-name">BaseModel</a><br /> 103 Base model class. 104 </td> 105 </tr> 106<tr> 107 <td width="15%" align="right" valign="top" class="summary"> 108 <span class="summary-type"> </span> 109 </td><td class="summary"> 110 <a href="googleapiclient.model.JsonModel-class.html" class="summary-name">JsonModel</a><br /> 111 Model class for JSON. 112 </td> 113 </tr> 114<tr> 115 <td width="15%" align="right" valign="top" class="summary"> 116 <span class="summary-type"> </span> 117 </td><td class="summary"> 118 <a href="googleapiclient.model.RawModel-class.html" class="summary-name">RawModel</a><br /> 119 Model class for requests that don't return JSON. 120 </td> 121 </tr> 122<tr> 123 <td width="15%" align="right" valign="top" class="summary"> 124 <span class="summary-type"> </span> 125 </td><td class="summary"> 126 <a href="googleapiclient.model.MediaModel-class.html" class="summary-name">MediaModel</a><br /> 127 Model class for requests that return Media. 128 </td> 129 </tr> 130<tr> 131 <td width="15%" align="right" valign="top" class="summary"> 132 <span class="summary-type"> </span> 133 </td><td class="summary"> 134 <a href="googleapiclient.model.ProtocolBufferModel-class.html" class="summary-name">ProtocolBufferModel</a><br /> 135 Model class for protocol buffers. 136 </td> 137 </tr> 138</table> 139<!-- ==================== FUNCTIONS ==================== --> 140<a name="section-Functions"></a> 141<table class="summary" border="1" cellpadding="3" 142 cellspacing="0" width="100%" bgcolor="white"> 143<tr bgcolor="#70b0f0" class="table-header"> 144 <td colspan="2" class="table-header"> 145 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 146 <tr valign="top"> 147 <td align="left"><span class="table-header">Functions</span></td> 148 <td align="right" valign="top" 149 ><span class="options">[<a href="#section-Functions" 150 class="privatelink" onclick="toggle_private();" 151 >hide private</a>]</span></td> 152 </tr> 153 </table> 154 </td> 155</tr> 156<tr class="private"> 157 <td width="15%" align="right" valign="top" class="summary"> 158 <span class="summary-type"> </span> 159 </td><td class="summary"> 160 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 161 <tr> 162 <td><span class="summary-sig"><a name="_abstract"></a><span class="summary-sig-name">_abstract</span>()</span></td> 163 <td align="right" valign="top"> 164 <span class="codelink"><a href="googleapiclient.model-pysrc.html#_abstract">source code</a></span> 165 166 </td> 167 </tr> 168 </table> 169 170 </td> 171 </tr> 172<tr> 173 <td width="15%" align="right" valign="top" class="summary"> 174 <span class="summary-type"> </span> 175 </td><td class="summary"> 176 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 177 <tr> 178 <td><span class="summary-sig"><a href="googleapiclient.model-module.html#makepatch" class="summary-sig-name">makepatch</a>(<span class="summary-sig-arg">original</span>, 179 <span class="summary-sig-arg">modified</span>)</span><br /> 180 Create a patch object.</td> 181 <td align="right" valign="top"> 182 <span class="codelink"><a href="googleapiclient.model-pysrc.html#makepatch">source code</a></span> 183 184 </td> 185 </tr> 186 </table> 187 188 </td> 189 </tr> 190</table> 191<!-- ==================== VARIABLES ==================== --> 192<a name="section-Variables"></a> 193<table class="summary" border="1" cellpadding="3" 194 cellspacing="0" width="100%" bgcolor="white"> 195<tr bgcolor="#70b0f0" class="table-header"> 196 <td colspan="2" class="table-header"> 197 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 198 <tr valign="top"> 199 <td align="left"><span class="table-header">Variables</span></td> 200 <td align="right" valign="top" 201 ><span class="options">[<a href="#section-Variables" 202 class="privatelink" onclick="toggle_private();" 203 >hide private</a>]</span></td> 204 </tr> 205 </table> 206 </td> 207</tr> 208<tr> 209 <td width="15%" align="right" valign="top" class="summary"> 210 <span class="summary-type"> </span> 211 </td><td class="summary"> 212 <a name="LOGGER"></a><span class="summary-name">LOGGER</span> = <code title="logging.getLogger(__name__)">logging.getLogger(__name__)</code> 213 </td> 214 </tr> 215<tr> 216 <td width="15%" align="right" valign="top" class="summary"> 217 <span class="summary-type"> </span> 218 </td><td class="summary"> 219 <a name="dump_request_response"></a><span class="summary-name">dump_request_response</span> = <code title="False">False</code> 220 </td> 221 </tr> 222</table> 223<!-- ==================== FUNCTION DETAILS ==================== --> 224<a name="section-FunctionDetails"></a> 225<table class="details" border="1" cellpadding="3" 226 cellspacing="0" width="100%" bgcolor="white"> 227<tr bgcolor="#70b0f0" class="table-header"> 228 <td colspan="2" class="table-header"> 229 <table border="0" cellpadding="0" cellspacing="0" width="100%"> 230 <tr valign="top"> 231 <td align="left"><span class="table-header">Function Details</span></td> 232 <td align="right" valign="top" 233 ><span class="options">[<a href="#section-FunctionDetails" 234 class="privatelink" onclick="toggle_private();" 235 >hide private</a>]</span></td> 236 </tr> 237 </table> 238 </td> 239</tr> 240</table> 241<a name="makepatch"></a> 242<div> 243<table class="details" border="1" cellpadding="3" 244 cellspacing="0" width="100%" bgcolor="white"> 245<tr><td> 246 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 247 <tr valign="top"><td> 248 <h3 class="epydoc"><span class="sig"><span class="sig-name">makepatch</span>(<span class="sig-arg">original</span>, 249 <span class="sig-arg">modified</span>)</span> 250 </h3> 251 </td><td align="right" valign="top" 252 ><span class="codelink"><a href="googleapiclient.model-pysrc.html#makepatch">source code</a></span> 253 </td> 254 </tr></table> 255 256 <pre class="literalblock"> 257Create a patch object. 258 259Some methods support PATCH, an efficient way to send updates to a resource. 260This method allows the easy construction of patch bodies by looking at the 261differences between a resource before and after it was modified. 262 263Args: 264 original: object, the original deserialized resource 265 modified: object, the modified deserialized resource 266Returns: 267 An object that contains only the changes from original to modified, in a 268 form suitable to pass to a PATCH method. 269 270Example usage: 271 item = service.activities().get(postid=postid, userid=userid).execute() 272 original = copy.deepcopy(item) 273 item['object']['content'] = 'This is updated.' 274 service.activities.patch(postid=postid, userid=userid, 275 body=makepatch(original, item)).execute() 276 277</pre> 278 <dl class="fields"> 279 </dl> 280</td></tr></table> 281</div> 282<br /> 283<!-- ==================== NAVIGATION BAR ==================== --> 284<table class="navbar" border="0" width="100%" cellpadding="0" 285 bgcolor="#a0c0ff" cellspacing="0"> 286 <tr valign="middle"> 287 <!-- Home link --> 288 <th> <a 289 href="googleapiclient-module.html">Home</a> </th> 290 291 <!-- Tree link --> 292 <th> <a 293 href="module-tree.html">Trees</a> </th> 294 295 <!-- Index link --> 296 <th> <a 297 href="identifier-index.html">Indices</a> </th> 298 299 <!-- Help link --> 300 <th> <a 301 href="help.html">Help</a> </th> 302 303 <th class="navbar" width="100%"></th> 304 </tr> 305</table> 306<table border="0" cellpadding="0" cellspacing="0" width="100%%"> 307 <tr> 308 <td align="left" class="footer"> 309 Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:27 2019 310 </td> 311 <td align="right" class="footer"> 312 <a target="mainFrame" href="http://epydoc.sourceforge.net" 313 >http://epydoc.sourceforge.net</a> 314 </td> 315 </tr> 316</table> 317 318<script type="text/javascript"> 319 <!-- 320 // Private objects are initially displayed (because if 321 // javascript is turned off then we want them to be 322 // visible); but by default, we want to hide them. So hide 323 // them unless we have a cookie that says to show them. 324 checkCookie(); 325 // --> 326</script> 327</body> 328</html> 329