Hi Doug,

You are very welcome.  I am glad that I can help to clear up some of
your confusions :)

Thanks,

--Tony

On Apr 5, 5:21 pm, Doug Carter <[email protected]> wrote:
> Hi Tony,
>
> On Sun, Apr 5, 2009 at 4:24 PM, Tony (Google) <[email protected]> wrote:
>
> > Hi Doug,
>
> > Yes, the Reporting client code is not part of the Google Data client
> > library as its request/response format does not follow the Google Data
> > protocol:
>
> >http://code.google.com/apis/gdata/overview.html
>
> Wow, this really explains a lot. It's always seemed like I was working with
> two different API protocols. It's beyond me, but I guess someone thought it
> was OK to provide an inconsistent API protocol and still call it a "Google
> API"? It's been a big timesink for me trying to understand it, but now I
> think I get it. It might be helpful to label the non-compliant APIs, just to
> save time for other developers in the future.
>
> > However, as you suggested, it could turn into a more API like library
> > if the community demands and/or contributes to it :)
>
> Gosh, I'm not sure what to say or where to start. I'm really interested in
> consistent Google APIs. However, the back-end of the reporting data is
> nothing like the provisioning data. In fact, there's many cases where the
> data overlaps. For example, I can get a listing of active users from both
> APIs, but with much different code. I can get some user status from both,
> but only the reporting API can give me last_login.
>
> Which gets me back to my real goal. All I want to do, is programmatically
> disable defunct users (users that have not logged in, used their webmail or
> popped their mail) To do this, I need to get some data from the Reporting
> API, then use it in the Provisioning API.
>
> I really appreciate all of your help, I wish I would have posted some
> questions earlier. Somehow I got caught up with seeing the Provisioning and
> Reporting APIs in the same list, and thinking it was all "one big package".
> You've really helped me understand that it's not, and that I need to read
> more carefully.
>
> Thanks again,
>
> Doug
>
> On Apr 5, 3:49 pm, Doug Carter <[email protected]> wrote:
>
> > > Hi Tony,
>
> > > Yes, this is helping with some of my confusion. I will checkout the
> > > "Becoming A Contributor" link.
>
> > > However, your last sentence does lead some more questions. You say that
> > > "...we hope to follow a more formal process like the one we have for
> > Google
> > > Data client libraries...".
>
> > > So this Reporting client code is just some sample code, not really an API
> > > library and not part of the Google Data client library? This may be where
> > my
> > > confusion is coming from. I thought it was the same as the Provisioning
> > API.
>
> > > Hopefully, your work will help bring all of the different APIs,
> > > documentation, examples and code into a more cohesive and coherent
> > package.
>
> > > Thanks again,
>
> > > Doug
>
> > > On Sun, Apr 5, 2009 at 2:36 PM, Tony (Google) <[email protected]> wrote:
>
> > > > Hi Doug,
>
> > > > Usually, we have a more formal process for submitting patches, for
> > > > example, to our Python Google Data client library:
>
> > > >http://code.google.com/p/gdata-python-client/wiki/BecomingAContributor
>
> > > > The goal of the google-apps-reporting-api-client project was just to
> > > > provide sample code to Apps administrator on how to use the Reporting
> > > > API.  For that reason, the design of the code may not have
> > > > extensibility/reusability taken into account as much.  Since it is
> > > > open sourced, we very much appreciate contributions and suggestions
> > > > like yours to improve the libraries.  The patch process is currently a
> > > > little less formal but we hope to follow a more formal process like
> > > > the one we have for Google Data client libraries in the future.
>
> > > > I hope this addresses your questions.
>
> > > > Thanks,
>
> > > > --Tony
>
> > > > On Apr 5, 1:08 pm, Doug Carter <[email protected]> wrote:
> > > > > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to