From 123b055fea07702b771976921915ccfdf8243f3e Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 3 Aug 2018 15:54:15 -0700 Subject: [PATCH] Docs: Convert to markdown (#193) * Convert assembly readme.html -> README.md and fix links * Convert and clean dailymotion-cmdline-sample to markdown --- google-oauth-client-assembly/README.md | 129 +++++++++++++ google-oauth-client-assembly/assembly.xml | 2 +- google-oauth-client-assembly/readme.html | 188 ------------------- samples/dailymotion-cmdline-sample/README.md | 67 +++++++ 4 files changed, 197 insertions(+), 189 deletions(-) create mode 100644 google-oauth-client-assembly/README.md delete mode 100644 google-oauth-client-assembly/readme.html create mode 100644 samples/dailymotion-cmdline-sample/README.md diff --git a/google-oauth-client-assembly/README.md b/google-oauth-client-assembly/README.md new file mode 100644 index 000000000..5d49d3511 --- /dev/null +++ b/google-oauth-client-assembly/README.md @@ -0,0 +1,129 @@ +# Google OAuth Client Library for Java + +## Overview + +High-level details about this library can be found at +https://github.com/google/google-oauth-java-client + +* [Release Notes][release-notes] +* [JavaDoc][javadoc] +* [Developer's Guide][developers-guide] +* [Support][support] + +## Dependencies and Licenses + +The license can be found [here](LICENSE.txt). + +Dependent jars can be found in the [libs](libs) folder and the corresponding source jars can be +found in the [libs-sources](libs-sources) folder. + +The dependency structure and licenses for the different libraries can be found here: + +* [google-oauth-client](dependencies/google-oauth-client-dependencies.html) +* [google-oauth-client-appengine](dependencies/google-oauth-client-appengine-dependencies.html) +* [google-oauth-client-servlet](dependencies/google-oauth-client-servlet-dependencies.html) +* [google-oauth-client-java6](dependencies/google-oauth-client-java6-dependencies.html) +* [google-oauth-client-jetty](dependencies/google-oauth-client-jetty-dependencies.html) +* [google-http-client](dependencies/google-http-client-dependencies.html) +* [google-http-client-android](dependencies/google-http-client-android-dependencies.html) +* [google-http-client-appengine](dependencies/google-http-client-appengine-dependencies.html) +* [google-http-client-protobuf](dependencies/google-http-client-protobuf-dependencies.html) +* [google-http-client-gson](dependencies/google-http-client-gson-dependencies.html) +* [google-http-client-jackson](dependencies/google-http-client-jackson-dependencies.html) +* [google-http-client-jackson2](dependencies/google-http-client-jackson2-dependencies.html) + +## Maven Usage + +For information on how to add these libraries to your Maven project please see +[Setup Maven][setup-maven]. + +## Eclipse + +A `.classpath` file snippet that can be included in your project's `.classpath` has been provided +[here](.classpath). Please only use the `classpathentry`s you actually need (see below for more +details). + +## ProGuard + +A ProGuard configuration file [proguard-google-oauth-client.txt](proguard-google-oauth-client.txt) +is included for common settings for using the library. On Android projects, you may want to add a +reference to `proguard-google-oauth-client.txt` in the `project.properties` file under the +`proguard.config` property. + +Please read [Setup ProGuard][proguard-setup] for more details. + +## Dependencies for all Platforms + +The following are the jars from the [libs](libs) folder needed for applications on all platform: + +* google-oauth-client-${project.version}.jar +* google-http-client-${project.http.version}.jar +* jsr305-${project.jsr305.version}.jar +* google-http-client-protobuf-${project.http.version}.jar (when using protobuf-java) + * protobuf-java-${project.protobuf-java.version}.jar +* google-http-client-gson-${project.http.version}.jar (when using GSON) + * gson-${project.gson.version}.jar +* google-http-client-jackson-${project.http.version}.jar (when using Jackson) + * jackson-core-asl-${project.jackson-core-asl.version}.jar +* google-http-client-jackson2-${project.http.version}.jar (when using Jackson 2) + * jackson-core-${project.jackson-core2.version}.jar +* google-http-client-xml-${project.version}.jar (when using XML) + * xpp3-${project.xpp3.version}.jar (when NOT on Android) + +## Android Dependencies + +The following are the jars from the [libs](libs) folder required for Android applications: + +* google-http-client-android-${project.http.version}.jar + +The libs folder also contains properties files that specify the location of source jars for Android +projects in Eclipse. + +Please see the [Setup Android][android-setup] for more details. + +## Google App Engine Dependencies + +The following are the jars from the [libs](libs) folder required for Google App Engine applications +or a newer compatible version: + +* google-oauth-client-appengine-${project.version}.jar +* google-oauth-client-servlet-${project.version}.jar +* google-http-client-appengine-${project.http.version}.jar +* jdo2-api-${project.jdo2-api.version}.jar +* transaction-api-${project.transaction-api.version}.jar + +Please see the [Setup Google App Engine][appengine-setup] for more details. + +## Servlet Dependencies + +The following are the jars from the [libs](libs) folder required for Servlet applications or a newer +compatible version: + +* google-oauth-client-servlet-${project.version}.jar +* commons-logging-${project.commons-logging.version}.jar +* httpclient-${project.httpclient.version}.jar +* httpcore-${project.httpcore.version}.jar +* jdo2-api-${project.jdo2-api.version}.jar +* transaction-api-${project.transaction-api.version}.jar + +## General Purpose Java 6 Environment Dependencies + +The following are the jars from the [libs](libs) folder required for general purpose Java 6 +applications or a newer compatible version: + +* google-oauth-client-java6-${project.version}.jar (for JDK >= 6) + * google-oauth-client-jetty-${project.version}.jar (for Jetty 6) + * jetty-${project.jetty.version}.jar + * jetty-util-${project.jetty.version}.jar +* commons-logging-${project.commons-logging.version}.jar +* httpclient-${project.httpclient.version}.jar +* httpcore-${project.httpcore.version}.jar + +[release-notes]: https://github.com/google/google-oauth-java-client/releases/tag/${project.version} +[javadoc]: https://google.github.io/google-oauth-java-client/releases/${project.version}/javadoc/index.html +[developers-guide]: https://developers.google.com/api-client-library/java/google-oauth-java-client/ +[support]: https://developers.google.com/api-client-library/java/google-oauth-java-client/support +[setup-maven]: https://developers.google.com/api-client-library/java/google-oauth-java-client/setup#maven +[proguard-setup]: https://developers.google.com/api-client-library/java/google-http-java-client/setup#proguard +[android-setup]: https://developers.google.com/api-client-library/java/google-http-java-client/setup#android +[appengine-setup]: https://developers.google.com/api-client-library/java/google-oauth-java-client/setup#google_app_engine diff --git a/google-oauth-client-assembly/assembly.xml b/google-oauth-client-assembly/assembly.xml index 1e4f2c469..fc65f0e7b 100644 --- a/google-oauth-client-assembly/assembly.xml +++ b/google-oauth-client-assembly/assembly.xml @@ -21,7 +21,7 @@ google-oauth-java-client - readme.html + README.md true google-oauth-java-client diff --git a/google-oauth-client-assembly/readme.html b/google-oauth-client-assembly/readme.html deleted file mode 100644 index d3246d480..000000000 --- a/google-oauth-client-assembly/readme.html +++ /dev/null @@ -1,188 +0,0 @@ - -${project.name} ${project.version} - -

${project.name} ${project.version}

- -

Overview

-

- High-level details about this library can be found at http://code.google.com/p/google-oauth-java-client -

- - -

Dependencies and Licenses

- The license can be found - here. -
Dependent jars can be found in the - libs folder and the corresponding source jars can be found - in the - libs-sources folder. -
-
The dependency structure and licenses for the different libraries can - be found here: - - -

Maven Usage

- For information on how to add these libraries to your Maven project please see - http://code.google.com/p/google-oauth-java-client/wiki/Setup#Maven. - -

Eclipse

- A .classpath file snippet that can be included in your project's .classpath - has been provided - here. Please only use the classpathentry's you - actually need (see below for details). - -

ProGuard

-

- A ProGuard configuration file proguard-google-oauth-client.txt - is included for common settings for using the library. On Android projects, - you may want to add a reference to - proguard-google-oauth-client.txt - in the - project.properties - file under the - proguard.config - property. -

-

- Please read Setup - ProGuard for more details. -

- -

Dependencies for all Platforms

- The following are the jars from the - libs folder needed for applications on all platform: - - -

Android Dependencies

- The following are the jars from the - libs folder required for Android applications: - - The - libs folder also contains properties files that specify the - location of source jars for Android projects in Eclipse. -
Please see the - Android - wiki for the Android Developer's Guide. - -

Google App Engine Dependencies

- The following are the jars from the - libs folder required for Google App Engine applications or - a newer compatible version: - - Please see the - GoogleAppEngine - wiki for the Google App Engine Developer's Guide. - -

Servlet Dependencies

- The following are the jars from the - libs folder required for Servlet applications or a newer - compatible version: - - -

General Purpose Java 5 Environment Dependencies

- The following are the jars from the - libs folder required for general purpose Java 5 - applications or a newer compatible version: - - - - diff --git a/samples/dailymotion-cmdline-sample/README.md b/samples/dailymotion-cmdline-sample/README.md new file mode 100644 index 000000000..82b4063bb --- /dev/null +++ b/samples/dailymotion-cmdline-sample/README.md @@ -0,0 +1,67 @@ +# Instructions for the Daily Motion OAuth2 Command-Line Sample + +## Browse Online + +[Browse Source][browse-source], or main file [DailyMotionSample.java][main-source]. + +## Command-Line Instructions + +**Prerequisites:** install [Java 6 or higher][install-java], [git][install-git], and +[Maven][install-maven]. You may need to set your `JAVA_HOME`. + +1. Check out the sample code: + + ```bash + git clone https://github.com/google/google-oauth-java-client.git + cd google-oauth-java-client/samples/dailymotion/cmdline-sample + ``` + +2. Edit the `OAuth2ClientCredentials.java` file with your credentials. To acquire credentials, go + to the [Dailymotion Developer Profile][dailymotion-developer-profile], click "Create New API Key" + and specify "http://127.0.0.1:8080/Callback" as the "Callback URL". + +3. Run the sample: + + ```bash + mvn compile + mvn -q exec: java + ``` + +## Setup Project in Eclipse 3.5/3.6 + +**Prerequisites:** install [Eclipse][install-eclipse], the [git plugin][install-git-plugin], and +[Maven plugin][install-maven-plugin]. You may need to set your `JAVA_HOME`. + +1. Setup Eclipse Preferences + * Window > Preferences... (or on Mac, Eclipse > Preferences...) + * Select Maven + * check on "Download Artifact Sources" + * check on "Download Artifact JavaDoc" +2. Import `dailymotion-cmdline-sample` project + * File > Import... + * Select "General > Existing Project into Workspace" and click "Next" + * Click "Browse" next to "Select root directory", find + *someDirectory*/google-oauth-java-client-samples/dailymotion-cmdline-sample and click "Next" + * Click "Finish" +3. Edit the `OAuth2ClientCredentials.java` file with your credentials. To acquire credentials, go + to the [Dailymotion Developer Profile][dailymotion-developer-profile], click "Create New API Key" + and specify "http://127.0.0.1:8080/Callback" as the "Callback URL". +4. Run + * Right-click on project dailymotion-cmdline-sample + * Run As > Java Application + * If asked, type "DailyMotionSample" and click OK + * To enabled logging: + * Run > Run Configurations... + * Click on "Java Application > DailyMotionSample" + * VM arguments: `-Djava.util.logging.config.file=${project_loc}/logging.properties` + * Click "Run" + +[browse-source]: https://github.com/google/google-oauth-java-client/tree/dev/samples/dailymotion-cmdline-sample +[main-source]: https://github.com/google/google-oauth-java-client/blob/dev/samples/dailymotion-cmdline-sample/src/main/java/com/google/api/services/samples/dailymotion/cmdline/DailyMotionSample.java +[install-java]: https://java.com/ +[install-git]: https://git-scm.com +[install-maven]: https://maven.apache.org +[dailymotion-developer-profile]: https://www.dailymotion.com/profile/developer +[install-eclipse]: https://www.eclipse.org/downloads/ +[install-git-plugin]: https://eclipse.org/egit/ +[install-maven-plugin]: https://eclipse.org/m2e/