Skip to content

Instantly share code, notes, and snippets.

@AlicanAkkus
Last active June 20, 2016 07:00
Show Gist options
  • Save AlicanAkkus/0e2291edc88839fc46ae405638f9f458 to your computer and use it in GitHub Desktop.
Save AlicanAkkus/0e2291edc88839fc46ae405638f9f458 to your computer and use it in GitHub Desktop.
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
@Path("/verda")
public class VerdaRestService implements IVerdaService {
/*
* (non-Javadoc)
*
* @see com.j32bit.tbp.guardian.rest.IVerdaService#getFiles()
*/
@Override
@Path("/files")
@GET
@Produces("application/json")
public Response getFiles(@Context HttpHeaders headers) throws Exception {
java.net.URI location = new java.net.URI("https://verda.borsaistanbul.com/files");
return Response.temporaryRedirect(location).build();
// String resp = "[{'id':283,'name-tr':'BIST-KYD Endeks Bileşen Ağırlıkları (1 Temmuz 2015 öncesi günlere ait tüm endekslere ilişkin ağırlık verisini içerir.)','name-en':'BIST-KYD Index Constituent Weights (It includes the constituent weights data of all indices prior to 1 July 2015.)','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'01-07-2015 13:57:09','lastGeneratedFilename':'index_weight_historical.csv','links':[{'description':'Download Latest file','href':'files/download?type=283'},{'description':'Download with Date/Session Criteria','href':'files/download?type=283&year=2016&month=6&day=17'}]},{'id':441,'name-tr':'Menkul Kıymet Veri Dosyası','name-en':'Securities Data File','frequency':'Daily','expectedGenerationTime':null,'json':false,'lastGenerated':'16-06-2016 17:53:43','lastGeneratedFilename':'mkdegerleme.zip','links':[{'description':'Download Latest file','href':'files/download?type=441'},{'description':'Download with Date/Session Criteria','href':'files/download?type=441&year=2016&month=6&day=17'}]},{'id':481,'name-tr':'BIST-KYD Fon Endeksleri (TSPB tarafından ilan edilen yatırım fonları sınıflandırma şeması ve rehberine göre yapılan sınıflama kullanılarak oluşturulan endekslerdir.)','name-en':'BIST-KYD Fund Indices (These indices are constructed based on the fund classification scheme and guide announced by Turkish Capital Markets Association.)','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:30','lastGeneratedFilename':'new_fund_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=481'},{'description':'Download with Date/Session Criteria','href':'files/download?type=481&year=2016&month=6&day=17'}]},{'id':196,'name-tr':'BIST-KYD ÖSBA Endeksleri','name-en':'BIST-KYD Corporate Bond Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:26','lastGeneratedFilename':'corporate_bonds_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=196'},{'description':'Download with Date/Session Criteria','href':'files/download?type=196&year=2016&month=6&day=17'}]},{'id':200,'name-tr':'BIST-KYD Fon Endeksleri','name-en':'BIST-KYD Fund Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:29','lastGeneratedFilename':'fund_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=200'},{'description':'Download with Date/Session Criteria','href':'files/download?type=200&year=2016&month=6&day=17'}]},{'id':205,'name-tr':'BIST-KYD 1 Aylık Kar Payı Endeksleri','name-en':'BIST-KYD 1 Month Profit Share Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:28','lastGeneratedFilename':'profit_share_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=205'},{'description':'Download with Date/Session Criteria','href':'files/download?type=205&year=2016&month=6&day=17'}]},{'id':199,'name-tr':'BIST-KYD Eurobond Endeksleri','name-en':'BIST-KYD Eurobond Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:27','lastGeneratedFilename':'eurobonds_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=199'},{'description':'Download with Date/Session Criteria','href':'files/download?type=199&year=2016&month=6&day=17'}]},{'id':204,'name-tr':'BIST-KYD Kira Sertifikaları Endeksleri','name-en':'BIST-KYD Lease Certificates Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:29','lastGeneratedFilename':'lease_certificates_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=204'},{'description':'Download with Date/Session Criteria','href':'files/download?type=204&year=2016&month=6&day=17'}]},{'id':201,'name-tr':'BIST-KYD DİBS Endeksleri','name-en':'BIST-KYD GDS Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:25','lastGeneratedFilename':'gds_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=201'},{'description':'Download with Date/Session Criteria','href':'files/download?type=201&year=2016&month=6&day=17'}]},{'id':203,'name-tr':'BIST-KYD Endeks Bileşen Ağırlıkları','name-en':'BIST-KYD Index Constituent Weights','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':true,'lastGenerated':'16-06-2016 17:12:31','lastGeneratedFilename':'index_weight.d.20160616.csv','links':[{'description':'Download Latest file','href':'files/download?type=203','json-content-href':'files/download?type=203&media=json'},{'description':'Download with Date/Session Criteria','href':'files/download?type=203&year=2016&month=6&day=17','json-content-href':'files/download?type=203&year=2016&month=6&day=17&media=json'}]},{'id':198,'name-tr':'BIST-KYD 1 Aylık Mevduat Endeksleri','name-en':'BIST-KYD 1 Month Deposit Rates Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:28','lastGeneratedFilename':'deposit_rates_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=198'},{'description':'Download with Date/Session Criteria','href':'files/download?type=198&year=2016&month=6&day=17'}]},{'id':202,'name-tr':'BIST-KYD Altın Endeksleri','name-en':'BIST-KYD Gold Indices','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:26','lastGeneratedFilename':'gold_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=202'},{'description':'Download with Date/Session Criteria','href':'files/download?type=202&year=2016&month=6&day=17'}]},{'id':206,'name-tr':'BIST-KYD Repo Endeksleri','name-en':'BIST-KYD Repo Indices ','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:27','lastGeneratedFilename':'repo_indices.csv','links':[{'description':'Download Latest file','href':'files/download?type=206'},{'description':'Download with Date/Session Criteria','href':'files/download?type=206&year=2016&month=6&day=17'}]},{'id':207,'name-tr':'BIST-KYD Endeks Değerleri (Fon Endeksleri 1 iş günü gecikmeli hesaplandığı için bu dosyada yer almamaktadır.)','name-en':'BIST-KYD Indices Values','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':true,'lastGenerated':'16-06-2016 17:12:30','lastGeneratedFilename':'indices.d.20160616.csv','links':[{'description':'Download Latest file','href':'files/download?type=207','json-content-href':'files/download?type=207&media=json'},{'description':'Download with Date/Session Criteria','href':'files/download?type=207&year=2016&month=6&day=17','json-content-href':'files/download?type=207&year=2016&month=6&day=17&media=json'}]},{'id':197,'name-tr':'BIST-KYD TÜFE Endeksi','name-en':'BIST-KYD CPI Index (Historical Index Values)','frequency':'Daily','expectedGenerationTime':'17:15:00 +0300','json':false,'lastGenerated':'16-06-2016 17:12:30','lastGeneratedFilename':'cpi_index.csv','links':[{'description':'Download Latest file','href':'files/download?type=197'},{'description':'Download with Date/Session Criteria','href':'files/download?type=197&year=2016&month=6&day=17'}]}]";
//
// return Response.ok(resp).build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment