zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #03097
Re: [Merge] lp:~zorba-coders/zorba/tokenize into lp:zorba
Is there an example that works with streaming?
I wasn't able to make the following work:
import module namespace http = "http://www.zorba-xquery.com/modules/http-client";
declare namespace h = "http://expath.org/ns/http-client";
let $item := http:send-request(<h:request href="https://stream.twitter.com/1/statuses/sample.json?delimited=length"
method="GET"
username="wcandillon"
password="wnvbb86g"
override-media-type="text/plain"
/>
,
"https://stream.twitter.com/1/statuses/sample.json?delimited=length",
()
)[2]
for $tweet in tokenize($item,"a")
return $tweet
Where:
import module namespace http = "http://www.zorba-xquery.com/modules/http-client";
declare namespace h = "http://expath.org/ns/http-client";
let $item := http:send-request(<h:request href="https://stream.twitter.com/1/statuses/sample.json?delimited=length"
method="GET"
username="wcandillon"
password="wnvbb86g"
override-media-type="text/plain"
/>
,
"https://stream.twitter.com/1/statuses/sample.json?delimited=length",
()
)[2]
return $item
streams fine.
What am I missing?
--
https://code.launchpad.net/~zorba-coders/zorba/tokenize/+merge/86647
Your team Zorba Coders is subscribed to branch lp:zorba.
References