jcabi MkGithub example code no longer compiles
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:16: method create in interface com.jcabi.github.Repos cannot be applied to given types; | |
[error] required: javax.json.JsonObject | |
[error] found: java.lang.String | |
[error] reason: argument mismatch; java.lang.String cannot be converted to javax.json.JsonObject | |
[error] github.repos().create | |
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:17: method get in interface com.jcabi.github.Repos cannot be applied to given types; | |
[error] required: com.jcabi.github.Coordinates | |
[error] found: java.lang.String | |
[error] reason: argument mismatch; java.lang.String cannot be converted to com.jcabi.github.Coordinates | |
[error] github.repos().get | |
[error] /Users/chris/code/no-carrier/src/main/java/qux/Main.java:19: cannot find symbol | |
[error] symbol: method post(java.lang.String,java.lang.String) | |
[error] location: variable issues of type com.jcabi.github.Issues | |
[error] issues.post | |
[error] (compile:compileIncremental) javac returned nonzero exit code |
package qux; | |
import java.io.IOException; | |
import com.jcabi.github.*; | |
import com.jcabi.github.mock.*; | |
public class Main { | |
public static void main(String[] args) { | |
Github github = null; | |
try { | |
github = new MkGithub("jeff"); | |
} | |
catch (IOException exc) { | |
return; | |
} | |
github.repos().create("jcabi/jcabi-github"); | |
Repo repo = github.repos().get("jcabi/jcabi-github"); | |
Issues issues = repo.issues(); | |
Issue issue = issues.post("issue title", "issue body"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment