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 a URL.
22 * Base interface for all URL objects.
24 * @name opensocial.Url
29 * Base interface for all URL objects.
34 opensocial.Url = function() {};
40 * All of the fields that a URL has. These are the supported keys for the
41 * <a href="opensocial.Url.html#getField">Url.getField()</a> method.
43 * @name opensocial.Url.Field
45 opensocial.Url.Field = {
47 * The URL number type or label, specified as a string.
48 * Examples: work, blog feed, website, etc.
49 * This field may be used interchangeably with the string 'type'.
50 * @member opensocial.Url.Field
55 * The text of the link, specified as a string.
56 * This field may be used interchangeably with the string 'linkText'.
57 * @member opensocial.Url.Field
59 LINK_TEXT : 'linkText',
62 * The address the URL points to, specified as a string.
63 * This field may be used interchangeably with the string 'address'.
64 * @member opensocial.Url.Field
71 * Gets data for this URL that is associated with the specified key.
73 * @param {String} key The key to get data for;
74 * keys are defined in <a href="opensocial.Url.Field.html"><code>
75 * Url.Field</code></a>
76 * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
77 * opt_params Additional
78 * <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
79 * to pass to the request.
80 * @return {String} The data
82 opensocial.Url.prototype.getField = function(key, opt_params) {};