Joe Gregorio | 52a5c53 | 2013-01-24 16:19:07 -0500 | [diff] [blame^] | 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>oauth2client.appengine.CredentialsNDBProperty</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 | |
| 18 | <!-- Tree link --> |
| 19 | <th> <a |
| 20 | href="module-tree.html">Trees</a> </th> |
| 21 | |
| 22 | <!-- Index link --> |
| 23 | <th> <a |
| 24 | href="identifier-index.html">Indices</a> </th> |
| 25 | |
| 26 | <!-- Help link --> |
| 27 | <th> <a |
| 28 | href="help.html">Help</a> </th> |
| 29 | |
| 30 | <th class="navbar" width="100%"></th> |
| 31 | </tr> |
| 32 | </table> |
| 33 | <table width="100%" cellpadding="0" cellspacing="0"> |
| 34 | <tr valign="top"> |
| 35 | <td width="100%"> |
| 36 | <span class="breadcrumbs"> |
| 37 | <a href="oauth2client-module.html">Package oauth2client</a> :: |
| 38 | <a href="oauth2client.appengine-module.html">Module appengine</a> :: |
| 39 | Class CredentialsNDBProperty |
| 40 | </span> |
| 41 | </td> |
| 42 | <td> |
| 43 | <table cellpadding="0" cellspacing="0"> |
| 44 | <!-- hide/show private --> |
| 45 | <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" |
| 46 | onclick="toggle_private();">hide private</a>]</span></td></tr> |
| 47 | <tr><td align="right"><span class="options" |
| 48 | >[<a href="frames.html" target="_top">frames</a |
| 49 | >] | <a href="oauth2client.appengine.CredentialsNDBProperty-class.html" |
| 50 | target="_top">no frames</a>]</span></td></tr> |
| 51 | </table> |
| 52 | </td> |
| 53 | </tr> |
| 54 | </table> |
| 55 | <!-- ==================== CLASS DESCRIPTION ==================== --> |
| 56 | <h1 class="epydoc">Class CredentialsNDBProperty</h1><p class="nomargin-top"><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty">source code</a></span></p> |
| 57 | <center> |
| 58 | <center> <map id="class_hierarchy_for_credential_3" name="class_hierarchy_for_credential_3"> |
| 59 | <area shape="rect" id="node1" href="javascript:void(0);" title="google.appengine.ext.ndb.BlobProperty" alt="" coords="5,6,253,34"/> |
| 60 | <area shape="rect" id="node2" href="oauth2client.appengine.CredentialsNDBProperty-class.html" title="CredentialsNDBProperty" alt="" coords="277,6,443,34"/> |
| 61 | </map> |
| 62 | <img src="class_hierarchy_for_credential_3.gif" alt='' usemap="#class_hierarchy_for_credential_3" ismap="ismap" class="graph-without-title" /> |
| 63 | </center> |
| 64 | </center> |
| 65 | <hr /> |
| 66 | <pre class="literalblock"> |
| 67 | App Engine NDB datastore Property for Credentials. |
| 68 | |
| 69 | Serves the same purpose as the DB CredentialsProperty, but for NDB models. |
| 70 | Since CredentialsProperty stores data as a blob and this inherits from |
| 71 | BlobProperty, the data in the datastore will be the same as in the DB case. |
| 72 | |
| 73 | Utility property that allows easy storage and retrieval of Credentials and |
| 74 | subclasses. |
| 75 | |
| 76 | </pre> |
| 77 | |
| 78 | <!-- ==================== INSTANCE METHODS ==================== --> |
| 79 | <a name="section-InstanceMethods"></a> |
| 80 | <table class="summary" border="1" cellpadding="3" |
| 81 | cellspacing="0" width="100%" bgcolor="white"> |
| 82 | <tr bgcolor="#70b0f0" class="table-header"> |
| 83 | <td colspan="2" class="table-header"> |
| 84 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 85 | <tr valign="top"> |
| 86 | <td align="left"><span class="table-header">Instance Methods</span></td> |
| 87 | <td align="right" valign="top" |
| 88 | ><span class="options">[<a href="#section-InstanceMethods" |
| 89 | class="privatelink" onclick="toggle_private();" |
| 90 | >hide private</a>]</span></td> |
| 91 | </tr> |
| 92 | </table> |
| 93 | </td> |
| 94 | </tr> |
| 95 | <tr class="private"> |
| 96 | <td width="15%" align="right" valign="top" class="summary"> |
| 97 | <span class="summary-type"> </span> |
| 98 | </td><td class="summary"> |
| 99 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 100 | <tr> |
| 101 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsNDBProperty-class.html#_validate" class="summary-sig-name" onclick="show_private();">_validate</a>(<span class="summary-sig-arg">self</span>, |
| 102 | <span class="summary-sig-arg">value</span>)</span><br /> |
| 103 | Validates a value as a proper credentials object.</td> |
| 104 | <td align="right" valign="top"> |
| 105 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._validate">source code</a></span> |
| 106 | |
| 107 | </td> |
| 108 | </tr> |
| 109 | </table> |
| 110 | |
| 111 | </td> |
| 112 | </tr> |
| 113 | <tr class="private"> |
| 114 | <td width="15%" align="right" valign="top" class="summary"> |
| 115 | <span class="summary-type"> </span> |
| 116 | </td><td class="summary"> |
| 117 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 118 | <tr> |
| 119 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsNDBProperty-class.html#_to_base_type" class="summary-sig-name" onclick="show_private();">_to_base_type</a>(<span class="summary-sig-arg">self</span>, |
| 120 | <span class="summary-sig-arg">value</span>)</span><br /> |
| 121 | Converts our validated value to a JSON serialized string.</td> |
| 122 | <td align="right" valign="top"> |
| 123 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._to_base_type">source code</a></span> |
| 124 | |
| 125 | </td> |
| 126 | </tr> |
| 127 | </table> |
| 128 | |
| 129 | </td> |
| 130 | </tr> |
| 131 | <tr class="private"> |
| 132 | <td width="15%" align="right" valign="top" class="summary"> |
| 133 | <span class="summary-type"> </span> |
| 134 | </td><td class="summary"> |
| 135 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 136 | <tr> |
| 137 | <td><span class="summary-sig"><a href="oauth2client.appengine.CredentialsNDBProperty-class.html#_from_base_type" class="summary-sig-name" onclick="show_private();">_from_base_type</a>(<span class="summary-sig-arg">self</span>, |
| 138 | <span class="summary-sig-arg">value</span>)</span><br /> |
| 139 | Converts our stored JSON string back to the desired type.</td> |
| 140 | <td align="right" valign="top"> |
| 141 | <span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._from_base_type">source code</a></span> |
| 142 | |
| 143 | </td> |
| 144 | </tr> |
| 145 | </table> |
| 146 | |
| 147 | </td> |
| 148 | </tr> |
| 149 | </table> |
| 150 | <!-- ==================== METHOD DETAILS ==================== --> |
| 151 | <a name="section-MethodDetails"></a> |
| 152 | <table class="details" border="1" cellpadding="3" |
| 153 | cellspacing="0" width="100%" bgcolor="white"> |
| 154 | <tr bgcolor="#70b0f0" class="table-header"> |
| 155 | <td colspan="2" class="table-header"> |
| 156 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 157 | <tr valign="top"> |
| 158 | <td align="left"><span class="table-header">Method Details</span></td> |
| 159 | <td align="right" valign="top" |
| 160 | ><span class="options">[<a href="#section-MethodDetails" |
| 161 | class="privatelink" onclick="toggle_private();" |
| 162 | >hide private</a>]</span></td> |
| 163 | </tr> |
| 164 | </table> |
| 165 | </td> |
| 166 | </tr> |
| 167 | </table> |
| 168 | <a name="_validate"></a> |
| 169 | <div class="private"> |
| 170 | <table class="details" border="1" cellpadding="3" |
| 171 | cellspacing="0" width="100%" bgcolor="white"> |
| 172 | <tr><td> |
| 173 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 174 | <tr valign="top"><td> |
| 175 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_validate</span>(<span class="sig-arg">self</span>, |
| 176 | <span class="sig-arg">value</span>)</span> |
| 177 | </h3> |
| 178 | </td><td align="right" valign="top" |
| 179 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._validate">source code</a></span> |
| 180 | </td> |
| 181 | </tr></table> |
| 182 | |
| 183 | <pre class="literalblock"> |
| 184 | Validates a value as a proper credentials object. |
| 185 | |
| 186 | Args: |
| 187 | value: A value to be set on the property. |
| 188 | |
| 189 | Raises: |
| 190 | TypeError if the value is not an instance of Credentials. |
| 191 | |
| 192 | </pre> |
| 193 | <dl class="fields"> |
| 194 | </dl> |
| 195 | </td></tr></table> |
| 196 | </div> |
| 197 | <a name="_to_base_type"></a> |
| 198 | <div class="private"> |
| 199 | <table class="details" border="1" cellpadding="3" |
| 200 | cellspacing="0" width="100%" bgcolor="white"> |
| 201 | <tr><td> |
| 202 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 203 | <tr valign="top"><td> |
| 204 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_to_base_type</span>(<span class="sig-arg">self</span>, |
| 205 | <span class="sig-arg">value</span>)</span> |
| 206 | </h3> |
| 207 | </td><td align="right" valign="top" |
| 208 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._to_base_type">source code</a></span> |
| 209 | </td> |
| 210 | </tr></table> |
| 211 | |
| 212 | <pre class="literalblock"> |
| 213 | Converts our validated value to a JSON serialized string. |
| 214 | |
| 215 | Args: |
| 216 | value: A value to be set in the datastore. |
| 217 | |
| 218 | Returns: |
| 219 | A JSON serialized version of the credential, else '' if value is None. |
| 220 | |
| 221 | </pre> |
| 222 | <dl class="fields"> |
| 223 | </dl> |
| 224 | </td></tr></table> |
| 225 | </div> |
| 226 | <a name="_from_base_type"></a> |
| 227 | <div class="private"> |
| 228 | <table class="details" border="1" cellpadding="3" |
| 229 | cellspacing="0" width="100%" bgcolor="white"> |
| 230 | <tr><td> |
| 231 | <table width="100%" cellpadding="0" cellspacing="0" border="0"> |
| 232 | <tr valign="top"><td> |
| 233 | <h3 class="epydoc"><span class="sig"><span class="sig-name">_from_base_type</span>(<span class="sig-arg">self</span>, |
| 234 | <span class="sig-arg">value</span>)</span> |
| 235 | </h3> |
| 236 | </td><td align="right" valign="top" |
| 237 | ><span class="codelink"><a href="oauth2client.appengine-pysrc.html#CredentialsNDBProperty._from_base_type">source code</a></span> |
| 238 | </td> |
| 239 | </tr></table> |
| 240 | |
| 241 | <pre class="literalblock"> |
| 242 | Converts our stored JSON string back to the desired type. |
| 243 | |
| 244 | Args: |
| 245 | value: A value from the datastore to be converted to the desired type. |
| 246 | |
| 247 | Returns: |
| 248 | A deserialized Credentials (or subclass) object, else None if the |
| 249 | value can't be parsed. |
| 250 | |
| 251 | </pre> |
| 252 | <dl class="fields"> |
| 253 | </dl> |
| 254 | </td></tr></table> |
| 255 | </div> |
| 256 | <br /> |
| 257 | <!-- ==================== NAVIGATION BAR ==================== --> |
| 258 | <table class="navbar" border="0" width="100%" cellpadding="0" |
| 259 | bgcolor="#a0c0ff" cellspacing="0"> |
| 260 | <tr valign="middle"> |
| 261 | |
| 262 | <!-- Tree link --> |
| 263 | <th> <a |
| 264 | href="module-tree.html">Trees</a> </th> |
| 265 | |
| 266 | <!-- Index link --> |
| 267 | <th> <a |
| 268 | href="identifier-index.html">Indices</a> </th> |
| 269 | |
| 270 | <!-- Help link --> |
| 271 | <th> <a |
| 272 | href="help.html">Help</a> </th> |
| 273 | |
| 274 | <th class="navbar" width="100%"></th> |
| 275 | </tr> |
| 276 | </table> |
| 277 | <table border="0" cellpadding="0" cellspacing="0" width="100%%"> |
| 278 | <tr> |
| 279 | <td align="left" class="footer"> |
| 280 | Generated by Epydoc 3.0.1 on Thu Jan 24 16:14:39 2013 |
| 281 | </td> |
| 282 | <td align="right" class="footer"> |
| 283 | <a target="mainFrame" href="http://epydoc.sourceforge.net" |
| 284 | >http://epydoc.sourceforge.net</a> |
| 285 | </td> |
| 286 | </tr> |
| 287 | </table> |
| 288 | |
| 289 | <script type="text/javascript"> |
| 290 | <!-- |
| 291 | // Private objects are initially displayed (because if |
| 292 | // javascript is turned off then we want them to be |
| 293 | // visible); but by default, we want to hide them. So hide |
| 294 | // them unless we have a cookie that says to show them. |
| 295 | checkCookie(); |
| 296 | // --> |
| 297 | </script> |
| 298 | </body> |
| 299 | </html> |