public override List <int> Execute()
        {
            List <int> startupIds = new List <int>();

            int page     = 0;
            int lastPage = int.MaxValue;

            do
            {
                UserRoles response = AngelListClient.UserRoles(Id, page);

                if (response.StartupRoles == null)
                {
                    response.StartupRoles = new StartupRole[0];
                }

                foreach (var startup in response.StartupRoles)
                {
                    startupIds.Add(startup.Startup.Id);
                }

                page     = response.Page;
                lastPage = response.LastPage;
            }while (page++ < lastPage);

            return(startupIds);
        }
Example #2
0
        public override Object Execute()
        {
            List <UserStartupRoles> userStartUpRoles = new List <UserStartupRoles>();
            int page     = 0;
            int lastPage = int.MaxValue;

            do
            {
                UserRoles response = AngelListClient.UserRoles(Id, page);

                if (response.StartupRoles == null)
                {
                    response.StartupRoles = new StartupRole[0];
                }

                userStartUpRoles.Add(new UserStartupRoles(Id, response.StartupRoles.ToList()));

                page     = response.Page;
                lastPage = response.LastPage;
            }while (page++ < lastPage);

            return(userStartUpRoles);
        }