Ideas of web services that I could script in a couple of lines?

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

Re: Ideas of web services that I could script in a couple of lines?

philippeback

On Tue, Mar 15, 2016 at 6:08 PM, stepharo <[hidden email]> wrote:


Le 14/3/16 09:33, [hidden email] a écrit :
JSON is so pervasive that a base Pharo image should have things named after it.
STON is supercool but there is no JSON name in it, that's an issue for me.

Since STON can read and emit JSON I do not get the problem?

Discoverability. See Sven other mail. 


What would be a good way to do that? I wonder.

In the same vein, in Angular, consuming webservices that have a "proper" REST API (if there is such a thing, but still, this is nice) is easy with Restangular (https://github.com/mgonto/restangular). Not having such a thing has costed me much time during hackathons, during which competition using it was wrapping webservices at the speed of light while I was plodding along.

Is there such a thing in Pharo?
Seaside REST

No: this is for exposing endpoints, not consuming them. See Restangular.

 
Teapot

No: same.

I use SeasideREST and Teapot BTW.


Phil

On Mon, Mar 14, 2016 at 8:44 AM, stepharo <[hidden email]> wrote:
((STON fromString: (
    ZnEasy
        get: 'http://api.geonames.org/countryInfoJSON'
        username: 'demo'
        password: '') contents) at: #geonames) collect: [ : d | d at: #capital ]

With STON :)





Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

Offray Vladimir Luna Cárdenas-2
In reply to this post by Henrik Nergaard
Pretty nice!

I'm taking note of such small gems in an interactive
[grafoscopio](http://smalltalkhub.com/#!/~Offray/Grafoscopio/) notebook.
When they take the form of such notebooks I don't know how they should
be credited... any suggestions?

Cheers,

Offray

On 13/03/16 16:24, Henrik Nergaard wrote:

> Accessing the Nominatim service: http://wiki.openstreetmap.org/wiki/Nominatim .
>
> http://ws.stfx.eu/ATBXE2DN83CW
>
> Best regards,
> Henrik
>
> -----Original Message-----
> From: Pharo-users [mailto:[hidden email]] On Behalf Of stepharo
> Sent: Sunday, March 13, 2016 9:52 PM
> To: Any question about pharo is welcome <[hidden email]>
> Subject: [Pharo-users] Ideas of web services that I could script in a couple of lines?
>
> Hi hernan and others
>
> I'm looking for ideas of simple services capital, dictionaries....
> forecast that I could access using Zinc in a couple of lines.
>
> This is for challenges that I'm writing for the mooc.
> Stef
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

Offray Vladimir Luna Cárdenas-2
In reply to this post by Sven Van Caekenberghe-2
Hi,

The last version of the tutorial grafoscopio notebook now includes these cool examples (credit is done with a Thanks line). Here is a cool preview ;-):



You can get this interactive documentation by installing grafoscopio [1] and then choosing from the docking bar "Actualizar > Documentación > Tutorial" (Sorry, for now interface and documentation are only in Spanish)

[1] http://smalltalkhub.com/#!/~Offray/Grafoscopio/

Thanks for these great examples, they're a nice addition to the interactive documentation.

Cheers,

Offray

On 14/03/16 01:33, Sven Van Caekenberghe wrote:
(ZnEasy getJpeg: ((NeoJSONReader fromString: 
>     (ZnClient new
>         url: 'http://www.omdbapi.com/';
>         queryAt: 't' put: 'The Terminator';
>         get;
>         contents)) at: #Poster)) inspect

Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

Ben Coman
Looks cool.  I wonder if this would make a good basis for the main Image help system? 
cheers -ben 

On Wed, Mar 16, 2016 at 10:15 AM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Hi,

The last version of the tutorial grafoscopio notebook now includes these cool examples (credit is done with a Thanks line). Here is a cool preview ;-):



You can get this interactive documentation by installing grafoscopio [1] and then choosing from the docking bar "Actualizar > Documentación > Tutorial" (Sorry, for now interface and documentation are only in Spanish)

[1] http://smalltalkhub.com/#!/~Offray/Grafoscopio/

Thanks for these great examples, they're a nice addition to the interactive documentation.

Cheers,

Offray

On 14/03/16 01:33, Sven Van Caekenberghe wrote:
(ZnEasy getJpeg: ((NeoJSONReader fromString: 
>     (ZnClient new
>         url: 'http://www.omdbapi.com/';
>         queryAt: 't' put: 'The Terminator';
>         get;
>         contents)) at: #Poster)) inspect


Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

stepharo
In reply to this post by philippeback



What would be a good way to do that? I wonder.

In the same vein, in Angular, consuming webservices that have a "proper" REST API (if there is such a thing, but still, this is nice) is easy with Restangular (https://github.com/mgonto/restangular). Not having such a thing has costed me much time during hackathons, during which competition using it was wrapping webservices at the speed of light while I was plodding along.

Is there such a thing in Pharo?
Seaside REST

No: this is for exposing endpoints, not consuming them. See Restangular.

I know you are busy but me too.
So what do you mean consuming them?


 
Teapot

No: same.

I use SeasideREST and Teapot BTW.


Phil

On Mon, Mar 14, 2016 at 8:44 AM, stepharo <[hidden email]> wrote:
((STON fromString: (
    ZnEasy
        get: 'http://api.geonames.org/countryInfoJSON'
        username: 'demo'
        password: '') contents) at: #geonames) collect: [ : d | d at: #capital ]

With STON :)






Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

stepharo
In reply to this post by Ben Coman
wait I'm putting them as challenge for the mooc
Do not spoil the fun of students :)


Le 16/3/16 06:00, Ben Coman a écrit :
Looks cool.  I wonder if this would make a good basis for the main Image help system? 
cheers -ben 

On Wed, Mar 16, 2016 at 10:15 AM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Hi,

The last version of the tutorial grafoscopio notebook now includes these cool examples (credit is done with a Thanks line). Here is a cool preview ;-):



You can get this interactive documentation by installing grafoscopio [1] and then choosing from the docking bar "Actualizar > Documentación > Tutorial" (Sorry, for now interface and documentation are only in Spanish)

[1] http://smalltalkhub.com/#!/~Offray/Grafoscopio/

Thanks for these great examples, they're a nice addition to the interactive documentation.

Cheers,

Offray

On 14/03/16 01:33, Sven Van Caekenberghe wrote:
(ZnEasy getJpeg: ((NeoJSONReader fromString: 
>     (ZnClient new
>         url: 'http://www.omdbapi.com/';
>         queryAt: 't' put: 'The Terminator';
>         get;
>         contents)) at: #Poster)) inspect



Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

Tudor Girba-2
In reply to this post by stepharo
Phil is simply pointing out that if someone will look for JSON, the first thing that person will try will be to type “JSON” in Spotter and expect to find something for it. So, now there is a class called STONJSON.

Cheers,
Doru


> On Mar 16, 2016, at 5:48 PM, stepharo <[hidden email]> wrote:
>
>
>>
>>>
>>> What would be a good way to do that? I wonder.
>>>
>>> In the same vein, in Angular, consuming webservices that have a "proper" REST API (if there is such a thing, but still, this is nice) is easy with Restangular (https://github.com/mgonto/restangular). Not having such a thing has costed me much time during hackathons, during which competition using it was wrapping webservices at the speed of light while I was plodding along.
>>>
>>> Is there such a thing in Pharo?
>> Seaside REST
>>
>> No: this is for exposing endpoints, not consuming them. See Restangular.
>
> I know you are busy but me too.
> So what do you mean consuming them?
>
>>
>>  
>> Teapot
>>
>> No: same.
>>
>> I use SeasideREST and Teapot BTW.
>>
>>>
>>> Phil
>>>
>>> On Mon, Mar 14, 2016 at 8:44 AM, stepharo <[hidden email]> wrote:
>>> ((STON fromString: (
>>>     ZnEasy
>>>         get: 'http://api.geonames.org/countryInfoJSON'
>>>         username: 'demo'
>>>         password: '') contents) at: #geonames) collect: [ : d | d at: #capital ]
>>>
>>> With STON :)
>>>
>>>
>>>
>>
>>
>

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."





Reply | Threaded
Open this post in threaded view
|

Re: Ideas of web services that I could script in a couple of lines?

Offray Vladimir Luna Cárdenas-2
In reply to this post by Ben Coman
That would certainly close the circle, because I used Help System source code as an inspiration on how tree-like documentation could be implemented inside the image, but adding more interactivity and flexibility. In the attachment you can see the piece where I talk about this and full text is in [1].

[1] http://mutabit.com/repos.fossil/grafoscopio/doc/tip/Docs/Es/Articulos/Libertadores/bootstrapping-objeto-investigacion.pdf

Pharo allows me to explore old ideas [2] about exploratory computing, interactive documents and writing

[2] http://mutabit.com/offray/static/blog/output/posts/on-deepness-and-complexity-of-ipython-documents.html

Thanks for that :-),

Offray

On 16/03/16 00:00, Ben Coman wrote:
Looks cool.  I wonder if this would make a good basis for the main Image help system? 
cheers -ben 

On Wed, Mar 16, 2016 at 10:15 AM, Offray Vladimir Luna Cárdenas <[hidden email]> wrote:
Hi,

The last version of the tutorial grafoscopio notebook now includes these cool examples (credit is done with a Thanks line). Here is a cool preview ;-):



You can get this interactive documentation by installing grafoscopio [1] and then choosing from the docking bar "Actualizar > Documentación > Tutorial" (Sorry, for now interface and documentation are only in Spanish)

[1] http://smalltalkhub.com/#!/~Offray/Grafoscopio/

Thanks for these great examples, they're a nice addition to the interactive documentation.

Cheers,

Offray

On 14/03/16 01:33, Sven Van Caekenberghe wrote:
(ZnEasy getJpeg: ((NeoJSONReader fromString: 
>     (ZnClient new
>         url: 'http://www.omdbapi.com/';
>         queryAt: 't' put: 'The Terminator';
>         get;
>         contents)) at: #Poster)) inspect




bootstrap-from-help.png (98K) Download Attachment
12