I missed Anthony's message, thanks I understand it now!
On Sep 15, 7:15 pm, Anaconda <[email protected]> wrote:
> thanks for the reply Eric,I will take a look at the python client
> libraries. Is there any web2py examples of making a request to an API
> and parsing the returned json?
>
> Sep 15, 2:55 pm, Eric <[email protected]> wrote:
>
>
>
>
>
>
>
> > I've not used any of the google api, but if you just need to access
> > and parse a json formatted api, you would need to use urllib or
> > urllib2 to make the request, then use simplejson or json or parse the
> > results:
>
> > import urllib
> > import simplejson
>
> > req = urllib.urlopen("http://google.com/api.json") ##<-example only
> > my_vars = simplejson.load(req)
>
> > Atom should be similar -- urllib to access, then some Atom library to
> > parse the data.
> > Google offers their own Python client libraries, so you may want to
> > look into one of those. The basic procedure should be the same,
> > however.
>
> > On Sep 15, 5:26 pm, Anaconda <[email protected]> wrote:
>
> > > Its my first time trying to access a webservice/api, would i use
> > > feedparser in web2py to to make http requests to a google api. They
> > > return their results in atom and json? I just need some
> > > guidance.......thanks in advance guys.
>
> > > Regards