JSON - Accessing Pharo on Twitter from within Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

JSON - Accessing Pharo on Twitter from within Pharo

Torsten Bergmann
First load:

-------------------------------------------------------------------------
Gofer new
    renggli: 'omnibrowser';
    package: 'JSON';    
    load.
-------------------------------------------------------------------------

then evaluate:

-------------------------------------------------------------------------
|hashToFollow json root subs|
hashToFollow := 'pharo'.
json := Json readFrom: ('http://search.twitter.com/search.json?rpp=50&result_type=recent&lang=all&q=', hashToFollow) asUrl retrieveContents
                                contentStream.
subs := json results collect: [:each |
        HelpTopic title: (each at: 'created_at' ifAbsent: '')
                         contents: (each at: 'text' ifAbsent: '')
].
root := HelpTopic named: 'Pharo on Twitter'.
root subtopics: subs.
HelpBrowser openOn: root
-------------------------------------------------------------------------

gives mixed results (not all related to pharo project)

If I try hashToFollow := 'pharoproject' it returns nothing
while the twitter channel is accessible at http://twitter.com/pharoproject?

Anyone know the correct hashToFollow for Pharo project only contents?

Thx
T.



--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Bart Gauquie
Hi Torsten,

I just developed this about 2 hours ago. You've already testing it. Cool! Release early is the motto of Rework, so i'm doing this.

If you look at:
http://search.twitter.com/api/
the q param  thats being used is:
Find tweets containing a word:

so maybe thats why if you search on pharo you're also gettin results from other things mentioning pharo?

And I now just noticed that some further in that paragraph I can query on a hashtag!

I'll adapt it right now:-)

Kind regards,

Bart




On Tue, Nov 2, 2010 at 9:17 PM, Torsten Bergmann <[hidden email]> wrote:
First load:

-------------------------------------------------------------------------
Gofer new
   renggli: 'omnibrowser';
   package: 'JSON';
   load.
-------------------------------------------------------------------------

then evaluate:

-------------------------------------------------------------------------
|hashToFollow json root subs|
hashToFollow := 'pharo'.
json := Json readFrom: ('http://search.twitter.com/search.json?rpp=50&result_type=recent&lang=all&q=', hashToFollow) asUrl retrieveContents
                               contentStream.
subs := json results collect: [:each |
       HelpTopic title: (each at: 'created_at' ifAbsent: '')
                        contents: (each at: 'text' ifAbsent: '')
].
root := HelpTopic named: 'Pharo on Twitter'.
root subtopics: subs.
HelpBrowser openOn: root
-------------------------------------------------------------------------

gives mixed results (not all related to pharo project)

If I try hashToFollow := 'pharoproject' it returns nothing
while the twitter channel is accessible at http://twitter.com/pharoproject?

Anyone know the correct hashToFollow for Pharo project only contents?

Thx
T.



--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill
Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Bart Gauquie
new version is loaded that searches hashtags instead of containing words.

Kind Regards,

Bart

On Tue, Nov 2, 2010 at 9:36 PM, Bart Gauquie <[hidden email]> wrote:
Hi Torsten,

I just developed this about 2 hours ago. You've already testing it. Cool! Release early is the motto of Rework, so i'm doing this.

If you look at:
http://search.twitter.com/api/
the q param  thats being used is:
Find tweets containing a word:

so maybe thats why if you search on pharo you're also gettin results from other things mentioning pharo?

And I now just noticed that some further in that paragraph I can query on a hashtag!

I'll adapt it right now:-)

Kind regards,

Bart





On Tue, Nov 2, 2010 at 9:17 PM, Torsten Bergmann <[hidden email]> wrote:
First load:

-------------------------------------------------------------------------
Gofer new
   renggli: 'omnibrowser';
   package: 'JSON';
   load.
-------------------------------------------------------------------------

then evaluate:

-------------------------------------------------------------------------
|hashToFollow json root subs|
hashToFollow := 'pharo'.
json := Json readFrom: ('http://search.twitter.com/search.json?rpp=50&result_type=recent&lang=all&q=', hashToFollow) asUrl retrieveContents
                               contentStream.
subs := json results collect: [:each |
       HelpTopic title: (each at: 'created_at' ifAbsent: '')
                        contents: (each at: 'text' ifAbsent: '')
].
root := HelpTopic named: 'Pharo on Twitter'.
root subtopics: subs.
HelpBrowser openOn: root
-------------------------------------------------------------------------

gives mixed results (not all related to pharo project)

If I try hashToFollow := 'pharoproject' it returns nothing
while the twitter channel is accessible at http://twitter.com/pharoproject?

Anyone know the correct hashToFollow for Pharo project only contents?

Thx
T.



--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill



--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill
Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Lukas Renggli
In reply to this post by Torsten Bergmann
> -------------------------------------------------------------------------
> Gofer new
>    renggli: 'omnibrowser';
>    package: 'JSON';
>    load.
> -------------------------------------------------------------------------

Don't use that, this is a highly outdated and forked version used by
OB-Web. There is much newer and better code on SqueakSource.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Bart Gauquie

Lukas,

It was the first thing I found on squeaksource that could parse a string to a JSON object. and query it.

Which alternatives do you suggest?

Kind Regards,

Bart

On Tue, Nov 2, 2010 at 9:48 PM, Lukas Renggli <[hidden email]> wrote:
> -------------------------------------------------------------------------
> Gofer new
>    renggli: 'omnibrowser';
>    package: 'JSON';
>    load.
> -------------------------------------------------------------------------

Don't use that, this is a highly outdated and forked version used by
OB-Web. There is much newer and better code on SqueakSource.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Lukas Renggli
I think this is the official version: http://www.squeaksource.com/JSON

The version Torsten suggest is not an official one from SqueakSource,
but on my own server in the OmniBrowser directory.

Lukas

On 2 November 2010 22:03, Bart Gauquie <[hidden email]> wrote:

>
> Lukas,
>
> It was the first thing I found on squeaksource that could parse a string to
> a JSON object. and query it.
>
> Which alternatives do you suggest?
>
> Kind Regards,
>
> Bart
>
> On Tue, Nov 2, 2010 at 9:48 PM, Lukas Renggli <[hidden email]> wrote:
>>
>> >
>> > -------------------------------------------------------------------------
>> > Gofer new
>> >    renggli: 'omnibrowser';
>> >    package: 'JSON';
>> >    load.
>> >
>> > -------------------------------------------------------------------------
>>
>> Don't use that, this is a highly outdated and forked version used by
>> OB-Web. There is much newer and better code on SqueakSource.
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: JSON - Accessing Pharo on Twitter from within Pharo

Bart Gauquie
That's the one I loaded in my local image ...

Regards,

Bart

On Tue, Nov 2, 2010 at 10:07 PM, Lukas Renggli <[hidden email]> wrote:
I think this is the official version: http://www.squeaksource.com/JSON

The version Torsten suggest is not an official one from SqueakSource,
but on my own server in the OmniBrowser directory.

Lukas

On 2 November 2010 22:03, Bart Gauquie <[hidden email]> wrote:
>
> Lukas,
>
> It was the first thing I found on squeaksource that could parse a string to
> a JSON object. and query it.
>
> Which alternatives do you suggest?
>
> Kind Regards,
>
> Bart
>
> On Tue, Nov 2, 2010 at 9:48 PM, Lukas Renggli <[hidden email]> wrote:
>>
>> >
>> > -------------------------------------------------------------------------
>> > Gofer new
>> >    renggli: 'omnibrowser';
>> >    package: 'JSON';
>> >    load.
>> >
>> > -------------------------------------------------------------------------
>>
>> Don't use that, this is a highly outdated and forked version used by
>> OB-Web. There is much newer and better code on SqueakSource.
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>



--
Lukas Renggli
www.lukas-renggli.ch




--
imagination is more important than knowledge - Albert Einstein
Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein
Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein
The true sign of intelligence is not knowledge but imagination. - Albert Einstein
However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill
It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill