Ravi, normally what I've done in the past is to make a based-on-1.9 branch.
That way all you need to do when you release 1.9 is hg merge the branch. Will
review this changeset next week.
LGTM, very good, simple sample. Just a few tiny nits from me. http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java File drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java ...
http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java File drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java (right): http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java#newcode40 drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:40: * A sample application that runs multiple requests against ...
11 years, 12 months ago
(2012-05-07 12:08:13 UTC)
#4
http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/ja...
File
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java
(right):
http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/ja...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:40:
* A sample application that runs multiple requests against the Ad Exchange Buyer
API. These
On 2012/05/04 22:03:56, Ali Afshar wrote:
> Drive API
Done.
http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/ja...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:61:
private static Drive drive;
On 2012/05/04 22:03:56, Ali Afshar wrote:
> Not immediately obvious what this is.
Done.
http://codereview.appspot.com/6196046/diff/1/drive-cmdline-sample/src/main/ja...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:63:
private static final java.io.File UPLOAD_FILE = new
java.io.File("/tmp/Oscar.jpg");
On 2012/05/04 22:03:56, Ali Afshar wrote:
> Any way this can be configured instead of hard-coded? It's not a problem, but
it
> might be nice.
Ah yes, I forgot to do this. Done.
Added instructions in instructions.html as well.
On 2012/05/04 21:46:39, yanivi wrote: > Ravi, normally what I've done in the past is ...
11 years, 12 months ago
(2012-05-07 12:13:37 UTC)
#5
On 2012/05/04 21:46:39, yanivi wrote:
> Ravi, normally what I've done in the past is to make a based-on-1.9 branch.
> That way all you need to do when you release 1.9 is hg merge the branch. Will
> review this changeset next week.
Created based-on-1.9 branch.
I'm getting a 403 with the error message: "message": "The authenticated user has not installed ...
11 years, 11 months ago
(2012-05-14 19:48:24 UTC)
#6
I'm getting a 403 with the error message:
"message": "The authenticated user has not installed the app with client id
1015882909573.apps.googleusercontent.com"
Probably it is because I skipped the "Create a hosted chrome app with
Drive-specific details" step from the instructions.html. I just don't have the
time right now to step through that process.
But there is a bigger strategic questions here that we are promoting a Java
command-line sample, whereas that's not really a target for the Drive SDK, which
appears to be more for Chrome Apps. In fact, there is already a Drive SDK Java
DrEdit sample at:
https://code.google.com/p/google-drive-sdk-samples/source/browse/java/src/com...
It looks like it does some basic media upload/download.
So my question: can we instead update the DrEdit Java sample instead? I think
strategically that makes more sense. Is there any way Vic or Ali that you would
be able to update that sample yourselves since I want to minimize Ravi's effort
here.
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
File drive-cmdline-sample/instructions.html (right):
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
drive-cmdline-sample/instructions.html:17: <li>Visit the <a
href="https://code.google.com/apis/console/">Google apis console</a></li>
https://code.google.com/apis/console/?api=drivehttp://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
drive-cmdline-sample/instructions.html:19: <li>Activate the Drive API and Drive
SDK and agree to the terms of service</li>
[aside] wow, this is really bizarre to have both "Drive API" and "Drive SDK"
entries in the Console. I hope the Drive team is planning to fix this in the
future?
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
File
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java
(right):
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:63:
private static final java.io.File UPLOAD_FILE = new java.io.File("[[ENTER FILE
PATH]]");
move these to the top of the declarataions to be easier to find
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:66:
public static void main(String[] args) {
if UPLOAD_FILE or DIR_FOR_DOWNLOADS is not specified, we should show an error
message immediately, just like we do when the CLIENT_ID & CLIENT_SECRET are
unspecified:
Preconditions.checkArgument(!clientSecrets.getDetails().getClientId().startsWith("[[")
&& !clientSecrets.getDetails().getClientSecret().startsWith("[["),
"Please enter your client ID and secret from the Google APIs Console
in %s from the "
+ "root samples directory", RESOURCE_PATH);
On 2012/05/14 19:48:24, yanivi wrote: > I'm getting a 403 with the error message: > ...
11 years, 11 months ago
(2012-05-15 17:25:15 UTC)
#7
On 2012/05/14 19:48:24, yanivi wrote:
> I'm getting a 403 with the error message:
>
> "message": "The authenticated user has not installed the app with client
id
> 1015882909573.apps.googleusercontent.com"
>
> Probably it is because I skipped the "Create a hosted chrome app with
> Drive-specific details" step from the instructions.html. I just don't have
the
> time right now to step through that process.
>
> But there is a bigger strategic questions here that we are promoting a Java
> command-line sample, whereas that's not really a target for the Drive SDK,
which
> appears to be more for Chrome Apps.
Chrome hosted web apps, not packaged extensions. In this case Java is a perfect
fit.
> In fact, there is already a Drive SDK Java
> DrEdit sample at:
>
>
https://code.google.com/p/google-drive-sdk-samples/source/browse/java/src/com...
> It looks like it does some basic media upload/download.
>
> So my question: can we instead update the DrEdit Java sample instead? I think
> strategically that makes more sense. Is there any way Vic or Ali that you
would
> be able to update that sample yourselves since I want to minimize Ravi's
effort
> here.
How would you like it updated? It is currently consistent with the other
language samples.
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> File drive-cmdline-sample/instructions.html (right):
>
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> drive-cmdline-sample/instructions.html:17: <li>Visit the <a
> href="https://code.google.com/apis/console/">Google apis console</a></li>
> https://code.google.com/apis/console/?api=drive
>
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> drive-cmdline-sample/instructions.html:19: <li>Activate the Drive API and
Drive
> SDK and agree to the terms of service</li>
> [aside] wow, this is really bizarre to have both "Drive API" and "Drive SDK"
> entries in the Console. I hope the Drive team is planning to fix this in the
> future?
>
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
> File
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java
> (right):
>
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:63:
> private static final java.io.File UPLOAD_FILE = new java.io.File("[[ENTER FILE
> PATH]]");
> move these to the top of the declarataions to be easier to find
>
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:66:
> public static void main(String[] args) {
> if UPLOAD_FILE or DIR_FOR_DOWNLOADS is not specified, we should show an error
> message immediately, just like we do when the CLIENT_ID & CLIENT_SECRET are
> unspecified:
>
>
>
>
Preconditions.checkArgument(!clientSecrets.getDetails().getClientId().startsWith("[[")
> && !clientSecrets.getDetails().getClientSecret().startsWith("[["),
> "Please enter your client ID and secret from the Google APIs Console
> in %s from the "
> + "root samples directory", RESOURCE_PATH);
On 2012/05/15 17:25:15, Ali Afshar wrote: > On 2012/05/14 19:48:24, yanivi wrote: > > I'm ...
11 years, 11 months ago
(2012-05-15 19:01:10 UTC)
#9
On 2012/05/15 17:25:15, Ali Afshar wrote:
> On 2012/05/14 19:48:24, yanivi wrote:
> > I'm getting a 403 with the error message:
> >
> > "message": "The authenticated user has not installed the app with client
> id
> > 1015882909573.apps.googleusercontent.com"
> >
> > Probably it is because I skipped the "Create a hosted chrome app with
> > Drive-specific details" step from the instructions.html. I just don't have
> the
> > time right now to step through that process.
> >
> > But there is a bigger strategic questions here that we are promoting a Java
> > command-line sample, whereas that's not really a target for the Drive SDK,
> which
> > appears to be more for Chrome Apps.
>
> Chrome hosted web apps, not packaged extensions. In this case Java is a
perfect
> fit.
>
> > In fact, there is already a Drive SDK Java
> > DrEdit sample at:
> >
> >
>
https://code.google.com/p/google-drive-sdk-samples/source/browse/java/src/com...
>
> > It looks like it does some basic media upload/download.
> >
> > So my question: can we instead update the DrEdit Java sample instead? I
think
> > strategically that makes more sense. Is there any way Vic or Ali that you
> would
> > be able to update that sample yourselves since I want to minimize Ravi's
> effort
> > here.
>
> How would you like it updated? It is currently consistent with the other
> language samples.
>
I think what Yaniv means is can we get it updated to do resumable media upload
and resumable media download similar to what this CL does.
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> > File drive-cmdline-sample/instructions.html (right):
> >
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> > drive-cmdline-sample/instructions.html:17: <li>Visit the <a
> > href="https://code.google.com/apis/console/">Google apis console</a></li>
> > https://code.google.com/apis/console/?api=drive
> >
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/instruct...
> > drive-cmdline-sample/instructions.html:19: <li>Activate the Drive API and
> Drive
> > SDK and agree to the terms of service</li>
> > [aside] wow, this is really bizarre to have both "Drive API" and "Drive SDK"
> > entries in the Console. I hope the Drive team is planning to fix this in
the
> > future?
> >
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
> > File
> >
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java
> > (right):
> >
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
> >
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:63:
> > private static final java.io.File UPLOAD_FILE = new java.io.File("[[ENTER
FILE
> > PATH]]");
> > move these to the top of the declarataions to be easier to find
> >
> >
>
http://codereview.appspot.com/6196046/diff/9002/drive-cmdline-sample/src/main...
> >
>
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:66:
> > public static void main(String[] args) {
> > if UPLOAD_FILE or DIR_FOR_DOWNLOADS is not specified, we should show an
error
> > message immediately, just like we do when the CLIENT_ID & CLIENT_SECRET are
> > unspecified:
> >
> >
> >
> >
>
Preconditions.checkArgument(!clientSecrets.getDetails().getClientId().startsWith("[[")
> > && !clientSecrets.getDetails().getClientSecret().startsWith("[["),
> > "Please enter your client ID and secret from the Google APIs
Console
> > in %s from the "
> > + "root samples directory", RESOURCE_PATH);
On 2012/05/16 15:22:11, yanivi wrote: > We decided to sit on this sample for a ...
11 years, 11 months ago
(2012-05-17 11:01:03 UTC)
#11
On 2012/05/16 15:22:11, yanivi wrote:
> We decided to sit on this sample for a couple of weeks and revisit it later.
Agreed. Will revisit in a couple of weeks.
Not quite following the thread re: DrEdit Java, but let me know if you'd like ...
11 years, 11 months ago
(2012-05-17 17:02:39 UTC)
#12
Not quite following the thread re: DrEdit Java, but let me know if you'd
like it updated in any way, and I can update it. It currently doesn't do
resumable, so am happy to change that.
-Vic
On Thu, May 17, 2012 at 7:01 AM, <rmistry@google.com> wrote:
> On 2012/05/16 15:22:11, yanivi wrote:
>
>> We decided to sit on this sample for a couple of weeks and revisit it
>>
> later.
>
> Agreed. Will revisit in a couple of weeks.
>
>
http://codereview.appspot.com/**6196046/<http://codereview.appspot.com/6196046/>
>
Ali clarified for me. I will update DrEdit Java, and we will keep the CL ...
11 years, 11 months ago
(2012-05-17 17:09:01 UTC)
#13
Ali clarified for me. I will update DrEdit Java, and we will keep the CL
sample.
-Vic
On Thu, May 17, 2012 at 1:02 PM, Vic Fryzel <vicfryzel@google.com> wrote:
> Not quite following the thread re: DrEdit Java, but let me know if you'd
> like it updated in any way, and I can update it. It currently doesn't do
> resumable, so am happy to change that.
>
> -Vic
>
>
>
> On Thu, May 17, 2012 at 7:01 AM, <rmistry@google.com> wrote:
>
>> On 2012/05/16 15:22:11, yanivi wrote:
>>
>>> We decided to sit on this sample for a couple of weeks and revisit it
>>>
>> later.
>>
>> Agreed. Will revisit in a couple of weeks.
>>
>>
http://codereview.appspot.com/**6196046/<http://codereview.appspot.com/6196046/>
>>
>
>
On 2012/06/29 16:28:00, rmistry wrote: > Updated this CL to point to the released v2 ...
11 years, 10 months ago
(2012-06-29 16:33:14 UTC)
#15
On 2012/06/29 16:28:00, rmistry wrote:
> Updated this CL to point to the released v2 drive generated libs.
> Sending it out for review again now that the hosted requirement has been
> removed.
LGTM
11 years, 8 months ago
(2012-09-05 21:24:20 UTC)
#20
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/instruc...
File drive-cmdline-sample/instructions.html (right):
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/instruc...
drive-cmdline-sample/instructions.html:2: <title>drive-cmdline-sample</title>
On 2012/09/05 20:48:46, yanivi wrote:
> please Ctrl-Shift-F in Eclipse this file to format it nicer
Done.
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/instruc...
drive-cmdline-sample/instructions.html:27: <li>Create a chrome app with
Drive-specific details using the following documentations:
On 2012/09/05 20:48:46, yanivi wrote:
> I was able to run the sample without every creating a chrome app. Please
remove
> this section. That is, unless Drive team believes otherwise.
Removed.
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/instruc...
drive-cmdline-sample/instructions.html:54: <h3>Setup Project in Eclipse
3.5/3.6</h3>
On 2012/09/05 20:48:46, yanivi wrote:
> remove " in Eclipse 3.5/3.6"
Done.
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/instruc...
drive-cmdline-sample/instructions.html:91: <li>To enable logging:
On 2012/09/05 20:48:46, yanivi wrote:
> remove enable logging section
Done.
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/src/mai...
File
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java
(right):
http://codereview.appspot.com/6196046/diff/39003/drive-cmdline-sample/src/mai...
drive-cmdline-sample/src/main/java/com/google/api/services/samples/drive/cmdline/DriveSample.java:163:
OutputStream out = new FileOutputStream(DIR_FOR_DOWNLOADS +
uploadedFile.getTitle());
On 2012/09/05 20:48:46, yanivi wrote:
> I ran into a problem because I hadn't previously created DIR_FOR_DOWNLOADS on
> my local drive, and also because I didn't include '/' at the end. We can be
> more robust to this by changing the code to:
>
> // create parent directory (if necessary)
> java.io.File parentDir = new java.io.File(DIR_FOR_DOWNLOADS);
> if (!parentDir.exists() && !parentDir.mkdirs()) {
> throw new IOException("unable to create parent directory");
> }
> OutputStream out = new FileOutputStream(new java.io.File(parentDir,
> uploadedFile.getTitle()));
Done.
Issue 6196046: Drive API sample with resumable and direct media upload and download
(Closed)
Created 12 years ago by rmistry
Modified 11 years, 8 months ago
Reviewers: yanivi, Ali Afshar
Base URL:
Comments: 23