e7a2685b37bfacf390aeea1f02b627589c544604
[atutor.git] / docs / jscripts / opensocial / bodyType.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 a body type.
17  */
18
19
20 /**
21  * @class
22  * Base interface for all body type objects.
23  *
24  * @name opensocial.BodyType
25  */
26
27
28 /**
29  * Base interface for all body type objects.
30  *
31  * @private
32  * @constructor
33  */
34 opensocial.BodyType = function() {};
35
36
37 /**
38  * @static
39  * @class
40  * All of the fields that a body type has. These are the supported keys for the
41  * <a href="opensocial.BodyType.html#getField">BodyType.getField()</a>
42  * method.
43  *
44  * @name opensocial.BodyType.Field
45  */
46 opensocial.BodyType.Field = {
47   /**
48    * The build of the person's body, specified as a string.
49    * Container support for this field is OPTIONAL.
50    * This field may be used interchangeably with the string 'build'.
51    * @member opensocial.BodyType.Field
52    */
53   BUILD : 'build',
54
55   /**
56    * The height of the person in meters, specified as a number.
57    * Container support for this field is OPTIONAL.
58    * This field may be used interchangeably with the string 'height'.
59    * @member opensocial.BodyType.Field
60    */
61   HEIGHT : 'height',
62
63   /**
64    * The weight of the person in kilograms, specified as a number.
65    * Container support for this field is OPTIONAL.
66    * This field may be used interchangeably with the string 'weight'.
67    * @member opensocial.BodyType.Field
68    */
69   WEIGHT : 'weight',
70
71   /**
72    * The eye color of the person, specified as a string.
73    * Container support for this field is OPTIONAL.
74    * This field may be used interchangeably with the string 'eyeColor'.
75    * @member opensocial.BodyType.Field
76    */
77   EYE_COLOR : 'eyeColor',
78
79   /**
80    * The hair color of the person, specified as a string.
81    * Container support for this field is OPTIONAL.
82    * This field may be used interchangeably with the string 'hairColor'.
83    * @member opensocial.BodyType.Field
84    */
85   HAIR_COLOR : 'hairColor'
86 };
87
88
89 /**
90  * Gets data for this body type that is associated with the specified key.
91  *
92  * @param {String} key The key to get data for;
93  *    keys are defined in <a href="opensocial.BodyType.Field.html"><code>
94  *    BodyType.Field</code></a>
95  * @param {Map.&lt;opensocial.DataRequest.DataRequestFields, Object&gt;}
96  *  opt_params Additional
97  *    <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
98  *    to pass to the request.
99  * @return {String} The data
100  */
101 opensocial.BodyType.prototype.getField = function(key, opt_params) {};