メモ代わり。てきとーに。 いや、ですからてきとーですって。 2年前ぐらいにPythonあたりでメールくれた方、ごめんなさい。メール紛失してしまい無視した形になってしまいました。。。

2009年7月19日日曜日

[Apache Shindig][お勉強][OpenSocial] メモ59 DataRequest.newFetchPersonRequestの第二引数で指定できる値

DataRequest.newFetchPersonRequestの第二引数は、


要求に渡す追加パラメータです


とさらっと書いてある。
ちなみに、0.8.1では未使用とのこと。

何を指定すればいいのかさっぱりわからなかったけど、
どうも、
  1. opensocial.DataRequest.PeopleRequestFields  

に定義されている値が指定できることが、やっとわかったよ。

このコードによると、
  1. opensocial.DataRequest.PeopleRequestFields = {  
  2.   /** 
  3.    * An array of 
  4.    * <a href="opensocial.Person.Field.html"> 
  5.    * <code>opensocial.Person.Field</code></a> 
  6.    * specifying what profile data to fetch 
  7.    * for each of the person objects. The server will always include 
  8.    * ID, NAME, and THUMBNAIL_URL. 
  9.    * 
  10.    * @member opensocial.DataRequest.PeopleRequestFields 
  11.    */  
  12.   PROFILE_DETAILS : 'profileDetail',  
  13.   
  14.   /** 
  15.    * A sort order for the people objects; defaults to TOP_FRIENDS. 
  16.    * Possible values are defined by 
  17.    * <a href="opensocial.DataRequest.SortOrder.html">SortOrder</a>. 
  18.    * 
  19.    * @member opensocial.DataRequest.PeopleRequestFields 
  20.    */  
  21.   SORT_ORDER : 'sortOrder',  
  22.   
  23.   /** 
  24.    * How to filter the people objects; defaults to ALL. 
  25.    * Possible values are defined by 
  26.    * <a href="opensocial.DataRequest.FilterType.html">FilterType</a>. 
  27.    * 
  28.    * @member opensocial.DataRequest.PeopleRequestFields 
  29.    */  
  30.   FILTER : 'filter',  
  31.   
  32.   /** 
  33.    * Additional options to be passed into the filter, 
  34.    * specified as a Map<String, Object>. 
  35.    * 
  36.    * @member opensocial.DataRequest.PeopleRequestFields 
  37.    */  
  38.   FILTER_OPTIONS: 'filterOptions',  
  39.   
  40.   /** 
  41.    * When paginating, the index of the first item to fetch. 
  42.    * Specified as a <code>Number</code>. 
  43.    * 
  44.    * @member opensocial.DataRequest.PeopleRequestFields 
  45.    */  
  46.   FIRST : 'first',  
  47.   /** 
  48.    * The maximum number of items to fetch; defaults to 20. If set to a larger 
  49.    * number, a container may honor the request, or may limit the number to a 
  50.    * container-specified limit of at least 20. 
  51.    * Specified as a <code>Number</code>. 
  52.    * 
  53.    * @member opensocial.DataRequest.PeopleRequestFields 
  54.    */  
  55.   MAX : 'max',  
  56.   
  57.   /** 
  58.    * A string or array of strings, specifying the app data keys to fetch for 
  59.    * each of the Person objects. This field may be used interchangeably with 
  60.    * the string 'appData'.  Pass the string '*' to fetch all app data keys. 
  61.    * @member opensocial.DataRequest.PeopleRequestFields 
  62.    */  
  63.   APP_DATA : 'appData',  
  64.   
  65.   /** 
  66.    * How to escape app data returned from the server; 
  67.    * defaults to HTML_ESCAPE. Possible values are defined by 
  68.    * <a href="opensocial.EscapeType.html">EscapeType</a>. 
  69.    * This field may be used interchangeably with the string 'escapeType'. 
  70.    * @member opensocial.DataRequest.PeopleRequestFields 
  71.    */  
  72.    ESCAPE_TYPE : 'escapeType'  
  73. };  

とのこと。

ふーん。

.

0 コメント: