Yes Arne! You are right... It helps..
We can also understand this in this way.. When we say M.<K,V> We are mapping object K to V. Mapping object K to V means we are mapping properties of K to it's respective value... Thanks for your help... Regards, Amit On Dec 20, 12:29 am, Arne Roomann-Kurrik <[email protected]> wrote: > Hi Amit, > > For people requests you need to map a > opensocial.DataRequest.PeopleRequestFields object to another object to > set the parameter. The opensocial.DataRequest.PeopleRequestFields is > a collection of paramter names that you may use, so the following is > all valid: > > p = {}; > p[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [ > opensocial.Person.Field.ABOUT_ME, > opensocial.Person.Field.ACTIVITIES, > ... > ]; > p[opensocial.DataRequest.PeopleRequestFields.MAX] = 100; > p[opensocial.DataRequest.PeopleRequestFields.FIRST] = 0; > > In this example, you are mappting the > opensocial.DataRequest.PeopleRequestFields of PROFILE_DETAILS, MAX, > and FIRST to an array, a number, and another number, respectively. > These datatypes are all objects in Javascript, so the notation: > > Map.<opensocial.DataRequest.PeopleRequestFields, Object> > > is still correct. > > Hope this helps, > ~Arne > > On Dec 18, 4:41 am, Amit Gupta <[email protected]> wrote: > > > Hello All! > > > I have a conceptual doubt... > > > When we talk about newFetchPersonRequest(id,opt_params) > > > We need to pass the opt_params such that > > Map.<opensocial.DataRequest.PeopleRequestFields, Object> > > > means parameter should take the form like this... > > > params[opensocial.DataRequest.PeopleRequestFields] = { values } > > because according to definition of M.<K,V> K should map V. > > > but we use params such that > > params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]= > > {values} > > where in documentation it is given that > > Map.<opensocial.DataRequest.PeopleRequestFields, Object> that means > > > opensocial.DataRequest.PeopleRequestFields should map objects not > > > opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS > > > Can you please suggest where I am wrong? > > This may sound very little for you but as a very beginner I am > > confused with this. I would appreciate if you can help me in this. > > > Thanks in advance.... > > > Thanks, > > Amit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenSocial Application Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/opensocial-api?hl=en -~----------~----~----~----~------~----~------~--~---
