remove old readme
[atutor.git] / jscripts / opensocial / phone.js
1 /*
2  * Licensed under the Apache License, Version 2.0 (the "License");
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  *     http://www.apache.org/licenses/LICENSE-2.0
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  * See the License for the specific language governing permissions and
12  * limitations under the License.
13  */
14
15 /**
16  * @fileoverview Representation of an phone number.
17  */
18
19
20 /**
21  * @class
22  * Base interface for all phone objects.
23  *
24  * @name opensocial.Phone
25  */
26
27
28 /**
29  * Base interface for all phone objects.
30  *
31  * @private
32  * @constructor
33  */
34 opensocial.Phone = function() {};
35
36
37 /**
38  * @static
39  * @class
40  * All of the fields that a phone has. These are the supported keys for the
41  * <a href="opensocial.Phone.html#getField">Phone.getField()</a> method.
42  *
43  * @name opensocial.Phone.Field
44  */
45 opensocial.Phone.Field = {
46   /**
47    * The phone number type or label, specified as a string.
48    * Examples: work, my favorite store, my house, etc.
49    * This field may be used interchangeably with the string 'type'.
50    * @member opensocial.Phone.Field
51    */
52   TYPE : 'type',
53
54   /**
55    * The phone number, specified as a string.
56    * This field may be used interchangeably with the string 'number'.
57    * @member opensocial.Phone.Field
58    */
59   NUMBER : 'number'
60 };
61
62
63 /**
64  * Gets data for this phone that is associated with the specified key.
65  *
66  * @param {String} key The key to get data for;
67  *    keys are defined in <a href="opensocial.Phone.Field.html"><code>
68  *    Phone.Field</code></a>
69  * @param {Map.&lt;opensocial.DataRequest.DataRequestFields, Object&gt;}
70  *  opt_params Additional
71  *    <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
72  *    to pass to the request.
73  * @return {String} The data
74  */
75 opensocial.Phone.prototype.getField = function(key, opt_params) {};