You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Evgeny Bogdanov <ev...@epfl.ch> on 2010/04/12 16:44:44 UTC

userPrefs returns empty array instead of hash

When there are user preferences, gadgets/metadata returns an object 
where userPrefs is a hash
userPrefs -> {name: "value"}

Though when there is no user preferences the output is an empty array
userPrefs -> []

Is it a bug or intended behaviour? In my opionion it is better to return 
empty hash like {}.

Evgeny Bogdanov



Re: userPrefs returns empty array instead of hash

Posted by "Jacky Wang (王超)" <ch...@google.com>.
Thanks for your notes!  Interesting, I'll look into the code to see what
kind of magic happens. ;)

On Tue, Apr 13, 2010 at 5:44 PM, Evgeny Bogdanov <ev...@epfl.ch>wrote:

>  Yes, it is not available
>
> you could try a cached version:
>
> http://webcache.googleusercontent.com/search?q=cache:zLGCZ74fuf4J:cwiki.apache.org/SHINDIG/shindigs-metadata-call.html+shindig+metadata&cd=1&hl=en&ct=clnk&client=firefox-a
>
> Best,
> Evgeny
> PS: if you consider it as a bug I could send it to jira and try to make a
> patch with a fix,
> but a bit later
>
>
> On 13.04.10 10:38, Jacky Wang (王超) wrote:
>
> When I visit the wiki page, it says:
> Maintenance
>
> ASF Issue trackers are currently undergoing maintenance. Please check back
> in a bit.
>
> We apologize for the inconvenience.
>
> I'll try it later. :)
>
> On Tue, Apr 13, 2010 at 4:09 PM, Evgeny Bogdanov <ev...@epfl.ch>wrote:
>
>>  It is just a REST request (
>> http://cwiki.apache.org/SHINDIG/shindigs-metadata-call.html)
>>
>> curl -i -X POST -H "Accept: application/json" -H "Content-Type:
>> application/json"
>>          -d
>> '{"context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"url":"http://hosting.gmodules.com/ig/gadget...023/wikipedia.xml <http://hosting.gmodules.com/ig/gadgets/file/108085167802252611023/wikipedia.xml>",
>>
>> "moduleId":0}]}'
>>           http://shindig/gadgets/metadata
>>
>> Best,
>> Evgeny
>>
>>
>> On 13.04.10 09:59, Jacky Wang (王超) wrote:
>>
>> Hi,
>>
>> what does "gadgets/metadata" mean?  where did you find this object? :)
>>
>> Best,
>> Jacky
>>
>> On Tue, Apr 13, 2010 at 3:51 PM, Evgeny Bogdanov <evgeny.bogdanov@epfl.ch
>> > wrote:
>>
>>> Hi,
>>>
>>> sorry should have done it before.
>>>
>>> PHP version.
>>> Updated to revision 933437 (bug still there)
>>>
>>> Best,
>>> Evgeny
>>>
>>>
>>> On 13.04.10 06:50, Jacky Wang (王超) wrote:
>>>
>>>> Hi Evgeny,
>>>>
>>>> Thanks for pointing it out.
>>>>
>>>> Which Shindig are u using, the PHP one or the Java one?  And which
>>>> reversion
>>>> are u using, the trunk+"HEAD" version or other tagged version?
>>>>
>>>> Thanks,
>>>> Jacky
>>>>
>>>> On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
>>>> <ev...@epfl.ch>wrote:
>>>>
>>>>
>>>>
>>>>> When there are user preferences, gadgets/metadata returns an object
>>>>> where
>>>>> userPrefs is a hash
>>>>> userPrefs ->  {name: "value"}
>>>>>
>>>>> Though when there is no user preferences the output is an empty array
>>>>> userPrefs ->  []
>>>>>
>>>>> Is it a bug or intended behaviour? In my opionion it is better to
>>>>> return
>>>>> empty hash like {}.
>>>>>
>>>>> Evgeny Bogdanov
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Best Regards,
>>
>> Jacky Wang
>> (Office) +86-10-6250-3316
>> (Mobile) +86-1381-0018-677
>> Kejian Building, Tsinghua Science Park Building 6
>> No.1 Zhongguancun East Road, Haidian District
>> Beijing P.R.China 100084
>>
>>
>
>
> --
> Best Regards,
>
> Jacky Wang
> (Office) +86-10-6250-3316
> (Mobile) +86-1381-0018-677
> Kejian Building, Tsinghua Science Park Building 6
> No.1 Zhongguancun East Road, Haidian District
> Beijing P.R.China 100084
>
>


-- 
Best Regards,

Jacky Wang
(Office) +86-10-6250-3316
(Mobile) +86-1381-0018-677
Kejian Building, Tsinghua Science Park Building 6
No.1 Zhongguancun East Road, Haidian District
Beijing P.R.China 100084

Re: userPrefs returns empty array instead of hash

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
Yes, it is not available

you could try a cached version:
http://webcache.googleusercontent.com/search?q=cache:zLGCZ74fuf4J:cwiki.apache.org/SHINDIG/shindigs-metadata-call.html+shindig+metadata&cd=1&hl=en&ct=clnk&client=firefox-a

Best,
Evgeny
PS: if you consider it as a bug I could send it to jira and try to make 
a patch with a fix,
but a bit later

On 13.04.10 10:38, Jacky Wang (王超) wrote:
>
>
>   When I visit the wiki page, it says:
>
>
>
>   Maintenance
>
> ASF Issue trackers are currently undergoing maintenance. Please check 
> back in a bit.
>
> We apologize for the inconvenience.
>
>
> I'll try it later. :)
>
> On Tue, Apr 13, 2010 at 4:09 PM, Evgeny Bogdanov 
> <evgeny.bogdanov@epfl.ch <ma...@epfl.ch>> wrote:
>
>     It is just a REST request
>     (http://cwiki.apache.org/SHINDIG/shindigs-metadata-call.html)
>
>     curl -i -X POST -H "Accept: application/json" -H "Content-Type:
>     application/json"
>               -d
>     '{"context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"url":"http://hosting.gmodules.com/ig/gadget...023/wikipedia.xml  <http://hosting.gmodules.com/ig/gadgets/file/108085167802252611023/wikipedia.xml>",
>
>     "moduleId":0}]}'
>                http://shindig/gadgets/metadata
>          
>
>     Best,
>     Evgeny
>
>
>     On 13.04.10 09:59, Jacky Wang (王超) wrote:
>>     Hi,
>>
>>     what does "gadgets/metadata" mean?  where did you find this
>>     object? :)
>>
>>     Best,
>>     Jacky
>>
>>     On Tue, Apr 13, 2010 at 3:51 PM, Evgeny Bogdanov
>>     <evgeny.bogdanov@epfl.ch <ma...@epfl.ch>> wrote:
>>
>>         Hi,
>>
>>         sorry should have done it before.
>>
>>         PHP version.
>>         Updated to revision 933437 (bug still there)
>>
>>         Best,
>>         Evgeny
>>
>>
>>         On 13.04.10 06:50, Jacky Wang (王超) wrote:
>>
>>             Hi Evgeny,
>>
>>             Thanks for pointing it out.
>>
>>             Which Shindig are u using, the PHP one or the Java one?
>>              And which reversion
>>             are u using, the trunk+"HEAD" version or other tagged
>>             version?
>>
>>             Thanks,
>>             Jacky
>>
>>             On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
>>             <evgeny.bogdanov@epfl.ch
>>             <ma...@epfl.ch>>wrote:
>>
>>
>>                 When there are user preferences, gadgets/metadata
>>                 returns an object where
>>                 userPrefs is a hash
>>                 userPrefs ->  {name: "value"}
>>
>>                 Though when there is no user preferences the output
>>                 is an empty array
>>                 userPrefs ->  []
>>
>>                 Is it a bug or intended behaviour? In my opionion it
>>                 is better to return
>>                 empty hash like {}.
>>
>>                 Evgeny Bogdanov
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>     -- 
>>     Best Regards,
>>
>>     Jacky Wang
>>     (Office) +86-10-6250-3316
>>     (Mobile) +86-1381-0018-677
>>     Kejian Building, Tsinghua Science Park Building 6
>>     No.1 Zhongguancun East Road, Haidian District
>>     Beijing P.R.China 100084
>
>
>
>
> -- 
> Best Regards,
>
> Jacky Wang
> (Office) +86-10-6250-3316
> (Mobile) +86-1381-0018-677
> Kejian Building, Tsinghua Science Park Building 6
> No.1 Zhongguancun East Road, Haidian District
> Beijing P.R.China 100084

Re: userPrefs returns empty array instead of hash

Posted by "Jacky Wang (王超)" <ch...@google.com>.
When I visit the wiki page, it says:
Maintenance

ASF Issue trackers are currently undergoing maintenance. Please check back
in a bit.

We apologize for the inconvenience.

I'll try it later. :)

On Tue, Apr 13, 2010 at 4:09 PM, Evgeny Bogdanov <ev...@epfl.ch>wrote:

>  It is just a REST request (
> http://cwiki.apache.org/SHINDIG/shindigs-metadata-call.html)
>
> curl -i -X POST -H "Accept: application/json" -H "Content-Type:
> application/json"
>          -d
> '{"context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"url":"http://hosting.gmodules.com/ig/gadget...023/wikipedia.xml <http://hosting.gmodules.com/ig/gadgets/file/108085167802252611023/wikipedia.xml>",
>
> "moduleId":0}]}'
>           http://shindig/gadgets/metadata
>
> Best,
> Evgeny
>
>
> On 13.04.10 09:59, Jacky Wang (王超) wrote:
>
> Hi,
>
> what does "gadgets/metadata" mean?  where did you find this object? :)
>
> Best,
> Jacky
>
> On Tue, Apr 13, 2010 at 3:51 PM, Evgeny Bogdanov <ev...@epfl.ch>wrote:
>
>> Hi,
>>
>> sorry should have done it before.
>>
>> PHP version.
>> Updated to revision 933437 (bug still there)
>>
>> Best,
>> Evgeny
>>
>>
>> On 13.04.10 06:50, Jacky Wang (王超) wrote:
>>
>>> Hi Evgeny,
>>>
>>> Thanks for pointing it out.
>>>
>>> Which Shindig are u using, the PHP one or the Java one?  And which
>>> reversion
>>> are u using, the trunk+"HEAD" version or other tagged version?
>>>
>>> Thanks,
>>> Jacky
>>>
>>> On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
>>> <ev...@epfl.ch>wrote:
>>>
>>>
>>>
>>>> When there are user preferences, gadgets/metadata returns an object
>>>> where
>>>> userPrefs is a hash
>>>> userPrefs ->  {name: "value"}
>>>>
>>>> Though when there is no user preferences the output is an empty array
>>>> userPrefs ->  []
>>>>
>>>> Is it a bug or intended behaviour? In my opionion it is better to return
>>>> empty hash like {}.
>>>>
>>>> Evgeny Bogdanov
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
> --
> Best Regards,
>
> Jacky Wang
> (Office) +86-10-6250-3316
> (Mobile) +86-1381-0018-677
> Kejian Building, Tsinghua Science Park Building 6
> No.1 Zhongguancun East Road, Haidian District
> Beijing P.R.China 100084
>
>


-- 
Best Regards,

Jacky Wang
(Office) +86-10-6250-3316
(Mobile) +86-1381-0018-677
Kejian Building, Tsinghua Science Park Building 6
No.1 Zhongguancun East Road, Haidian District
Beijing P.R.China 100084

Re: userPrefs returns empty array instead of hash

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
It is just a REST request 
(http://cwiki.apache.org/SHINDIG/shindigs-metadata-call.html)

curl -i -X POST -H "Accept: application/json" -H "Content-Type:
application/json"
          -d
'{"context":{"country":"default","language":"default","view":"default","container":"default"},"gadgets":[{"url":"http://hosting.gmodules.com/ig/gadget...023/wikipedia.xml  <http://hosting.gmodules.com/ig/gadgets/file/108085167802252611023/wikipedia.xml>",

"moduleId":0}]}'
           http://shindig/gadgets/metadata

Best,
Evgeny

On 13.04.10 09:59, Jacky Wang (王超) wrote:
> Hi,
>
> what does "gadgets/metadata" mean?  where did you find this object? :)
>
> Best,
> Jacky
>
> On Tue, Apr 13, 2010 at 3:51 PM, Evgeny Bogdanov 
> <evgeny.bogdanov@epfl.ch <ma...@epfl.ch>> wrote:
>
>     Hi,
>
>     sorry should have done it before.
>
>     PHP version.
>     Updated to revision 933437 (bug still there)
>
>     Best,
>     Evgeny
>
>
>     On 13.04.10 06:50, Jacky Wang (王超) wrote:
>
>         Hi Evgeny,
>
>         Thanks for pointing it out.
>
>         Which Shindig are u using, the PHP one or the Java one?  And
>         which reversion
>         are u using, the trunk+"HEAD" version or other tagged version?
>
>         Thanks,
>         Jacky
>
>         On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
>         <evgeny.bogdanov@epfl.ch <ma...@epfl.ch>>wrote:
>
>
>             When there are user preferences, gadgets/metadata returns
>             an object where
>             userPrefs is a hash
>             userPrefs ->  {name: "value"}
>
>             Though when there is no user preferences the output is an
>             empty array
>             userPrefs ->  []
>
>             Is it a bug or intended behaviour? In my opionion it is
>             better to return
>             empty hash like {}.
>
>             Evgeny Bogdanov
>
>
>
>
>
>
>
>
>
> -- 
> Best Regards,
>
> Jacky Wang
> (Office) +86-10-6250-3316
> (Mobile) +86-1381-0018-677
> Kejian Building, Tsinghua Science Park Building 6
> No.1 Zhongguancun East Road, Haidian District
> Beijing P.R.China 100084

Re: userPrefs returns empty array instead of hash

Posted by "Jacky Wang (王超)" <ch...@google.com>.
Hi,

what does "gadgets/metadata" mean?  where did you find this object? :)

Best,
Jacky

On Tue, Apr 13, 2010 at 3:51 PM, Evgeny Bogdanov <ev...@epfl.ch>wrote:

> Hi,
>
> sorry should have done it before.
>
> PHP version.
> Updated to revision 933437 (bug still there)
>
> Best,
> Evgeny
>
>
> On 13.04.10 06:50, Jacky Wang (王超) wrote:
>
>> Hi Evgeny,
>>
>> Thanks for pointing it out.
>>
>> Which Shindig are u using, the PHP one or the Java one?  And which
>> reversion
>> are u using, the trunk+"HEAD" version or other tagged version?
>>
>> Thanks,
>> Jacky
>>
>> On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
>> <ev...@epfl.ch>wrote:
>>
>>
>>
>>> When there are user preferences, gadgets/metadata returns an object where
>>> userPrefs is a hash
>>> userPrefs ->  {name: "value"}
>>>
>>> Though when there is no user preferences the output is an empty array
>>> userPrefs ->  []
>>>
>>> Is it a bug or intended behaviour? In my opionion it is better to return
>>> empty hash like {}.
>>>
>>> Evgeny Bogdanov
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>


-- 
Best Regards,

Jacky Wang
(Office) +86-10-6250-3316
(Mobile) +86-1381-0018-677
Kejian Building, Tsinghua Science Park Building 6
No.1 Zhongguancun East Road, Haidian District
Beijing P.R.China 100084

Re: userPrefs returns empty array instead of hash

Posted by Evgeny Bogdanov <ev...@epfl.ch>.
Hi,

sorry should have done it before.

PHP version.
Updated to revision 933437 (bug still there)

Best,
Evgeny

On 13.04.10 06:50, Jacky Wang (王超) wrote:
> Hi Evgeny,
>
> Thanks for pointing it out.
>
> Which Shindig are u using, the PHP one or the Java one?  And which reversion
> are u using, the trunk+"HEAD" version or other tagged version?
>
> Thanks,
> Jacky
>
> On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
> <ev...@epfl.ch>wrote:
>
>    
>> When there are user preferences, gadgets/metadata returns an object where
>> userPrefs is a hash
>> userPrefs ->  {name: "value"}
>>
>> Though when there is no user preferences the output is an empty array
>> userPrefs ->  []
>>
>> Is it a bug or intended behaviour? In my opionion it is better to return
>> empty hash like {}.
>>
>> Evgeny Bogdanov
>>
>>
>>
>>      
>
>    

Re: userPrefs returns empty array instead of hash

Posted by "Jacky Wang (王超)" <ch...@google.com>.
Hi Evgeny,

Thanks for pointing it out.

Which Shindig are u using, the PHP one or the Java one?  And which reversion
are u using, the trunk+"HEAD" version or other tagged version?

Thanks,
Jacky

On Mon, Apr 12, 2010 at 10:44 PM, Evgeny Bogdanov
<ev...@epfl.ch>wrote:

> When there are user preferences, gadgets/metadata returns an object where
> userPrefs is a hash
> userPrefs -> {name: "value"}
>
> Though when there is no user preferences the output is an empty array
> userPrefs -> []
>
> Is it a bug or intended behaviour? In my opionion it is better to return
> empty hash like {}.
>
> Evgeny Bogdanov
>
>
>


-- 
Best Regards,

Jacky Wang
(Office) +86-10-6250-3316
(Mobile) +86-1381-0018-677
Kejian Building, Tsinghua Science Park Building 6
No.1 Zhongguancun East Road, Haidian District
Beijing P.R.China 100084