Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(822)

Issue 4867056: Added sample code for the Google Affiliate Network API

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by namos
Modified:
13 years ago
Reviewers:
jcgregorio_google, Ali Afshar, joe
CC:
google-api-python-client_googlegroups.com
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : Removed unnecessary files. #

Total comments: 10

Patch Set 3 : Small fixes, added print to stdout for returned data #

Total comments: 8

Patch Set 4 : Updated output file options #

Patch Set 5 : Fix indent in offers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+501 lines, -0 lines) Patch
A samples/gan/ccoffers/offers.py View 1 2 3 4 1 chunk +126 lines, -0 lines 0 comments Download
A samples/gan/ccoffers/offers_template.html View 1 2 3 1 chunk +99 lines, -0 lines 0 comments Download
A samples/gan/events/events.py View 1 2 3 1 chunk +170 lines, -0 lines 0 comments Download
A samples/gan/events/events_template.html View 1 2 3 1 chunk +106 lines, -0 lines 0 comments Download

Messages

Total messages: 17
jcgregorio_google
There are a lot of moving parts here. I think test.py and test.html can be ...
13 years ago (2011-08-17 13:54:28 UTC) #1
namos
The APIs return a large amount of data, so it's not clear that printing the ...
13 years ago (2011-08-17 14:29:06 UTC) #2
Ali Afshar
I general, I would consider: 1. removing the html templates, and write prettified JSON to ...
13 years ago (2011-08-19 12:47:41 UTC) #3
namos
I made the changes you requested. I'm leaning against separating the files to make the ...
13 years ago (2011-08-19 15:23:33 UTC) #4
jcgregorio_google
Move samples to either /samples/searchforshopping/gan or /samples/gan/. http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/ccoffers/offers.py File samples/django_sample/gan/ccoffers/offers.py (right): http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/ccoffers/offers.py#newcode55 samples/django_sample/gan/ccoffers/offers.py:55: gflags.DEFINE_string('filename', 'offers.dat', ...
13 years ago (2011-08-19 15:36:16 UTC) #5
namos
Sorry about the delay on this. We've been resolving some issues with getting the API ...
13 years ago (2011-09-02 14:55:12 UTC) #6
namos
Thanks for the tip. I completely forgot about the app specific passwords. </personalmessage> http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/ccoffers/offers.py File ...
13 years ago (2011-09-02 15:02:21 UTC) #7
jcgregorio_google
Are you sure, I'm not seeing any changes on codereview.appspot.com. Did you supply "--issue 4867056" ...
13 years ago (2011-09-02 15:07:12 UTC) #8
namos
I did. Do you see patch set 4? I moved the files to the new ...
13 years ago (2011-09-02 15:10:26 UTC) #9
jcgregorio_google
Yes, I see it, and it doesn't contain the changes we talked about. For example, ...
13 years ago (2011-09-02 15:14:23 UTC) #10
namos
Is that the only thing that is missing? I must have misunderstood what that comment ...
13 years ago (2011-09-02 15:30:06 UTC) #11
jcgregorio_google
On Fri, Sep 2, 2011 at 11:30 AM, <namos@google.com> wrote: > Is that the only ...
13 years ago (2011-09-02 15:47:58 UTC) #12
namos
Alright, should be fixed now. Thanks, Ryan On 2011/09/02 15:47:58, jcgregorio_google wrote: > On Fri, ...
13 years ago (2011-09-02 15:57:38 UTC) #13
namos
What's the status on this? Is there anything else I need to change? Thanks, Ryan ...
13 years ago (2011-09-08 20:02:26 UTC) #14
jcgregorio_google
Sorry for the delay, just committed: http://code.google.com/p/google-api-python-client/source/detail?r=7726fb4cb17864c3763ecf359e4dc47266c2a950 Can you write up a separate CL that ...
13 years ago (2011-09-08 20:13:59 UTC) #15
namos
Is it sufficient for it to mention that you need django installed in the codesite ...
13 years ago (2011-09-08 20:55:22 UTC) #16
joe_bitworking.org
13 years ago (2011-09-08 20:57:54 UTC) #17
I'd like it in both as you can't be sure a user would hit the sample
first and the docs second.

  -joe

On Thu, Sep 8, 2011 at 4:55 PM,  <namos@google.com> wrote:
> Is it sufficient for it to mention that you need django installed in the
> codesite google affiliate network api docs? Or do I need a readme as
> well?
> On 2011/09/08 20:13:59, jcgregorio_google wrote:
>>
>> Sorry for the delay, just committed:
>
>
http://code.google.com/p/google-api-python-client/source/detail?r=7726fb4cb17...
>
>> Can you write up a separate CL that adds a README to the sample to let
>> people know they need Django installed to run the sample?
>
>>   Thanks,
>>   -joe
>
>> On Thu, Sep 8, 2011 at 4:02 PM,  <mailto:namos@google.com> wrote:
>> > What's the status on this? Is there anything else I need to change?
>> >
>> > Thanks,
>> > Ryan
>> > On 2011/09/02 15:57:38, namos wrote:
>> >>
>> >> Alright, should be fixed now.
>> >> Thanks,
>> >> Ryan
>> >
>> >> On 2011/09/02 15:47:58, jcgregorio_google wrote:
>> >> > On Fri, Sep 2, 2011 at 11:30 AM, &nbsp;<mailto:namos@google.com>
>
> wrote:
>>
>> >> > > Is that the only thing that is missing? I must have
>
> misunderstood
>>
>> >
>> > what
>> >>
>> >> > > that comment meant. I thought it meant add a space between #
>
> and
>>
>> >> > > "advertiser..." on the next line. Should the comments be
>
> indented
>>
>> >
>> > only
>> >>
>> >> > > two spaces?
>> >> >
>> >> > Yes, if you align the parameters then you exceed 80 chars.
>> >> >
>> >> > &nbsp; Sorry for the confusion.
>> >> > &nbsp; -joe
>> >> >
>> >> > >
>> >> > > On 2011/09/02 15:14:23, jcgregorio_google wrote:
>> >> > >>
>> >> > >> Yes, I see it, and it doesn't contain the changes we talked
>> >
>> > about. For
>> >>
>> >> > >> example, the indenting
>> >> > >> hasn't been fixed near the "TODO(leadpipe)" in:
>> >> > >
>> >> > >> &nbsp;http://codereview.appspot.com/4867056/patch/16001/17001
>> >> > >
>> >> > >> &nbsp; -joe
>> >> > >
>> >> > >> On Fri, Sep 2, 2011 at 11:10 AM,
>
> &nbsp;<mailto:namos@google.com>
>>
>> >
>> > wrote:
>> >>
>> >> > >> > I did. Do you see patch set 4? I moved the files to the new
>
> dir
>>
>> >
>> > that
>> >>
>> >> > >
>> >> > > you
>> >> > >>
>> >> > >> > suggested, so they don't have diffs.
>> >> > >> >
>> >> > >> > On 2011/09/02 15:07:12, jcgregorio_google wrote:
>> >> > >> >>
>> >> > >> >> Are you sure, I'm not seeing any changes on
>> >> > >> >
>> >> > >> > http://codereview.appspot.com. Did
>> >> > >> >>
>> >> > >> >> you supply "--issue &nbsp;4867056" on the command-line to
>> >
>> > update
>> >>
>> >> > >
>> >> > > the
>> >> > >>
>> >> > >> >
>> >> > >> > existing issue?
>> >> > >> >
>> >> > >> >> On Fri, Sep 2, 2011 at 11:02 AM,
>> >
>> > &nbsp;<mailto:namos@google.com>
>> >>
>> >> > >
>> >> > > wrote:
>> >> > >>
>> >> > >> >> > Thanks for the tip. I completely forgot about the app
>> >
>> > specific
>> >>
>> >> > >> >> > passwords.
>> >> > >> >> > </personalmessage>
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >
>> >> > >
>> >> >
>> >
>> >
>
>
http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/cco...
>>
>> >>
>> >> > >>
>> >> > >> >>
>> >> > >> >> > File samples/django_sample/gan/ccoffers/offers.py
>
> (right):
>>
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >
>> >> > >
>> >> >
>> >
>> >
>
>
http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/cco...
>>
>> >>
>> >> > >>
>> >> > >> >>
>> >> > >> >> > samples/django_sample/gan/ccoffers/offers.py:55:
>> >> > >> >> > gflags.DEFINE_string('filename', 'offers.dat',
>> >> > >> >> > On 2011/08/19 15:36:16, jcgregorio_google wrote:
>> >> > >> >> >>
>> >> > >> >> >> Make the default file name empty and only write the
>
> output
>>
>> >
>> > to
>> >>
>> >> > >
>> >> > > file
>> >> > >>
>> >> > >> >
>> >> > >> > if
>> >> > >> >>
>> >> > >> >> >
>> >> > >> >> > a name is
>> >> > >> >> >>
>> >> > >> >> >> provided.
>> >> > >> >> >
>> >> > >> >> > Done.
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >
>> >> > >
>> >> >
>> >
>> >
>
>
http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/cco...
>>
>> >>
>> >> > >>
>> >> > >> >>
>> >> > >> >> > samples/django_sample/gan/ccoffers/offers.py:75: if
>> >
>> > len(argv) !=
>> >>
>> >> > >
>> >> > > 2:
>> >> > >>
>> >> > >> >> > usage(argv)
>> >> > >> >> > On 2011/08/19 15:36:16, jcgregorio_google wrote:
>> >> > >> >> >>
>> >> > >> >> >> make this two lines
>> >> > >> >> >
>> >> > >> >> > Done.
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >
>> >> > >
>> >> >
>> >
>> >
>
>
http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/cco...
>>
>> >>
>> >> > >>
>> >> > >> >>
>> >> > >> >> > samples/django_sample/gan/ccoffers/offers.py:100: #
>> >> > >
>> >> > > TODO(leadpipe):
>> >> > >>
>> >> > >> >
>> >> > >> > add
>> >> > >> >>
>> >> > >> >> > back when advertiser is repeated
>> >> > >> >> > On 2011/08/19 15:36:16, jcgregorio_google wrote:
>> >> > >> >> >>
>> >> > >> >> >> Leading space
>> >> > >> >> >
>> >> > >> >> > Done.
>> >> > >> >> >
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >
>> >> > >
>> >> >
>> >
>> >
>
>
http://codereview.appspot.com/4867056/diff/9001/samples/django_sample/gan/cco...
>>
>> >>
>> >> > >>
>> >> > >> >>
>> >> > >> >> > samples/django_sample/gan/ccoffers/offers.py:117: print
>> >> > >> >
>> >> > >> > json.dumps(list,
>> >> > >> >>
>> >> > >> >> > sort_keys=True, indent=4)
>> >> > >> >> > On 2011/08/19 15:36:16, jcgregorio_google wrote:
>> >> > >> >> >>
>> >> > >> >> >> Use FLAGS.filename to choose between either writing
>
> output
>>
>> >
>> > to
>> >>
>> >> > >> >
>> >> > >> > stdout,
>> >> > >> >>
>> >> > >> >> >
>> >> > >> >> > or writing
>> >> > >> >> >>
>> >> > >> >> >> to a file.
>> >> > >> >> >
>> >> > >> >> > filename was for storing credentials. This is now changed
>
> to
>>
>> >> > >> >> > credentials_filename, and I added an additional flag for
>> >
>> > setting
>> >>
>> >> > >
>> >> > > the
>> >> > >>
>> >> > >> >> > output mode.
>> >> > >> >> >
>> >> > >> >> > http://codereview.appspot.com/4867056/
>> >> > >> >> >
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > http://codereview.appspot.com/4867056/
>> >> > >> >
>> >> > >
>> >> > >
>> >> > >
>> >> > > http://codereview.appspot.com/4867056/
>> >> > >
>> >
>> >
>> >
>> > http://codereview.appspot.com/4867056/
>> >
>
>
>
> http://codereview.appspot.com/4867056/
>



-- 
Joe Gregorio        http://bitworking.org
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b