/** * The main body of the code. */ private void run() { ClassicQuandlSession session = ClassicQuandlSession.create(); SearchResult searchResult = session.search(SearchRequest.Builder.ofQuery("Apple").withMaxPerPage(2).build()); System.out.println(searchResult.toPrettyPrintedString()); }
/** * The main body of the code. */ private void run() { QuandlSession session = QuandlSession.create(); SearchResult searchResult = session.search(new SearchRequest.Builder().withQuery("Apple").withMaxPerPage(2).build()); System.out.println(searchResult.toPrettyPrintedString()); }
/** * The main body of the code. */ private void run() { ClassicQuandlSession quandl = ClassicQuandlSession.create(); SearchResult searchResult = quandl.search(SearchRequest.Builder.ofQuery("Apple").withMaxPerPage(2).build()); System.out.println(searchResult.toPrettyPrintedString()); for (MetaDataResult metaData : searchResult.getMetaDataResultList()) { System.out.println(PrettyPrinter.toPrettyPrintedString(metaData.getRawJSON())); } TabularResult tabularResult = null; tabularResult = quandl.getDataSet(DataSetRequest.Builder.of("WIKI/AAPL").withFrequency(Frequency.QUARTERLY) .withColumn(CLOSE_COLUMN).withTransform(Transform.NORMALIZE).build()); System.out.println(PrettyPrinter.toPrettyPrintedString(tabularResult)); MetaDataResult metaData = quandl.getMetaData(MetaDataRequest.of("WIKI/AAPL")); System.out.println(PrettyPrinter.toPrettyPrintedString(metaData.getRawJSON())); }
/** * The main body of the code. */ private void run() { QuandlSession quandl = QuandlSession.create(); SearchResult searchResult = quandl.search(SearchRequest.Builder.ofQuery("Apple").withMaxPerPage(2).build()); System.out.println(searchResult.toPrettyPrintedString()); for (MetaDataResult metaData : searchResult.getMetaDataResultList()) { System.out.println(PrettyPrinter.toPrettyPrintedString(metaData.getRawJSON())); } TabularResult tabularResult = null; tabularResult = quandl.getDataSet(DataSetRequest.Builder.of("WIKI/AAPL").withFrequency(Frequency.QUARTERLY) .withColumn(CLOSE_COLUMN).withTransform(Transform.NORMALIZE).build()); System.out.println(PrettyPrinter.toPrettyPrintedString(tabularResult)); TabularResult tabularResultMulti = quandl.getDataSets( MultiDataSetRequest.Builder.of( QuandlCodeRequest.allColumns("WIKI/AAPL"), QuandlCodeRequest.allColumns("DOE/RWTC") ).withStartDate(RECENTISH_DATE) .build()); System.out.println(PrettyPrinter.toPrettyPrintedString(tabularResultMulti)); MetaDataResult metaData = quandl.getMetaData(MetaDataRequest.of("WIKI/AAPL")); System.out.println(PrettyPrinter.toPrettyPrintedString(metaData.getRawJSON())); MetaDataResult metaData2 = quandl.getMetaData(MultiMetaDataRequest.of("WIKI/AAPL", "DOE/RWTC", "WIKI/MSFT")); System.out.println(PrettyPrinter.toPrettyPrintedString(metaData2.getRawJSON())); }