Hi Tony, Thanks for the response. I know you're probably busy and there's no rush on this. As for my original posting, I'd like to clarify some things and re-ask some questions...
Due to my basic level of Python expertise, I'm not sure that my change is appropriate. It *worked* for me, but there may be a better way to do it with the existing code. I noticed some issues entered into Google Code for some other API problems and also patches submitted. Is this the preferred way to interact with the Google API code? Should I have entered an issue and patch? I'm a software engineer and I'm just trying to understand how this Google API code is maintained. Maybe the rules are somewhere and I just haven't seen them yet. If so, a pointer to any docs would be appreciated. Thanks again for your response, Doug On Sat, Apr 4, 2009 at 7:28 PM, Tony (Google) <[email protected]> wrote: > > Hi Doug, > > Sorry for the delayed response. We will include your change (and some > enhancement on the code from our end) in the next release which will > be some time next week. > > Thanks, > > --Tony > > On Apr 4, 11:13 am, DougC <[email protected]> wrote: > > It's been a week since I posted this and I haven't gotten a response. > > I'm a little confused about the Google Apps API code. I saw the new > > graphical reporting stuff, but no one seems to be interested in the > > base reporting API. Can anyone tell me if this code is being > > maintained? Does Google maintain it? I've seen some other patches > > submitted, but I'm not sure it is being rolled into the "official" > > package. > > > > I'm happy to keep my own fork of this code, but it would seem that > > others could benefit from patches that others can submit. > > > > Can anyone at Google let me know how this works? > > > > Thanks, > > > > Doug > > > > On Mar 27, 10:39 am, DougC <[email protected]> wrote: > > > > > I have a patch for the Python version of the google-apps-reporting-api- > > > client, (http://google-apps-reporting-api-client.googlecode.com/files/ > > > reporting-api-python-1.0.0.zip) but I'm unsure how to provide it. The > > > existing code hasn't been changed since September 2007, so I'm not > > > sure if it's being maintained. The code is interesting, works OK as a > > > standalone script, but I've had a very difficult time using it as an > > > API without any Python documentation. > > > > > That said, the problems I've had may be due to my lack of experience > > > with Python and the inability to deduce the API from the code. > > > > > The patch that I think is necessary is one word, in the Login() > > > function. The current implementation does not return any value and > > > ends with: > > > > > if name == 'SID': > > > self.token = value > > > return > > > > > I've changed this, so that the Login() function returns the login > > > token: > > > > > if name == 'SID': > > > self.token = value > > > return value > > > > > With this change, I'm able to make calls from my own code: > > > > > import google.apps.reporting > > > > > def get_google_info(admin, password, domain): > > > report = ReportRunner() > > > report.admin_email = admin + "@" + domain > > > report.admin_password = password > > > token = report.Login() > > > > > request = ReportRequest() > > > request.domain = report.GetAdminEmailDomain() > > > request.report_name = "accounts" > > > request.date = report.GetLatestReportDate() > > > request.token = token > > > > > rdata = report.GetReportData(request) > > > > > return rdata > > > --- > > > > > Again, I am new to Python and may be using this module completely > > > wrong. If so, I'd be very interested in the "right way" to use it. > > > > > Thanks, > > > > > Doug > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Apps APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-apps-apis?hl=en -~----------~----~----~----~------~----~------~--~---
