Educate yourself online!

Attention!

For new updates please visit http://www.shortquiz.blogspot.com


OpenSocial Test

By on 03:08

OpenSocial Test


What will the following code fetch for variable "xyz" in OpenSocial for Orkut?
Var xyz=gadgets.util.getUrlParameters()["gadgetId"];

a. Current User ID
b. Owner User ID
c. Application ID
d. View ID

What do you mean by "Activity" in OpenSocial API (v0.7)?

a. Action performed by a user
b. Addition of a new user
c. Deletion of an existing user
d. Moderation of users
e. None of the above

What is the functionality of the "getdomain" method in the Environment class in OpenSocial API (v0.7)?

a. It displays the url of  application
b. It gives  the current site on which the application is running
c. It gives information about the  gadget url and the language used
d. All of the above

You have a collection of multiple objects and you want to retrieve the size of that collection. Which of the following methods will you use in order to calculate the collection size?

a. getTotalSize()
b. size()
c. getCollectionSize()
d. getsize()

Which of the following are compulsory for creating an OpenSocial (v0.7) application for Orkut?

a. Orkut ID
b. Sandbox access
c. Goggle page hosting
d. Text editor
e. Database access

You have made a function named 'getfriends()', which will get the list of friends once the OpenSocial API is loaded. Which of the following event handler will call this function after the API has been loaded?

a. gadgets.util.registerOnLoadHandler(getfriends);
b. gadgets.io.makeRequest.getfriends();
c. gadgets.util.registerOnLoadHandler.getfriends();
d. gadgets.io.makeRequest(getfriends);

In RESTful Data API, the server interactions are handled by _______ protocol and the Authentication is handled by _____.

a. HTTPS, OAuth
b. AtomPub, BBAuth
c. HTTPS, BBAuth
d. AtomPub, OAuth

Some of the classes and methods in the 'gadget.*' namespace are feature-specific.
In which of the following tags must the'<Require feature="foo"/>' element be included in order to use them?

a. <Content>
b. <Module>
c. <![CDATA[]]>
d. <ModulePrefs>

Suppose there is an OpenSocial APT named 'Messages' which is integrated with the Google App Engine. Through which of the following API namespaces will OpenSocial app make calls and get data from API hosted on Google App Engine?

a. gadgets.io.MethodType(get)
b. gadgets.io.makeRequest
c. OpenSocial.DataRequest
d. OpenSocial.newDataRequest()

Which of the following are the supported keys for the Url.getField() method.?

a. ADDRESS
b. LINK_TEXT
c. TYPE
d. Referrer

You can embed flash objects with OpenSocial (v0.7).

a. True
b. False

If you want to handle the error of maximum usage of "Quotas" in OpenSocial (v0.7), which object field of the class "OpenSocial.ResponseItem.Error" will be used to handle the error?

a. BAD_REQUEST
b. FORBIDDEN
c. INTERNAL_ERROR
d. NOT_IMPLEMENTED
e. UNAUTHORIZED

You can not send mails to friends by using OpenSocial (v0.7) for Orkut application?

a. True
b. False

What does <ModulePrefs> section specify in OpenSocial (v0.7)?

a. Characteristics of the gadget
b. Controls that allow the users to specify settings for the gadget
c. Programming logic of the gadget
d. Language used in the gadget

What will happen if "&bpc=1" is appended to an orkut application canvas page url as querystring?

a. It will retain the cache of the page
b. It will load a fresh copy of the page
c. It will create cookies for the specific page
d. It will create language specific views for the page

IN OpenSocial, errors are returned through 'OpenSocial.ResponseItem.Error' namespace. Which of the following is not an error code?

a. NOT_FOUND
b. NOT_IMPLEMENTED
c. INTERNAL_ERROR
d. UNAUTHORIZED

You have created an OpenSocial API  "test.xml" and integrated it into Google App Engine. You don't want just anybody to be able to access your application data through the "test.xml" API. What should you do in order to restrict access to the users?

a. Add permissions on the API xml file
b. Add Digital signatures to the API xml file
c. Add username and password to the API xml file
d. You cannot do it as it is a Javascript and HTML supported API

What kind of data can be saved and retrieved in OpenSocial API (v0.7)?

a. per-user
b. global application
c. per-application
d. per-application instance

In the process of integrating OpenSocial API with Google App Engine, you do not need to maintain any servers.

a. True
b. False

What is the purpose of the "gadgets.util.escapeString" function?

a. It is used to HTML decode the string.
b. It is used to escape special characters in a string
c. It is used to escape invalid string codes
d. It is used to HTML encode the string

What is the fuctionallity of the "gadgets.MiniMessage" class in OpenSocial (v0.7)?

a. To create messages that will appear to the user within the gadget
b. To create messages which are being displayed on the main menu
c. To create messages which are used to send emails to friends
d. To create messages to access  data from other web servers

Persistence API provides a storage mechanism to save and load data. In which form is the data stored?

a. It is stored in the form of data objects
b. It is stored in the form of XML
c. It is stored in the form of encrypted codes
d. It is stored in the form of key/value pairs

In OpenSocial API, "OpenSocial.IdSpec.Field" namespace is used _____.

a. to get the groupid of the user
b. to get the titleid of the message in message template
c. to get the userid of the user
d. to get the network distance between two users

If the content is a feed and you want to fetch the number of entries in OpenSocial (v0.7), which object field of class "gadgets.io.RequestParameters" will be used?

a. AUTHORIZATION
b. CONTENT_TYPE
c. GET_SUMMARIES
d. HEADERS
e. METHOD
f. NUM_ENTRIES
g. POST_DATA

Which of the following are the valid ContentTypes under 'gadgets.io.ContentType' namespace?

a. DOM
b. FEED
c. SCRIPT
d. JSON

In Persistence API, the data store only accepts strings for storage, which means that you must convert complex data structures to strings before saving them. Which of the following functions is used to convert JavaScript objects and arrays to a string value?

a. gadgets.json.stringify
b. gadgets.io.stringify
c. gadgets.io.encodeValues
d. gadgets.io.text

Which of the following are the components of the OpenSocial API (v0.7)?

a. JavaScript API
b. Gadgets
c. Google App Code
d. RESTful API

Which of the following namespaces are included in OpenSocial JavaScript API (v0.7)?

a. OpenSocial-0.7.*
b. MyOpenSpace.*
c. OpenSocial.*
d. gadgets.*

Which of the following type conventions are used in OpenSocial Gadgets API?

a. Array<T>
b. var
c. string
d. Map.<K, V>
e. int

Which of the following methods are defined under "OpenSocial.Permission" namespace?

a. OpenSocial.hasPermission()
b. OpenSocial.Permission.VIEWER
c. OpenSocial.requestPermission()
d. OpenSocial.getPermission()

What is shown in "Activity Stream" in an Orkut application using OpenSocial (v0.7)?

a. Newly added application in orkut
b. Newly added themes in orkut
c. Recently added community
d. Updates of friends

Which of the following are authorizations of API  supported Gadgets in OpenSocial API (v0.7)?

a. gadgets.io.AuthorizationType.AUTHENTICATED
b. gadgets.io.AuthorizationType.SIGNED
c. gadgets.io.AuthorizationType.WEB
d. gadgets.io.AuthorizationType.FORM
e. gadgets.io.AuthorizationType.NONE

Arrange in proper sequence how an application gets live in Orkut using OpenSocial (v0.7).(Starting with the 1st)
1. Submitting the application to orkut
2. Registration at sandbox
3. Adding the application in sandbox
4. Creating an account in orkut

a. 4,1,2,3
b. 4,2,3,1
c. 2,4,3,1
d. 2,3,4,1

What is the function of the "gadgets.pubsub" namespace in OpenSocial API (v0.7)?

a. It is used to create feed channels.
b. It is used to publish messages to feed channels
c. It is used to subscribe gadgets to a messaging channel
d. It is used to unsubscribe gadgets from a messaging channel

With the help of the 'gadgets.io.makeRequest()'  function in OpenSocial API, you can _____.

a. get a user's profile data
b. get a user's friend lList
c. delete "Persistence Data"
d. add a user to the friend list.
e. fetch content from other web servers and web pages

What is the function of the "makerequest()" method in OpenSocial API (v0.7)?

a. It is used to add new content by the user
b. It is used to fetch content from other remote web servers and web pages
c. It is used to make a request for adding the specific application
d. It is used to make a  request for accessing some particular application

Which of the following are the constant identifiers in OpenSocial API?

a. OWNER
b. VIEWER
c. USERS
d. VIEWER_FRIENDS

Which of the following languages are used for integrating OpenSocial API with
Google App Engine?

a. Javascript
b. HTML
c. C++
d. JSON
e. Python

Which of the following Content Type Requests are handled by the
gadgets.io.makeRequest(url, callback, opt_params)
method?

a. Text Requests
b. DOM Requests
c. HTTP Requests
d. JSON Requests
e. FEED Requests

You want to build an OpenSocial API, and you want to configure the API to be run on version 0.7? Which of the following statements is the correct configuration?

a. <EnumValue feature="OpenSocial-0.7" />
b. <Require feature="OpenSocial-0.7" />
c. < EnumValue version="OpenSocial-0.7" />
d. <Require version="OpenSocial-0.7" />

Which of the following are the supported keys for the Person.getField() method.?

a. ABOUT_ME
b. NICKNAME
c. LIKES
d. TURN_OFFS

When you add an application to orkut sandbox by using OpenSocial (v0.7), which of the following types of users can add the application?

a. Orkut users with sandbox access
b. The application creator and his friends
c. Any orkut user
d. None of the above

Which of the following 'DataRequest' methods will be used in order to read, write and clear data from Persistence API?

a. newFetchPersonRequest(idSpec, opt_params)
b. newFetchPersonAppDataRequest(idSpec, keys)
c. newFetchPeopleRequest(idSpec, opt_params)
d. newUpdatePersonAppDataRequest(id, key, value)

In OpenSocial API, the "gadgets.Prefs" namespace enables the end user to _____.

a. set preferences of the OpenSocial API
b. set OpenSocial API module dimensions
c. handle messages in API
d. set Permissions of the API

Consider the following code for OpenSocial application (v0.7) for Orkut?

http://sandbox.orkut.com/Application.aspx?appId=xxxxxxxxxxxx&appParams=%7B%20%22hello%22%20%3A%20%22hi%22%20%7D

If the above mentioned url is passed and processed by the following code, what will be the value of "getOutput"?

var querydata = gadgets.views.getParams();
var getOutput = querydata["hello"];

a. hello
b. hi
c. hello and hi
d. hi and hello
e. It will produce an empty string

Which of the following request is sent to the apiserver when an OpenSocial API wants to call the Google App Engine server for data,?

a. fetch_data
b. get_data
c. get
d. call

You have an OpenSocial API. You want to show the same OpenSocial API content in both 'profile' view and 'canvas' view. Which of the following is the correct code?

a. <Content type="html" view="(profile , canvas)">
b. <Content type="html" view="all">
c. <Content type="html" view="profile,canvas">
d. Any of the above can be used.

Which of the following are the valid RequestParameters under 'gadgets.io. Parameters' namespace?

a. POST_DATA
b. GET_DATA
c. CONTENT_TYPE
d. SET_DATA

You have done a lot of testing in your OpenSocial API and now you want to delete all the "Persistence Data". The following method is used to clear the data:

var req = OpenSocial.newDataRequest();
req.add(
    req.newUpdatePersonAppDataRequest
(OpenSocial.DataRequest.PersonId.VIEWER, --, --), "set_data");
req.send(set_callback);

The above command has some arguments missing at --. Which of the following set of arguments will complete the above command?

a. all, null
b. *, null
c. *, clear
d. all, clear

0 comments:

Post a Comment