Skip to content

Commit 192e52b

Browse files
andreidiaconujasiekluch
authored andcommitted
[CRA-10] - Added partner_application to creations and galleries
1 parent 7656cf2 commit 192e52b

6 files changed

Lines changed: 24 additions & 7 deletions

File tree

api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'groovyx.android'
55

66
android {
77
compileSdkVersion 24
8-
buildToolsVersion "24.0.3"
8+
buildToolsVersion '25.0.2'
99

1010
defaultConfig {
1111
minSdkVersion 14

api/src/main/java/com/creatubbles/api/model/creation/Creation.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.support.annotation.NonNull;
44
import android.support.annotation.Nullable;
55

6+
import com.creatubbles.api.model.partner_application.PartnerApplication;
67
import com.creatubbles.api.model.user.User;
78
import com.fasterxml.jackson.annotation.JsonCreator;
89
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -27,6 +28,9 @@ public class Creation {
2728
@Relationship("creators")
2829
private List<User> creators = Collections.emptyList();
2930

31+
@Relationship("partner_application")
32+
private PartnerApplication partnerApplication;
33+
3034
@JsonProperty("name")
3135
private String name;
3236

@@ -250,12 +254,17 @@ public String getVideo720Url() {
250254
return video720Url;
251255
}
252256

257+
public PartnerApplication getPartnerApplication() {
258+
return partnerApplication;
259+
}
260+
253261
@Override
254262
public String toString() {
255263
return "Creation{" +
256264
"id='" + id + '\'' +
257265
", user=" + user +
258266
", creators=" + creators +
267+
", partnerApplication=" + partnerApplication +
259268
", name='" + name + '\'' +
260269
", createdAt=" + createdAt +
261270
", updatedAt=" + updatedAt +

api/src/main/java/com/creatubbles/api/model/gallery/Gallery.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.support.annotation.NonNull;
44
import android.support.annotation.Nullable;
55

6+
import com.creatubbles.api.model.partner_application.PartnerApplication;
67
import com.creatubbles.api.model.user.User;
78
import com.fasterxml.jackson.annotation.JsonCreator;
89
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -59,6 +60,9 @@ public class Gallery {
5960
@Relationship("owner")
6061
private User owner;
6162

63+
@Relationship("partner_application")
64+
private PartnerApplication partnerApplication;
65+
6266
public Gallery(String galleryId) {
6367
this.id = galleryId;
6468
}
@@ -158,8 +162,11 @@ public User getOwner() {
158162
return owner;
159163
}
160164

161-
@Override
162-
public String toString() {
165+
public PartnerApplication getPartnerApplication() {
166+
return partnerApplication;
167+
}
168+
169+
@Override public String toString() {
163170
return "Gallery{" +
164171
"id='" + id + '\'' +
165172
", name='" + name + '\'' +
@@ -176,6 +183,7 @@ public String toString() {
176183
", banner=" + banner +
177184
", previewImageUrls=" + previewImageUrls +
178185
", owner=" + owner +
186+
", partnerApplication=" + partnerApplication +
179187
'}';
180188
}
181189
}

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'me.tatarka.retrolambda'
44

55
android {
66
compileSdkVersion 24
7-
buildToolsVersion "24.0.3"
7+
buildToolsVersion '25.0.2'
88

99
defaultConfig {
1010
applicationId "com.creatubbles.app"

app/src/main/java/com/creatubbles/app/view/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ public void onSearchGalleriesClicked(View view) {
695695
GalleryRepository galleryRepository = new GalleryRepositoryBuilder(accessToken)
696696
.build();
697697

698-
galleryRepository.searchPublic("test", null, null, new ResponseCallback<CreatubblesResponse<List<Gallery>>>() {
698+
galleryRepository.searchPublic("minecraft", null, null, new ResponseCallback<CreatubblesResponse<List<Gallery>>>() {
699699
@Override
700700
public void onSuccess(CreatubblesResponse<List<Gallery>> response) {
701701
Toast.makeText(MainActivity.this, "Galleries total count: " + response.getMeta().getTotalCount(),
@@ -1593,7 +1593,7 @@ public void onGetContentClicked(View v) {
15931593
ContentRepository repository = new ContentRepositoryBuilder(accessToken)
15941594
.build();
15951595

1596-
repository.search("HazarSOYDAN", null, getContentCallback());
1596+
repository.search("minecraft", null, getContentCallback());
15971597
}
15981598

15991599
public void onGetRecentContentClicked(View v) {

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.2'
8+
classpath 'com.android.tools.build:gradle:2.2.3'
99
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
1010
classpath 'me.tatarka:gradle-retrolambda:3.3.0'
1111
classpath 'org.codehaus.groovy:groovy-android-gradle-plugin:1.1.0'

0 commit comments

Comments
 (0)