Skip to content

Commit 0408059

Browse files
committed
add support for is_getty, is_commons and in_gallery
1 parent 5836027 commit 0408059

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Flickr4Java/src/main/java/com/flickr4java/flickr/photos/SearchParameters.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ public class SearchParameters {
7070
private String radiusUnits;
7171

7272
private boolean hasGeo = false;
73+
74+
private boolean inGallery = false;
75+
76+
private boolean isCommons = false;
77+
78+
private boolean isGetty = false;
7379

7480
public static final ThreadLocal<SimpleDateFormat> DATE_FORMATS = new ThreadLocal<SimpleDateFormat>() {
7581
@Override
@@ -563,6 +569,21 @@ public Map<String, Object> getAsParameters() {
563569
parameters.put("has_geo", "true");
564570
}
565571

572+
boolean inGallery = getInGallery();
573+
if (inGallery) {
574+
parameters.put("in_gallery", "true");
575+
}
576+
577+
boolean isCommons = getIsCommons();
578+
if (isCommons) {
579+
parameters.put("is_commons", "true");
580+
}
581+
582+
boolean isGetty = getIsGetty();
583+
if (isGetty) {
584+
parameters.put("is_getty", "true");
585+
}
586+
566587
if (extras != null && !extras.isEmpty()) {
567588
parameters.put("extras", StringUtilities.join(extras, ","));
568589
}
@@ -639,4 +660,27 @@ public void setUserId(String userId) {
639660
this.userId = userId;
640661
}
641662

663+
public void setInGallery(boolean inGallery) {
664+
this.inGallery = inGallery;
665+
}
666+
667+
public boolean getInGallery() {
668+
return inGallery;
669+
}
670+
671+
public void setIsCommons(boolean isCommons) {
672+
this.isCommons = isCommons;
673+
}
674+
675+
public boolean getIsCommons() {
676+
return isCommons;
677+
}
678+
679+
public void setIsGetty(boolean isGetty) {
680+
this.isGetty = isGetty;
681+
}
682+
683+
public boolean getIsGetty() {
684+
return isGetty;
685+
}
642686
}

0 commit comments

Comments
 (0)