├── settings.gradle ├── library ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── pluscubed │ │ │ │ └── picasaclient │ │ │ │ ├── model │ │ │ │ ├── Media$keywords.java │ │ │ │ ├── SingleIntegerElement.java │ │ │ │ ├── Gphoto$shapes.java │ │ │ │ ├── SingleStringElement.java │ │ │ │ ├── Georss$where.java │ │ │ │ ├── GmlPoint.java │ │ │ │ ├── Content.java │ │ │ │ ├── Media$title.java │ │ │ │ ├── Media$description.java │ │ │ │ ├── Category.java │ │ │ │ ├── Author.java │ │ │ │ ├── Link.java │ │ │ │ ├── Generator.java │ │ │ │ ├── Media$thumbnail.java │ │ │ │ ├── MediaContent.java │ │ │ │ ├── UserFeedResponse.java │ │ │ │ ├── AlbumFeedResponse.java │ │ │ │ ├── Gphoto$license.java │ │ │ │ ├── MediaGroup.java │ │ │ │ ├── ExifTags.java │ │ │ │ ├── AlbumEntry.java │ │ │ │ ├── UserFeed.java │ │ │ │ ├── PhotoEntry.java │ │ │ │ └── AlbumFeed.java │ │ │ │ ├── PicasaService.java │ │ │ │ ├── GphotosClient.java │ │ │ │ └── PicasaClient.java │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── com │ │ └── pluscubed │ │ └── picasaclient │ │ └── ExampleUnitTest.java ├── proguard-rules.pro └── build.gradle ├── sample ├── src │ └── main │ │ ├── res │ │ ├── menu │ │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── layout │ │ │ ├── list_item_entry.xml │ │ │ └── activity_main.xml │ │ ├── java │ │ └── com │ │ │ └── pluscubed │ │ │ └── picasaclientsample │ │ │ ├── SquareFrameLayout.java │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitattributes ├── gradle.properties ├── gradlew.bat ├── .gitignore ├── README.md ├── gradlew └── LICENSE.txt /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':library' 2 | -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pluscubed/android-picasa-client/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Media$keywords.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | public class Media$keywords { 4 | 5 | 6 | } 7 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Dec 20 21:20:58 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip 7 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PicasaClient Sample 3 | Google Photos 4 | Google+ 5 | Choose Account 6 | Account: %s 7 | 8 | -------------------------------------------------------------------------------- /library/src/test/java/com/pluscubed/picasaclient/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/SingleIntegerElement.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class SingleIntegerElement { 7 | 8 | @SerializedName("$t") 9 | @Expose 10 | private int body; 11 | 12 | 13 | public int getBody() { 14 | return body; 15 | } 16 | 17 | 18 | public void setBody(int $t) { 19 | this.body = $t; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Gphoto$shapes.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Gphoto$shapes { 9 | 10 | @SerializedName("faces") 11 | @Expose 12 | private String faces; 13 | 14 | 15 | public String getFaces() { 16 | return faces; 17 | } 18 | 19 | 20 | public void setFaces(String faces) { 21 | this.faces = faces; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/SingleStringElement.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class SingleStringElement { 9 | 10 | @SerializedName("$t") 11 | @Expose 12 | private String body; 13 | 14 | 15 | public String getBody() { 16 | return body; 17 | } 18 | 19 | 20 | public void setBody(String $t) { 21 | this.body = $t; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Georss$where.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Georss$where { 9 | 10 | @SerializedName("gml$Point") 11 | @Expose 12 | private GmlPoint gmlPoint; 13 | 14 | 15 | public GmlPoint getGmlPoint() { 16 | return gmlPoint; 17 | } 18 | 19 | 20 | public void setGmlPoint(GmlPoint gmlPoint) { 21 | this.gmlPoint = gmlPoint; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/GmlPoint.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class GmlPoint { 9 | 10 | @SerializedName("gml$pos") 11 | @Expose 12 | private SingleStringElement gmlPos; 13 | 14 | 15 | public SingleStringElement getGmlPos() { 16 | return gmlPos; 17 | } 18 | 19 | 20 | public void setGmlPos(SingleStringElement gmlPos) { 21 | this.gmlPos = gmlPos; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/PicasaService.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient; 2 | 3 | 4 | import com.pluscubed.picasaclient.model.AlbumFeedResponse; 5 | import com.pluscubed.picasaclient.model.UserFeedResponse; 6 | 7 | import retrofit2.http.GET; 8 | import retrofit2.http.Path; 9 | import rx.Observable; 10 | 11 | public interface PicasaService { 12 | 13 | @GET("default") 14 | Observable getUserFeedResponse(); 15 | 16 | @GET("default/albumid/{albumId}") 17 | Observable getAlbumFeedResponse(@Path("albumId") long albumId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\DC\Development\android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /sample/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\DC\Development\android-sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Content.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Content { 9 | 10 | @SerializedName("src") 11 | @Expose 12 | private String src; 13 | @SerializedName("type") 14 | @Expose 15 | private String type; 16 | 17 | 18 | public String getSrc() { 19 | return src; 20 | } 21 | 22 | 23 | public void setSrc(String src) { 24 | this.src = src; 25 | } 26 | 27 | 28 | public String getType() { 29 | return type; 30 | } 31 | 32 | 33 | public void setType(String type) { 34 | this.type = type; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Media$title.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Media$title { 9 | 10 | @SerializedName("$t") 11 | @Expose 12 | private String $t; 13 | @SerializedName("type") 14 | @Expose 15 | private String type; 16 | 17 | 18 | public String get$t() { 19 | return $t; 20 | } 21 | 22 | 23 | public void set$t(String $t) { 24 | this.$t = $t; 25 | } 26 | 27 | 28 | public String getType() { 29 | return type; 30 | } 31 | 32 | 33 | public void setType(String type) { 34 | this.type = type; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Media$description.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Media$description { 9 | 10 | @SerializedName("$t") 11 | @Expose 12 | private String $t; 13 | @SerializedName("type") 14 | @Expose 15 | private String type; 16 | 17 | 18 | public String get$t() { 19 | return $t; 20 | } 21 | 22 | 23 | public void set$t(String $t) { 24 | this.$t = $t; 25 | } 26 | 27 | 28 | public String getType() { 29 | return type; 30 | } 31 | 32 | 33 | public void setType(String type) { 34 | this.type = type; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Category.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Category { 9 | 10 | @SerializedName("term") 11 | @Expose 12 | private String term; 13 | @SerializedName("scheme") 14 | @Expose 15 | private String scheme; 16 | 17 | 18 | public String getTerm() { 19 | return term; 20 | } 21 | 22 | 23 | public void setTerm(String term) { 24 | this.term = term; 25 | } 26 | 27 | 28 | public String getScheme() { 29 | return scheme; 30 | } 31 | 32 | 33 | public void setScheme(String scheme) { 34 | this.scheme = scheme; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Author.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Author { 9 | 10 | @SerializedName("name") 11 | @Expose 12 | private SingleStringElement name; 13 | @SerializedName("uri") 14 | @Expose 15 | private SingleStringElement uri; 16 | 17 | 18 | public SingleStringElement getName() { 19 | return name; 20 | } 21 | 22 | 23 | public void setName(SingleStringElement name) { 24 | this.name = name; 25 | } 26 | 27 | 28 | public SingleStringElement getUri() { 29 | return uri; 30 | } 31 | 32 | 33 | public void setUri(SingleStringElement uri) { 34 | this.uri = uri; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /sample/src/main/java/com/pluscubed/picasaclientsample/SquareFrameLayout.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclientsample; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.FrameLayout; 6 | 7 | public class SquareFrameLayout extends FrameLayout { 8 | 9 | public SquareFrameLayout(Context context) { 10 | super(context); 11 | } 12 | 13 | public SquareFrameLayout(Context context, AttributeSet attrs) { 14 | super(context, attrs); 15 | } 16 | 17 | public SquareFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { 18 | super(context, attrs, defStyleAttr); 19 | } 20 | 21 | @Override 22 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 23 | super.onMeasure(widthMeasureSpec, widthMeasureSpec); 24 | setMeasuredDimension(widthMeasureSpec, widthMeasureSpec); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Link.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Link { 9 | 10 | @SerializedName("href") 11 | @Expose 12 | private String href; 13 | @SerializedName("type") 14 | @Expose 15 | private String type; 16 | @SerializedName("rel") 17 | @Expose 18 | private String rel; 19 | 20 | 21 | public String getHref() { 22 | return href; 23 | } 24 | 25 | 26 | public void setHref(String href) { 27 | this.href = href; 28 | } 29 | 30 | 31 | public String getType() { 32 | return type; 33 | } 34 | 35 | 36 | public void setType(String type) { 37 | this.type = type; 38 | } 39 | 40 | 41 | public String getRel() { 42 | return rel; 43 | } 44 | 45 | 46 | public void setRel(String rel) { 47 | this.rel = rel; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Generator.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Generator { 9 | 10 | @SerializedName("$t") 11 | @Expose 12 | private String $t; 13 | @SerializedName("version") 14 | @Expose 15 | private String version; 16 | @SerializedName("uri") 17 | @Expose 18 | private String uri; 19 | 20 | 21 | public String get$t() { 22 | return $t; 23 | } 24 | 25 | 26 | public void set$t(String $t) { 27 | this.$t = $t; 28 | } 29 | 30 | 31 | public String getVersion() { 32 | return version; 33 | } 34 | 35 | 36 | public void setVersion(String version) { 37 | this.version = version; 38 | } 39 | 40 | 41 | public String getUri() { 42 | return uri; 43 | } 44 | 45 | 46 | public void setUri(String uri) { 47 | this.uri = uri; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.pluscubed.picasaclientsample" 9 | minSdkVersion 16 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | repositories { 23 | maven { url "https://jitpack.io" } 24 | } 25 | 26 | 27 | dependencies { 28 | compile fileTree(include: ['*.jar'], dir: 'libs') 29 | testCompile 'junit:junit:4.12' 30 | compile 'com.android.support:appcompat-v7:23.3.0' 31 | compile 'com.android.support:recyclerview-v7:23.3.0' 32 | compile 'com.github.bumptech.glide:glide:3.7.0' 33 | compile 'com.github.afollestad.material-dialogs:core:0.8.5.7' 34 | 35 | compile project(':library') 36 | } 37 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Media$thumbnail.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Media$thumbnail { 9 | 10 | @SerializedName("url") 11 | @Expose 12 | private String url; 13 | @SerializedName("width") 14 | @Expose 15 | private Integer width; 16 | @SerializedName("height") 17 | @Expose 18 | private Integer height; 19 | 20 | 21 | public String getUrl() { 22 | return url; 23 | } 24 | 25 | 26 | public void setUrl(String url) { 27 | this.url = url; 28 | } 29 | 30 | 31 | public Integer getWidth() { 32 | return width; 33 | } 34 | 35 | 36 | public void setWidth(Integer width) { 37 | this.width = width; 38 | } 39 | 40 | 41 | public Integer getHeight() { 42 | return height; 43 | } 44 | 45 | 46 | public void setHeight(Integer height) { 47 | this.height = height; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/MediaContent.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class MediaContent { 9 | 10 | @SerializedName("url") 11 | @Expose 12 | private String url; 13 | @SerializedName("medium") 14 | @Expose 15 | private String medium; 16 | @SerializedName("type") 17 | @Expose 18 | private String type; 19 | 20 | 21 | /** 22 | * @return URL 23 | */ 24 | public String getUrl() { 25 | return url; 26 | } 27 | 28 | 29 | public void setUrl(String url) { 30 | this.url = url; 31 | } 32 | 33 | 34 | public String getMedium() { 35 | return medium; 36 | } 37 | 38 | 39 | public void setMedium(String medium) { 40 | this.medium = medium; 41 | } 42 | 43 | 44 | public String getType() { 45 | return type; 46 | } 47 | 48 | 49 | public void setType(String type) { 50 | this.type = type; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/UserFeedResponse.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class UserFeedResponse { 9 | 10 | @SerializedName("feed") 11 | @Expose 12 | private UserFeed feed; 13 | @SerializedName("version") 14 | @Expose 15 | private String version; 16 | @SerializedName("encoding") 17 | @Expose 18 | private String encoding; 19 | 20 | 21 | public UserFeed getFeed() { 22 | return feed; 23 | } 24 | 25 | 26 | public void setFeed(UserFeed feed) { 27 | this.feed = feed; 28 | } 29 | 30 | 31 | public String getVersion() { 32 | return version; 33 | } 34 | 35 | 36 | public void setVersion(String version) { 37 | this.version = version; 38 | } 39 | 40 | 41 | public String getEncoding() { 42 | return encoding; 43 | } 44 | 45 | 46 | public void setEncoding(String encoding) { 47 | this.encoding = encoding; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/AlbumFeedResponse.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class AlbumFeedResponse { 9 | 10 | @SerializedName("feed") 11 | @Expose 12 | private AlbumFeed feed; 13 | @SerializedName("version") 14 | @Expose 15 | private String version; 16 | @SerializedName("encoding") 17 | @Expose 18 | private String encoding; 19 | 20 | 21 | public AlbumFeed getFeed() { 22 | return feed; 23 | } 24 | 25 | 26 | public void setFeed(AlbumFeed feed) { 27 | this.feed = feed; 28 | } 29 | 30 | 31 | public String getVersion() { 32 | return version; 33 | } 34 | 35 | 36 | public void setVersion(String version) { 37 | this.version = version; 38 | } 39 | 40 | 41 | public String getEncoding() { 42 | return encoding; 43 | } 44 | 45 | 46 | public void setEncoding(String encoding) { 47 | this.encoding = encoding; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/GphotosClient.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient; 2 | 3 | import com.pluscubed.picasaclient.model.AlbumEntry; 4 | import com.pluscubed.picasaclient.model.AlbumFeed; 5 | import com.pluscubed.picasaclient.model.UserFeed; 6 | 7 | import rx.Single; 8 | import rx.functions.Func1; 9 | 10 | public class GphotosClient { 11 | 12 | public Single getGphotosAlbumFeed() { 13 | return PicasaClient.get().getUserFeed() 14 | .flatMap(new Func1>() { 15 | @Override 16 | public Single call(UserFeed userFeed) { 17 | long id = -1; 18 | for (AlbumEntry entry : userFeed.getAlbumEntries()) { 19 | if (entry.getGphotoAlbumType().equals(AlbumEntry.TYPE_GOOGLE_PHOTOS)) { 20 | id = entry.getGphotoId(); 21 | } 22 | } 23 | 24 | return PicasaClient.get().getAlbumFeed(id); 25 | } 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /library/src/main/java/com/pluscubed/picasaclient/model/Gphoto$license.java: -------------------------------------------------------------------------------- 1 | package com.pluscubed.picasaclient.model; 2 | 3 | 4 | import com.google.gson.annotations.Expose; 5 | import com.google.gson.annotations.SerializedName; 6 | 7 | 8 | public class Gphoto$license { 9 | 10 | @SerializedName("url") 11 | @Expose 12 | private String url; 13 | @SerializedName("$t") 14 | @Expose 15 | private String $t; 16 | @SerializedName("id") 17 | @Expose 18 | private Integer id; 19 | @SerializedName("name") 20 | @Expose 21 | private String name; 22 | 23 | 24 | public String getUrl() { 25 | return url; 26 | } 27 | 28 | 29 | public void setUrl(String url) { 30 | this.url = url; 31 | } 32 | 33 | 34 | public String get$t() { 35 | return $t; 36 | } 37 | 38 | 39 | public void set$t(String $t) { 40 | this.$t = $t; 41 | } 42 | 43 | 44 | public Integer getId() { 45 | return id; 46 | } 47 | 48 | 49 | public void setId(Integer id) { 50 | this.id = id; 51 | } 52 | 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | 58 | 59 | public void setName(String name) { 60 | this.name = name; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.github.dcendents.android-maven' 3 | 4 | group = 'com.pluscubed' 5 | 6 | android { 7 | compileSdkVersion 23 8 | buildToolsVersion "23.0.2" 9 | 10 | defaultConfig { 11 | minSdkVersion 16 12 | targetSdkVersion 23 13 | versionCode 1 14 | versionName "1.0" 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | compile 'com.android.support:appcompat-v7:23.3.0' 26 | 27 | compile 'com.squareup.okhttp3:okhttp:3.2.0' 28 | compile 'com.squareup.retrofit2:retrofit:2.0.1' 29 | compile 'com.squareup.retrofit2:adapter-rxjava:2.0.1' 30 | compile 'com.squareup.retrofit2:converter-gson:2.0.1' 31 | compile 'com.google.code.gson:gson:2.6.2' 32 | 33 | compile 'io.reactivex:rxandroid:1.1.0' 34 | compile 'io.reactivex:rxjava:1.1.2' 35 | 36 | compile 'com.google.android.gms:play-services-auth:8.4.0' 37 | 38 | compile fileTree(dir: 'libs', include: ['*.jar']) 39 | testCompile 'junit:junit:4.12' 40 | } 41 | 42 | // build a jar with source files 43 | task sourcesJar(type: Jar) { 44 | from android.sourceSets.main.java.srcDirs 45 | classifier = 'sources' 46 | } 47 | 48 | task javadoc(type: Javadoc) { 49 | failOnError false 50 | source = android.sourceSets.main.java.sourceFiles 51 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 52 | classpath += configurations.compile 53 | } 54 | 55 | // build a jar with javadoc 56 | task javadocJar(type: Jar, dependsOn: javadoc) { 57 | classifier = 'javadoc' 58 | from javadoc.getDestinationDir() 59 | } 60 | 61 | artifacts { 62 | archives sourcesJar 63 | archives javadocJar 64 | } -------------------------------------------------------------------------------- /sample/src/main/res/layout/list_item_entry.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 27 | 28 | 43 | 44 | 45 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 22 | 23 | 31 | 32 | 38 | 39 |