get active Todo lists for all projects from Basecamp API

 @return [Array<Logan::TodoList>] array of {Logan::TodoList} instances
347064
def todolists
      response = self.class.get '/todolists.json'
      handle_response(response,
        Proc.new { |h|
          list = Logan::TodoList.new(h)

          # grab the project ID for this list from the url
          list.project_id = list.url.scan( /projects\/(\d+)/).last.first

          # return the list so this method returns an array of lists
          list
        }
      )
    end
186468
public LinkedList<Project> getProjects() {
	    if(projects != null) return projects;
	    try
	    {
	        projects = new LinkedList<Project>(getService().getAllProjects());
	        projectName = projectName == null ?  projects.iterator().next().getName() : projectName;
	        
	        return projects;
	    }
	    catch (GreenPepperServerException e)
	    {
	        addActionError(e.getId());
	    }
	    
	    return projects;
	}
183473
def get_task_list(userid = nil, since = nil, delegated = nil, task_types = nil, task_statuses = nil)
      magic_parameters = {
        action: 'GetTaskList',
        userid: userid,
        parameter1: since,
        parameter2: task_types,
        parameter3: task_statuses,
        parameter4: delegated
      }
      response = magic(magic_parameters)

      unless response.is_a?(Array)
        response = [ response ]
      end

      response
    end
1077011
def get_todos(self):
        
        if self.is_expression:
            self.get_todos_from_expr()
        else:
            if self.last_argument:
                numbers = self.args[:-1]
            else:
                numbers = self.args

            for number in numbers:
                try:
                    self.todos.append(self.todolist.todo(number))
                except InvalidTodoException:
                    self.invalid_numbers.append(number)
1079511
def list_projects(self, ignore_default_project_node=True):
        

        return [project_node.path for project_node in self.list_project_nodes(ignore_default_project_node) if
                project_node.path]
540247
def applet_list_projects(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/listProjects' % object_id, input_params, always_retry=always_retry, **kwargs)
382978
def projects(self):
        
        result = set()
        for todo in self._todos:
            projects = todo.projects()
            result = result.union(projects)

        return result
1294953
def projects(options={})
      response = connection.get do |req|
        req.url "/api/v1/projects", options
      end
      response.body
    end
5371
def get_listed_projects():
    
    index_path = Path().resolve() / "docs" / "index.md"
    with open(index_path, "r") as index_file:
        lines = index_file.readlines()

    listed_projects = set()
    project_section = False
    for _, l in enumerate(lines):
        idx = l.find(PROJECT_KEY)
        if idx >= 0:
            project_section = True
        if project_section:
            # Find first parenthesis after the key
            start = l.find("](")
            if start > 0:
                closing_parenthesis = sorted(
                    [m.start() for m in re.finditer(r"\)", l) if m.start() > start]
                )[0]
                project = l[start + 2 : closing_parenthesis]
                listed_projects.add(project)
        # If the Projects section is over, stop iteration.
        # It will stop before seeing ## but wainting for it
        # Allows the user to use single # in the projects' descriptions
        if len(listed_projects) > 0 and l.startswith("#"):
            return listed_projects
    return listed_projects
1101180
function (tree) {
    var todo = tree.slice();
    var done = [];
    var current;
    while (todo.length) {
      current = todo.pop();
      if (current.nodes) {
        todo = todo.concat(current.nodes);
      } else if (current.leaf) {
        done.push(current);
      }
    }
    return done;
  }
542391
def parents(self, p_todo, p_only_direct=False):
        
        parents = self._depgraph.incoming_neighbors(
            hash(p_todo), not p_only_direct)
        return [self._tododict[parent] for parent in parents]
236007
def list_projects(self):
        
        url = self._build_url(constants.LIST_PROJECTS_ENDPOINT)
        json = self.client.get(url, timeout=self.timeout)
        return json['projects']
337664
def list_projects(self):
        """"""
        method = 'GET'
        url = '/projects?circle-token={token}'.format(
            token=self.client.api_token)
        json_data = self.client.request(method, url)
        return json_data
586734
public List<GitlabProject> getAllProjects() {
        String tailUrl = GitlabProject.URL;
        return retrieve().getAll(tailUrl, GitlabProject[].class);
    }
16740
def list_bare_tasks
      load_tasks

      Thor::Base.subclasses.each do |klass|
        unless klass == Thor
          klass.tasks.each do |t|
            puts "#{klass.namespace}:#{t[0]}"
          end
        end
      end
    end
1069242
public List<GitlabProject> getProjects() {
        String tailUrl = GitlabProject.URL + PARAM_MAX_ITEMS_PER_PAGE;
        return retrieve().getAll(tailUrl, GitlabProject[].class);
    }
863232
def method_list(cls)
      list = cls.method_list
      unless @options.show_all
        list = list.find_all do |m|
          m.visibility == :public || m.visibility == :protected || m.force_documentation
        end
      end

      c = []
      i = []
      list.sort.each do |m|
        if m.singleton
          c << m
        else
          i << m
        end
      end
      return c,i
    end