mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-22 15:50:29 +00:00
102 lines
3.7 KiB
HTML
102 lines
3.7 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>GHSubscription.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GitHub API for Java</a> > <a href="index.source.html" class="el_package">org.kohsuke.github</a> > <span class="el_source">GHSubscription.java</span></div><h1>GHSubscription.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
|
|
|
|
import java.io.IOException;
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* Represents your subscribing to a repository / conversation thread..
|
|
*
|
|
* @author Kohsuke Kawaguchi
|
|
* @see GHRepository#getSubscription() GHRepository#getSubscription()
|
|
* @see GHThread#getSubscription() GHThread#getSubscription()
|
|
*/
|
|
<span class="fc" id="L13">public class GHSubscription extends GitHubInteractiveObject {</span>
|
|
private String created_at, url, repository_url, reason;
|
|
private boolean subscribed, ignored;
|
|
|
|
private GHRepository repo;
|
|
|
|
/**
|
|
* Gets created at.
|
|
*
|
|
* @return the created at
|
|
*/
|
|
public Date getCreatedAt() {
|
|
<span class="fc" id="L25"> return GitHubClient.parseDate(created_at);</span>
|
|
}
|
|
|
|
/**
|
|
* Gets url.
|
|
*
|
|
* @return the url
|
|
*/
|
|
public String getUrl() {
|
|
<span class="fc" id="L34"> return url;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets repository url.
|
|
*
|
|
* @return the repository url
|
|
*/
|
|
public String getRepositoryUrl() {
|
|
<span class="fc" id="L43"> return repository_url;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets reason.
|
|
*
|
|
* @return the reason
|
|
*/
|
|
public String getReason() {
|
|
<span class="fc" id="L52"> return reason;</span>
|
|
}
|
|
|
|
/**
|
|
* Is subscribed boolean.
|
|
*
|
|
* @return the boolean
|
|
*/
|
|
public boolean isSubscribed() {
|
|
<span class="fc" id="L61"> return subscribed;</span>
|
|
}
|
|
|
|
/**
|
|
* Is ignored boolean.
|
|
*
|
|
* @return the boolean
|
|
*/
|
|
public boolean isIgnored() {
|
|
<span class="fc" id="L70"> return ignored;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets repository.
|
|
*
|
|
* @return the repository
|
|
*/
|
|
public GHRepository getRepository() {
|
|
<span class="fc" id="L79"> return repo;</span>
|
|
}
|
|
|
|
/**
|
|
* Removes this subscription.
|
|
*
|
|
* @throws IOException
|
|
* the io exception
|
|
*/
|
|
public void delete() throws IOException {
|
|
<span class="fc" id="L89"> root.createRequest().method("DELETE").withUrlPath(repo.getApiTailUrl("subscription")).send();</span>
|
|
<span class="fc" id="L90"> }</span>
|
|
|
|
GHSubscription wrapUp(GHRepository repo) {
|
|
<span class="fc" id="L93"> this.repo = repo;</span>
|
|
<span class="fc" id="L94"> return wrapUp(repo.root);</span>
|
|
}
|
|
|
|
GHSubscription wrapUp(GitHub root) {
|
|
<span class="fc" id="L98"> this.root = root;</span>
|
|
<span class="fc" id="L99"> return this;</span>
|
|
}
|
|
}
|
|
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html> |