Changeset 621 for AE/installer2/src/net/oni2/aeinstaller/backend/network
- Timestamp:
- Jan 15, 2013, 9:02:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/network/DrupalJSONQuery.java
r605 r621 9 9 import java.util.List; 10 10 11 import net.oni2.aeinstaller.backend. Settings;11 import net.oni2.aeinstaller.backend.depot.DepotConfig; 12 12 13 13 import org.apache.http.HttpEntity; … … 29 29 */ 30 30 public class DrupalJSONQuery { 31 32 private static String getDepotUrl() {33 return Settings.getInstance().get("depot_api_url",34 "http://mods.oni2.net/?q=api/");35 }36 31 37 32 /** … … 56 51 } 57 52 HttpEntity data = new UrlEncodedFormEntity(nvps); 58 return executeQuery( getDepotUrl() + resource + "/" + action53 return executeQuery(DepotConfig.getDepotApiUrl() + resource + "/" + action 59 54 + ".json", data); 60 55 } catch (UnsupportedEncodingException e) { … … 80 75 String refName) throws Exception { 81 76 return executeQuery( 82 getDepotUrl() + resource + "/" + Integer.toString(index) + "/"77 DepotConfig.getDepotApiUrl() + resource + "/" + Integer.toString(index) + "/" 83 78 + refName + ".json", null); 84 79 } … … 100 95 String parameters) throws Exception { 101 96 return executeQuery( 102 getDepotUrl() + resource + "/" + Integer.toString(index)97 DepotConfig.getDepotApiUrl() + resource + "/" + Integer.toString(index) 103 98 + ".json" + parameters, null); 104 99 } … … 126 121 if (pagesize >= 0) 127 122 pagesizeN = "&pagesize=" + Integer.toString(pagesize); 128 return executeQuery( getDepotUrl() + resource + ".json" + pageN123 return executeQuery(DepotConfig.getDepotApiUrl() + resource + ".json" + pageN 129 124 + pagesizeN, null); 130 125 }
Note:
See TracChangeset
for help on using the changeset viewer.