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 DataResponse containing information about
17 * friends, contacts, profile, app data, and activities.
19 * Whenever a dataRequest is sent to the server it will return a dataResponse
20 * object. Values from the server will be mapped to the requested keys specified
27 * This object contains the requested server data mapped to the requested keys.
31 * <a href="opensocial.DataRequest.html">DataRequest</a>
34 * @name opensocial.DataResponse
38 * Construct the data response.
39 * This object contains the requested server data mapped to the requested keys.
41 * @param {Map.<String, ResponseItem>} responseItems Key/value map of data
42 * response information
43 * @param {Boolean} opt_globalError Optional field indicating whether there were
44 * any errors generating this data response
49 opensocial.DataResponse = function() {};
53 * Returns true if there was an error in fetching this data from the server.
55 * @return {Boolean} True if there was an error; otherwise, false
56 * @member opensocial.DataResponse
58 opensocial.DataResponse.prototype.hadError = function() {};
62 * If the entire request had a batch level error, returns the error message.
64 * @return {String} A human-readable description of the error that occurred.
66 opensocial.DataResponse.prototype.getErrorMessage = function() {};
70 * Gets the ResponseItem for the requested field.
72 * @return {opensocial.ResponseItem} The requested
73 * <a href="opensocial.ResponseItem.html">response</a> calculated by the
75 * @member opensocial.DataResponse
77 opensocial.DataResponse.prototype.get = function(key) {};