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
6 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 * @fileoverview Representation of an name.
22 * Base interface for all name objects.
24 * @name opensocial.Name
29 * Base interface for all name objects.
34 opensocial.Name = function() {};
40 * All of the fields that a name has. These are the supported keys for the
41 * <a href="opensocial.Name.html#getField">Name.getField()</a> method.
43 * @name opensocial.Name.Field
45 opensocial.Name.Field = {
47 * The family name, specified as a string.
48 * This field may be used interchangeably with the string 'familyName'.
49 * @member opensocial.Name.Field
51 FAMILY_NAME : 'familyName',
54 * The given name, specified as a string.
55 * This field may be used interchangeably with the string 'givenName'.
56 * @member opensocial.Name.Field
58 GIVEN_NAME : 'givenName',
61 * The additional name, specified as a string.
62 * This field may be used interchangeably with the string 'additionalName'.
63 * @member opensocial.Name.Field
65 ADDITIONAL_NAME : 'additionalName',
68 * The honorific prefix, specified as a string.
69 * This field may be used interchangeably with the string 'honorificPrefix'.
70 * @member opensocial.Name.Field
72 HONORIFIC_PREFIX : 'honorificPrefix',
75 * The honorific suffix, specified as a string.
76 * This field may be used interchangeably with the string 'honorificSuffix'.
77 * @member opensocial.Name.Field
79 HONORIFIC_SUFFIX : 'honorificSuffix',
82 * The unstructured name, specified as a string.
83 * This field may be used interchangeably with the string 'unstructured'.
84 * @member opensocial.Name.Field
86 UNSTRUCTURED : 'unstructured'
91 * Gets data for this name that is associated with the specified key.
93 * @param {String} key The key to get data for;
94 * keys are defined in <a href="opensocial.Name.Field.html"><code>
95 * Name.Field</code></a>
96 * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
97 * opt_params Additional
98 * <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
99 * to pass to the request.
100 * @return {String} The data
102 opensocial.Name.prototype.getField = function(key, opt_params) {};