[groovy-user] A Groovy Wrapper for the Backpack API

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

[groovy-user] A Groovy Wrapper for the Backpack API

tugwilson
If you use Backpack (http://www.backpackit.com/) you might be  
interested in a Groovy wrapper for its REST API

I have posted the code at http://www.wilson.co.uk/Groovy/ 
BackpackAPI.txt.

There is a small demo of how to use the class at the end of the file.

It doesn't handle SSL connections because i only have a free account  
and I can't test SSL.

Feedback welcome.


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

Guillaume Laforge
Administrator
Hello John,

On 08/11/05, John Wilson <[hidden email]> wrote:

> If you use Backpack (http://www.backpackit.com/) you might be
> interested in a Groovy wrapper for its REST API
>
> I have posted the code at http://www.wilson.co.uk/Groovy/
> BackpackAPI.txt.
>
> There is a small demo of how to use the class at the end of the file.
>
> It doesn't handle SSL connections because i only have a free account
> and I can't test SSL.
>
> Feedback welcome.

I must confess I haven't tested your program, but this looks pretty
good and fun to script backpack from Groovy. Well done!

I noticed that Google Base's just been released today:
http://base.google.com/

One can upload items on the base through FTP, and it might also be fun
to script the Google base with some mix of Groovy templates (tab
delimited, RSS 1.0, RSS 2.0 and Atom 0.3 format supported).

I wonder what we could store... I was thinking a custom base with
Groovy snippets, a bit like JavaAlmanac.com categorized by language
feature.

Might be fun ;-)

--
Guillaume Laforge
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

tugwilson

On 16 Nov 2005, at 12:50, Guillaume Laforge wrote:

>
> I noticed that Google Base's just been released today:
> http://base.google.com/
>
> One can upload items on the base through FTP, and it might also be fun
> to script the Google base with some mix of Groovy templates (tab
> delimited, RSS 1.0, RSS 2.0 and Atom 0.3 format supported).
>
> I wonder what we could store... I was thinking a custom base with
> Groovy snippets, a bit like JavaAlmanac.com categorized by language
> feature.


Yes this could be quite interesting - Atom 0.3 would be fun to do.

They don't seem to have a code snippet template (at least I could not  
find it).

We should certainly announce releases on Google Base:)



John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

Guillaume Laforge
Administrator
> Yes this could be quite interesting - Atom 0.3 would be fun to do.

That could be an intersting format to use (compared to the boring
tab-delimited files).

> They don't seem to have a code snippet template (at least I could not
> find it).

They've got some templates and samples for each format.
We could use our Groovy templates for that.

> We should certainly announce releases on Google Base:)

Yeah, that's an idea :-)

The pain currently with Google Base is that there's no API available.
You have to create a bulk upload in the interface, and you need to
send your item bundles through FTP. That's far less friendly than a
REST / XML-RPC interface :-(

--
Guillaume Laforge
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

tugwilson

On 16 Nov 2005, at 19:06, Guillaume Laforge wrote:

>
>> They don't seem to have a code snippet template (at least I could not
>> find it).
>
> They've got some templates and samples for each format.
> We could use our Groovy templates for that.

Or a Builder:)

>
>> We should certainly announce releases on Google Base:)
>
> Yeah, that's an idea :-)
>
> The pain currently with Google Base is that there's no API available.
> You have to create a bulk upload in the interface, and you need to
> send your item bundles through FTP. That's far less friendly than a
> REST / XML-RPC interface :-(

I think they may have a REST interface they say something about  
advising people to use FTP for big uploads implying that there's  
another way.


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

Guillaume Laforge
Administrator
On 16/11/05, John Wilson <[hidden email]> wrote:
> > They've got some templates and samples for each format.
> > We could use our Groovy templates for that.
>
> Or a Builder:)

The idea for the template was just to specify the variables in the
placeholders, rather than always rebuilding the whole XML with the
builder each time for each call. Just to avoid some boilerplate code.

> I think they may have a REST interface they say something about
> advising people to use FTP for big uploads implying that there's
> another way.

I think they just meant that for a few records to add to the base,
you'd use the web interface manually. But it doesn't mean they won't
provide an API though :-)

--
Guillaume Laforge
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

tugwilson

On 16 Nov 2005, at 19:44, Guillaume Laforge wrote:

> The idea for the template was just to specify the variables in the
> placeholders, rather than always rebuilding the whole XML with the
> builder each time for each call. Just to avoid some boilerplate code.


I tried uploading an Atom feed generated with a Builder but I get a  
validation error :(


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

Guillaume Laforge
Administrator
On 17/11/05, John Wilson <[hidden email]> wrote:
> I tried uploading an Atom feed generated with a Builder but I get a
> validation error :(

You used one of their standard object types? or did you build your own?
Because I've read reports that we can't really yet create our own
tags, because there are indeed validation bugs regarding the name of
the tags.

--
Guillaume Laforge
http://glaforge.free.fr/blog/groovy
Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

tugwilson

On 17 Nov 2005, at 12:39, Guillaume Laforge wrote:

> On 17/11/05, John Wilson <[hidden email]> wrote:
>> I tried uploading an Atom feed generated with a Builder but I get a
>> validation error :(
>
> You used one of their standard object types? or did you build your  
> own?
> Because I've read reports that we can't really yet create our own
> tags, because there are indeed validation bugs regarding the name of
> the tags.

I just copied one of their examples


John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Reply | Threaded
Open this post in threaded view
|

Re: [groovy-user] A Groovy Wrapper for the Backpack API

Guillaume Laforge
Administrator
On 17/11/05, John Wilson <[hidden email]> wrote:
> I just copied one of their examples

They we can safely say Google Base is buggy :-)))

--
Guillaume Laforge
http://glaforge.free.fr/blog/groovy
12