add getting addition data from the github api
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a03206a8e1
commit
46382334cb
4 changed files with 225 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
|||
package tag.matcherImplementations;
|
||||
|
||||
import link.LinkUrl;
|
||||
import tag.OptionalTag;
|
||||
import tag.Tag;
|
||||
import tag.TagMatcher;
|
||||
import tag.TagName;
|
||||
|
||||
public class GitHubTagMatcher extends TagMatcher {
|
||||
|
||||
public GitHubTagMatcher() {
|
||||
tagName = new TagName("github");
|
||||
}
|
||||
|
||||
public TagName getName() {
|
||||
return tagName;
|
||||
}
|
||||
|
||||
public String getAdditionInfo() {
|
||||
return "";//TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalTag ifMatches(LinkUrl linkUrl) {
|
||||
if (linkUrl.getUrl().getHost().equals("github.com")) {
|
||||
return OptionalTag.of(new Tag(getName()).addAdditionalData(getAdditionInfo()));
|
||||
}
|
||||
return OptionalTag.empty();
|
||||
}
|
||||
}
|
Reference in a new issue