package org.sillyjirafe.uoapi; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.sillyjirafe.uoapi.binds.*; public class Out { List Apis = new ArrayList<>(); public List PreOut() { Apis.add(new GitHubMITApi()); Apis.add(new GitHubLGPLApi()); Apis.add(new GitHubApacheApi()); Apis.add(new OpenVerseImagesApi()); Apis.add(new OpenVerseAudiosApi()); Apis.add(new PixabayImagesApi()); List bindnames = new ArrayList<>(); for (Api api : Apis) { bindnames.add(api.getName()); } return bindnames; } public List out(Map bindpages, Map ApiKeys) throws Exception { List Elements = new ArrayList<>(); for (int i = 0; i < Apis.size(); i++) { List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName()), ApiKeys.get(Apis.get(i).getName())); for (int j = 0; j < currentapi.size(); j++) { Elements.add(currentapi.get(j)); } } return Elements; } }