mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-23 08:21:22 +00:00
63 lines
2.7 KiB
HTML
63 lines
2.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>GHReaction.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">GHReaction.java</span></div><h1>GHReaction.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
|
|
|
|
import java.io.IOException;
|
|
import java.net.URL;
|
|
|
|
import static org.kohsuke.github.internal.Previews.SQUIRREL_GIRL;
|
|
|
|
/**
|
|
* Reaction to issue, comment, PR, and so on.
|
|
*
|
|
* @author Kohsuke Kawaguchi
|
|
* @see Reactable
|
|
*/
|
|
@Preview(SQUIRREL_GIRL)
|
|
@Deprecated
|
|
<span class="fc" id="L16">public class GHReaction extends GHObject {</span>
|
|
|
|
private GHUser user;
|
|
private ReactionContent content;
|
|
|
|
GHReaction wrap(GitHub root) {
|
|
<span class="fc" id="L22"> this.root = root;</span>
|
|
<span class="fc" id="L23"> user.wrapUp(root);</span>
|
|
<span class="fc" id="L24"> return this;</span>
|
|
}
|
|
|
|
/**
|
|
* The kind of reaction left.
|
|
*
|
|
* @return the content
|
|
*/
|
|
public ReactionContent getContent() {
|
|
<span class="fc" id="L33"> return content;</span>
|
|
}
|
|
|
|
/**
|
|
* User who left the reaction.
|
|
*
|
|
* @return the user
|
|
*/
|
|
public GHUser getUser() {
|
|
<span class="fc" id="L42"> return user;</span>
|
|
}
|
|
|
|
/**
|
|
* Reaction has no HTML URL. Don't call this method.
|
|
*/
|
|
@Deprecated
|
|
public URL getHtmlUrl() {
|
|
<span class="nc" id="L50"> return null;</span>
|
|
}
|
|
|
|
/**
|
|
* Removes this reaction.
|
|
*
|
|
* @throws IOException
|
|
* the io exception
|
|
*/
|
|
public void delete() throws IOException {
|
|
<span class="fc" id="L60"> root.createRequest().method("DELETE").withPreview(SQUIRREL_GIRL).withUrlPath("/reactions/" + getId()).send();</span>
|
|
<span class="fc" id="L61"> }</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> |