Thanks, Paul. It works.
It seems that format of returned data is not compatible with old
metadata service.l
Any document for the new API?

Gerald

On Mon, Nov 8, 2010 at 9:13 PM, Paul Lindner <[email protected]> wrote:
> This is using the old metadata servlet, which I'd like to see deprecated.
>  Instead you can use the gadgets.metadata json-rpc endpoint like this:
>
> curl -H "Content-Type: application/json" --data-binary '[{method:
> "gadgets.metadata", id:"test", params: {ids:["
> http://www.google.com/ig/modules/datetime_v2/datetime_v2.xml";], container:
> "default", language:"en", country:"US", view: "canvas"}}]'
> http://localhost:8080/rpc
>
> cheers,
> Paul
>
>
> On Mon, Nov 8, 2010 at 6:51 AM, Zhenhua Guo <[email protected]> wrote:
>
>> Sorry for typos in above commands
>> "-H Content-Type=application/json" should be replaced with "-H
>> Content-Type:application/json"
>>
>> Gerald
>>
>> On Sun, Nov 7, 2010 at 10:01 PM, Zhenhua Guo <[email protected]> wrote:
>> > Hi, Ziv
>> > Following are two sample requests:
>> >
>> > 1) curl -H Content-Type=application/json --data-binary
>> > '{context:{container:"default"},
>> > gadgets:[{url:"
>> http://www.google.com/ig/modules/datetime_v2/datetime_v2.xml";,
>> > language:"en", country:"US"}]}' shindig_metadata_service_url
>> >
>> > Response:
>> > {"gadgets":[{"errors":[null],"moduleId":0,"url":"
>> http://www.google.com/ig/modules/datetime_v2/datetime_v2.xml"}]}
>> >
>> > 2) curl -H Content-Type=application/json --data-binary
>> > '{context:{container:"default"},
>> > gadgets:[{url:"http://www.google.com/ig/modules/todo.xml";,
>> > language:"en", country:"US"}]}' shindig_metadata_service_url
>> > Response is correct.
>> >
>> > I did some simple tracing, and it seems that the problem is "view"
>> > attribute of "content" element.
>> >
>> > If you need any more information, let me know.
>> > Thanks
>> >
>> > Gerald
>> >
>> > On Sun, Nov 7, 2010 at 7:01 PM, Ziv Horesh <[email protected]> wrote:
>> >> Shindig metadata API is work in process, and I am not sure at what stage
>> was
>> >> it for the 2.0 cut.
>> >> Can you attach an example request so I can take a look?
>> >>
>> >> Thanks
>> >> Ziv
>> >>
>> >>
>> >> On Fri, Nov 5, 2010 at 9:39 PM, Zhenhua Guo <[email protected]> wrote:
>> >>
>> >>> My code which uses shindig metadata API seems to be broken in shindig
>> 2.0.
>> >>> I found that if "Content" element has "view" attribute, the servlet
>> >>> will return "{"gadgets":[{"errors" [null],"moduleId":0,"url":"url of
>> >>> gadget"}]}".
>> >>>
>> >>> Thanks!
>> >>>
>> >>>
>> >>> Gerald
>> >>>
>> >>
>> >
>>
>
>
>
> --
> Paul Lindner -- [email protected] -- linkedin.com/in/plindner
>

Reply via email to