rayshade / YouTrackRestApi

A set of Java classes wrapped around YouTrack REST API.
13 stars 9 forks source link

cannot find variable with name 'issue' #4

Closed mossad-zika closed 7 years ago

mossad-zika commented 7 years ago

Error:(26, 88) java: cannot find symbol symbol: variable issue location: variable project of type youtrack.Project

import youtrack.*;
import java.util.List;

public class Main {
    public static void main(String[] args) throws Exception {

        //Access a YouTrack instance by its REST URL.

        final YouTrack youTrack = YouTrack.getInstance("http://youtrack.jetbrains.com/rest/");

        //Try to log in using some credentials.
        youTrack.login("megor", "password");

        //Get a list of all projects.
        final List<Project> projectList = youTrack.projects.list();

        System.out.println("Total projects: " + projectList.size());

        //Getting a specific project by its ID.
        final Project project = youTrack.projects.item("DOC");

        System.out.println("Project " + project.getName() + " total issues: " + project.issue.list().size());
    }
}
rayshade commented 7 years ago

Yeah, that's a typo, you should use "issues" instead of "issue"

rayshade commented 7 years ago

I've updated the example, now it is completely without errors.