Issue searching audience segments with name starting from the search term
@christopherseeley ci sta già lavorando.
Dal 14/4/2021.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hi All,
I'm trying to request all audience segments which start from "PA - " but the API looks like returns audience segments with the search term not only at the beginning of the name, but also in any part of the name.
This is how my code looks like:
@Override
public List<AudienceSegment> findAllPAs() {
StatementBuilder statementBuilder =
new StatementBuilder()
.where("name LIKE 'PA - %' and type = 'FIRST_PARTY'")
.orderBy("id ASC");
return findAllAudienceSegmentsByStatement(statementBuilder, StatementBuilder.SUGGESTED_PAGE_LIMIT);
}
private List<AudienceSegment> findAllAudienceSegmentsByStatement(StatementBuilder statement, int limit) {
statement.limit(limit);
List<AudienceSegment> segments = new ArrayList<>();
int totalResultSetSize = 0;
do {
AudienceSegmentPage page;
try {
page = audienceSegmentService.getAudienceSegmentsByStatement(statement.toStatement());
} catch (RemoteException re) {
throw new RuntimeException(re);
}
if (page.getResults() != null) {
totalResultSetSize = page.getTotalResultSetSize();
segments.addAll(Arrays.asList(page.getResults()));
}
statement.increaseOffsetBy(limit);
} while (statement.getOffset() < totalResultSetSize);
return segments;
}
Thanks,
Andrei
- Lingua principale
- Java
- Stelle
- 234
- Fork
- 360
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di googleads/googleads-java-lib
-
googleads/googleads-java-lib#284 · 3 commenti · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
googleads/googleads-java-lib#283 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
googleads/googleads-java-lib#273 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
googleads/googleads-java-lib#269 ·
-
enhancement P2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
googleads/googleads-java-lib#268 · 2 commenti · 2 reazioni ·
Tutte le issue di googleads/googleads-java-lib
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cryptomator/hub#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·