Re: [Dev] [ESB] Twitter Connector and Inbound

2016-06-01 Thread Anoukh Jayawardena
Hi Kathees,

Understood. I will try it out.

Thanks,
Anoukh

On Wed, Jun 1, 2016 at 1:03 PM, Kathees Rajendram  wrote:

> Hi Anoukh,
>
> Before sending the stream data to CEP, you can filter the stream data in
> ESB. In twitter inbound endpoint, use the track operation. From the output,
> you can filter the stream for the particular ID using Xpath expression.
>
> Thanks,
> Kathees
>
> On Wed, Jun 1, 2016 at 12:37 PM, Anoukh Jayawardena 
> wrote:
>
>> Hi Kathees,
>>
>> Yes, since twitter API doesn't have AND operation what we can do is a
>> "filter" process. As you said, we are using the track operation only and
>> from this stream we read the user ID and filter the ones we need. We do
>> this manual filtering in CEP currently. If we pass the follower ID to
>> another inbound endpoint, wouldn't we get all the tweets that this person
>> sent?
>>
>> Regards,
>> Anoukh
>>
>> On Tue, May 31, 2016 at 6:45 PM, Kathees Rajendram 
>> wrote:
>>
>>> Hi Anoukh,
>>>
>>> The twitter streaming API [1] provides the filter operation with the
>>> track follow, and locations fields are combined with an OR operator.
>>> Twitter streaming API doesn’t have AND operation.
>>>
>>> Can you try with two twitter inbound endpoints and twitter connector, In
>>> a inbound endpoint, use the track operation to get the public stream with
>>> the keyword. In ESB, the streaming output data are injected to a sequence.
>>> From the output you can read user or follower ID. If there are
>>> no follower ID, use the twitter connector method to retrieve the follower
>>> ID. In second twitter Inbound endpoint, pass the follower ID with comma
>>> separator to retrieve follower's streaming data.
>>>
>>> [1] - https://dev.twitter.com/streaming/reference/post/statuses/filter
>>>
>>> [2] -
>>> https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Twitter+Inbound+Operations
>>>
>>> Thanks,
>>> Kathees
>>>
>>> On Tue, May 31, 2016 at 5:51 PM, Anoukh Jayawardena 
>>> wrote:
>>>
 Hi

 There is a use case in the US Election analytic app (refer
 https://wso2.com/election2016/) to use twitter.track and
 twitter.follow parameters together.
 This is to pull the tweets of certain accounts (hence the
 twitter.follow) that include certain words (hence the twitter.track). So
 requirement is twitter.follow AND twitter.track.
 These two operations are combined using an "OR" operation from twitter
 API itself (refer
 https://dev.twitter.com/streaming/reference/post/statuses/filter).
 Is there a way we can support "AND" operation within ESB?

 Currently we only do the twitter.follow operation from ESB and filter
 the words manually from the stream.


 Regards
 Anoukh Jayawardena
 --
 Anoukh Jayawardena
 *Software Engineer - Intern*
 Mobile : +94779928932
 ano...@wso2.com

>>>
>>>
>>>
>>> --
>>> Kathees
>>> Software Engineer,
>>> email: kath...@wso2.com
>>> mobile: +94772596173
>>>
>>
>>
>>
>> --
>> Anoukh Jayawardena
>> *Software Engineer - Intern*
>> Mobile : +94779928932
>> ano...@wso2.com
>>
>
>
>
> --
> Kathees
> Software Engineer,
> email: kath...@wso2.com
> mobile: +94772596173
>



-- 
Anoukh Jayawardena
*Software Engineer - Intern*
Mobile : +94779928932
ano...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] Twitter Connector and Inbound

2016-06-01 Thread Kathees Rajendram
Hi Anoukh,

Before sending the stream data to CEP, you can filter the stream data in
ESB. In twitter inbound endpoint, use the track operation. From the output,
you can filter the stream for the particular ID using Xpath expression.

Thanks,
Kathees

On Wed, Jun 1, 2016 at 12:37 PM, Anoukh Jayawardena  wrote:

> Hi Kathees,
>
> Yes, since twitter API doesn't have AND operation what we can do is a
> "filter" process. As you said, we are using the track operation only and
> from this stream we read the user ID and filter the ones we need. We do
> this manual filtering in CEP currently. If we pass the follower ID to
> another inbound endpoint, wouldn't we get all the tweets that this person
> sent?
>
> Regards,
> Anoukh
>
> On Tue, May 31, 2016 at 6:45 PM, Kathees Rajendram 
> wrote:
>
>> Hi Anoukh,
>>
>> The twitter streaming API [1] provides the filter operation with the
>> track follow, and locations fields are combined with an OR operator.
>> Twitter streaming API doesn’t have AND operation.
>>
>> Can you try with two twitter inbound endpoints and twitter connector, In
>> a inbound endpoint, use the track operation to get the public stream with
>> the keyword. In ESB, the streaming output data are injected to a sequence.
>> From the output you can read user or follower ID. If there are
>> no follower ID, use the twitter connector method to retrieve the follower
>> ID. In second twitter Inbound endpoint, pass the follower ID with comma
>> separator to retrieve follower's streaming data.
>>
>> [1] - https://dev.twitter.com/streaming/reference/post/statuses/filter
>>
>> [2] -
>> https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Twitter+Inbound+Operations
>>
>> Thanks,
>> Kathees
>>
>> On Tue, May 31, 2016 at 5:51 PM, Anoukh Jayawardena 
>> wrote:
>>
>>> Hi
>>>
>>> There is a use case in the US Election analytic app (refer
>>> https://wso2.com/election2016/) to use twitter.track and twitter.follow
>>> parameters together.
>>> This is to pull the tweets of certain accounts (hence the
>>> twitter.follow) that include certain words (hence the twitter.track). So
>>> requirement is twitter.follow AND twitter.track.
>>> These two operations are combined using an "OR" operation from twitter
>>> API itself (refer
>>> https://dev.twitter.com/streaming/reference/post/statuses/filter).
>>> Is there a way we can support "AND" operation within ESB?
>>>
>>> Currently we only do the twitter.follow operation from ESB and filter
>>> the words manually from the stream.
>>>
>>>
>>> Regards
>>> Anoukh Jayawardena
>>> --
>>> Anoukh Jayawardena
>>> *Software Engineer - Intern*
>>> Mobile : +94779928932
>>> ano...@wso2.com
>>>
>>
>>
>>
>> --
>> Kathees
>> Software Engineer,
>> email: kath...@wso2.com
>> mobile: +94772596173
>>
>
>
>
> --
> Anoukh Jayawardena
> *Software Engineer - Intern*
> Mobile : +94779928932
> ano...@wso2.com
>



-- 
Kathees
Software Engineer,
email: kath...@wso2.com
mobile: +94772596173
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] Twitter Connector and Inbound

2016-06-01 Thread Anoukh Jayawardena
Hi Kathees,

Yes, since twitter API doesn't have AND operation what we can do is a
"filter" process. As you said, we are using the track operation only and
from this stream we read the user ID and filter the ones we need. We do
this manual filtering in CEP currently. If we pass the follower ID to
another inbound endpoint, wouldn't we get all the tweets that this person
sent?

Regards,
Anoukh

On Tue, May 31, 2016 at 6:45 PM, Kathees Rajendram  wrote:

> Hi Anoukh,
>
> The twitter streaming API [1] provides the filter operation with the track
> follow, and locations fields are combined with an OR operator. Twitter
> streaming API doesn’t have AND operation.
>
> Can you try with two twitter inbound endpoints and twitter connector, In a
> inbound endpoint, use the track operation to get the public stream with the
> keyword. In ESB, the streaming output data are injected to a sequence. From
> the output you can read user or follower ID. If there are no follower ID,
> use the twitter connector method to retrieve the follower ID. In second
> twitter Inbound endpoint, pass the follower ID with comma separator to
> retrieve follower's streaming data.
>
> [1] - https://dev.twitter.com/streaming/reference/post/statuses/filter
>
> [2] -
> https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Twitter+Inbound+Operations
>
> Thanks,
> Kathees
>
> On Tue, May 31, 2016 at 5:51 PM, Anoukh Jayawardena 
> wrote:
>
>> Hi
>>
>> There is a use case in the US Election analytic app (refer
>> https://wso2.com/election2016/) to use twitter.track and twitter.follow
>> parameters together.
>> This is to pull the tweets of certain accounts (hence the twitter.follow)
>> that include certain words (hence the twitter.track). So requirement is
>> twitter.follow AND twitter.track.
>> These two operations are combined using an "OR" operation from twitter
>> API itself (refer
>> https://dev.twitter.com/streaming/reference/post/statuses/filter).
>> Is there a way we can support "AND" operation within ESB?
>>
>> Currently we only do the twitter.follow operation from ESB and filter the
>> words manually from the stream.
>>
>>
>> Regards
>> Anoukh Jayawardena
>> --
>> Anoukh Jayawardena
>> *Software Engineer - Intern*
>> Mobile : +94779928932
>> ano...@wso2.com
>>
>
>
>
> --
> Kathees
> Software Engineer,
> email: kath...@wso2.com
> mobile: +94772596173
>



-- 
Anoukh Jayawardena
*Software Engineer - Intern*
Mobile : +94779928932
ano...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ESB] Twitter Connector and Inbound

2016-05-31 Thread Kathees Rajendram
Hi Anoukh,

The twitter streaming API [1] provides the filter operation with the track
follow, and locations fields are combined with an OR operator. Twitter
streaming API doesn’t have AND operation.

Can you try with two twitter inbound endpoints and twitter connector, In a
inbound endpoint, use the track operation to get the public stream with the
keyword. In ESB, the streaming output data are injected to a sequence. From
the output you can read user or follower ID. If there are no follower ID,
use the twitter connector method to retrieve the follower ID. In second
twitter Inbound endpoint, pass the follower ID with comma separator to
retrieve follower's streaming data.

[1] - https://dev.twitter.com/streaming/reference/post/statuses/filter

[2] -
https://docs.wso2.com/display/ESBCONNECTORS/Configuring+Twitter+Inbound+Operations

Thanks,
Kathees

On Tue, May 31, 2016 at 5:51 PM, Anoukh Jayawardena  wrote:

> Hi
>
> There is a use case in the US Election analytic app (refer
> https://wso2.com/election2016/) to use twitter.track and twitter.follow
> parameters together.
> This is to pull the tweets of certain accounts (hence the twitter.follow)
> that include certain words (hence the twitter.track). So requirement is
> twitter.follow AND twitter.track.
> These two operations are combined using an "OR" operation from twitter API
> itself (refer
> https://dev.twitter.com/streaming/reference/post/statuses/filter).
> Is there a way we can support "AND" operation within ESB?
>
> Currently we only do the twitter.follow operation from ESB and filter the
> words manually from the stream.
>
>
> Regards
> Anoukh Jayawardena
> --
> Anoukh Jayawardena
> *Software Engineer - Intern*
> Mobile : +94779928932
> ano...@wso2.com
>



-- 
Kathees
Software Engineer,
email: kath...@wso2.com
mobile: +94772596173
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev