![JAR search and dependency download from the Maven repository](/logo.png)
io.prismic.Main Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-kit Show documentation
Show all versions of java-kit Show documentation
The developer kit to access Prismic.io repositories using the Java language.
The newest version!
package io.prismic;
import java.util.List;
public class Main {
public static void main(String[] args) {
System.out.println("GO!");
Api api = Api.get("https://lesbonneschoses.prismic.io/api");
Ref ref = api.getMaster();
Form.SearchForm products = api.getForm("products");
products.ref(ref).query("[[:d = at(document.tags, [\"Macaron\"])]]");
System.out.println(products);
List documents = products.submit().getResults();
for(Document doc: documents) {
System.out.println(doc + " -> ");
System.out.println(doc.asHtml(new SimpleLinkResolver() {
public String resolve(Fragment.DocumentLink link) {
return "kiki";
}
}));
/*for(Map.Entry e: doc.getFragments().entrySet()) {
System.out.println(e.getKey() + " -> " + e.getValue());
}*/
}
System.out.println("DONE.");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy