bpbp92 / yahoo-finance-managed

Automatically exported from code.google.com/p/yahoo-finance-managed
0 stars 0 forks source link

Response<AlphabeticIDIndexResult> resp1 = dl1.Download(); returns zero results #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I run:

using MaasOne.Base;
using MaasOne.Finance.YahooFinance;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Elance___Yahoo_Finance_Symbols
{
    class Program
    {
        static void Main(string[] args)
        {
            AlphabeticIDIndexDownload dl1 = new AlphabeticIDIndexDownload();
            dl1.Settings.TopIndex = null;
            Response<AlphabeticIDIndexResult> resp1 = dl1.Download();

            Console.Write("Id|Isin|Name|Exchange|Type|Industry");

            foreach (var alphabeticalIndex in resp1.Result.Items)
            {
                AlphabeticalTopIndex topIndex = (AlphabeticalTopIndex)alphabeticalIndex;
                dl1.Settings.TopIndex = topIndex;
                Response<AlphabeticIDIndexResult> resp2 = dl1.Download();

                foreach (var index in resp2.Result.Items)
                {
                    IDSearchDownload dl2 = new IDSearchDownload();
                    Response<IDSearchResult> resp3 = dl2.Download(index);

                    int i = 0;
                    foreach (var item in resp3.Result.Items)
                    {
                        Console.Write(item.ID + "|" + item.ISIN + "|" + item.Name + "|" + item.Exchange + "|" + item.Type + "|" + item.Industry);
                    }

                }
            }

        }
    }
}

The Response<AlphabeticIDIndexResult> resp1 = dl1.Download(); line returns zero 
results and therefore I cannot get the list of symbols.

Original issue reported on code.google.com by trevorjd...@gmail.com on 2 Jan 2014 at 12:22