post-api-call/docs/index.html

17 lines
23 KiB
HTML
Raw Permalink Normal View History

2023-12-31 11:18:19 +08:00
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>post-api-call-action</title><meta name="description" content="Documentation for post-api-call-action"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">post-api-call-action</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h2>post-api-call-action</h2></div><div class="tsd-panel tsd-typography"><a id="md:webhook-action" class="tsd-anchor"></a><h1><a href="#md:webhook-action">webhook-action</a></h1><p>GitHub Action that sends a POST request of any kind. This is a thin wrapper around Axios.post.</p>
<a id="md:inputs" class="tsd-anchor"></a><h2><a href="#md:inputs">Inputs</a></h2><a id="md:url" class="tsd-anchor"></a><h3><a href="#md:url"><code>url</code></a></h3><p><strong>Required</strong>: URL to send post request to.</p>
<a id="md:data" class="tsd-anchor"></a><h3><a href="#md:data"><code>data</code></a></h3><p>Optional: JSON string of data to pass into request. Default <code>&quot;{}&quot;</code>.</p>
<a id="md:headers" class="tsd-anchor"></a><h3><a href="#md:headers"><code>headers</code></a></h3><p>Optional: JSON string of headers to pass into request. Default <code>&quot;{}&quot;</code>.</p>
<a id="md:params" class="tsd-anchor"></a><h3><a href="#md:params"><code>params</code></a></h3><p>Optional: JSON string of query parameters to pass into request. Default <code>&quot;{}&quot;</code>.</p>
<a id="md:example-usage" class="tsd-anchor"></a><h2><a href="#md:example-usage">Example usage</a></h2><pre><code class="language-yaml"><span class="hl-0">uses</span><span class="hl-1">: </span><span class="hl-2">dkershner6/post-api-call-action@v2</span><br/><span class="hl-0">with</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-0">url</span><span class="hl-1">: </span><span class="hl-2">${{ secrets.API_URL }}</span><br/><span class="hl-1"> </span><span class="hl-0">data</span><span class="hl-1">: </span><span class="hl-3">&quot;{</span><span class="hl-4">\&quot;</span><span class="hl-3">command</span><span class="hl-4">\&quot;</span><span class="hl-3">: </span><span class="hl-4">\&quot;</span><span class="hl-3">publish</span><span class="hl-4">\&quot;</span><span class="hl-3">}&quot;</span><br/><span class="hl-1"> </span><span class="hl-0">headers</span><span class="hl-1">: </span><span class="hl-3">&quot;{</span><span class="hl-4">\&quot;</span><span class="hl-3">Authorization</span><span class="hl-4">\&quot;</span><span class="hl-3">: </span><span class="hl-4">\&quot;</span><span class="hl-3">Bearer ${{ secrets.API_KEY }}</span><span class="hl-4">\&quot;</span><span class="hl-3">}&quot;</span><br/><span class="hl-1"> </span><span class="hl-0">params</span><span class="hl-1">: </span><span class="hl-3">&quot;{</span><span class="hl-4">\&quot;</span><span class="hl-3">content</span><span class="hl-4">\&quot;</span><span class="hl-3">: </span><span class="hl-4">\&quot;</span><span class="hl-3">Test Content</span><span class="hl-4">\&quot;</span><span class="hl-3">}&quot;</span>
</code><button>Copy</button></pre>
<a id="md:contributing" class="tsd-anchor"></a><h2><a href="#md:contributing">Contributing</a></h2><p>All contributions are welcome, please open an issue or pull request.</p>
<p>To use this repository:</p>
<ol>
<li><code>npm i -g pnpm</code> (if don&#39;t have pnpm installed)</li>
<li><code>pnpm i</code></li>
<li><code>npx projen</code> (this will ensure everything is setup correctly, and you can run this command at any time)</li>
<li>Good to make your changes!</li>
<li>You can run <code>npx projen build</code> at any time to build the project.</li>
</ol>
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><ul><li><ul><li><a href="#md:webhook-action"><span>webhook-<wbr/>action</span></a></li><li><ul><li><a href="#md:inputs"><span>Inputs</span></a></li><li><ul><li><a href="#md:url"><span>url</span></a></li><li><a href="#md:data"><span>data</span></a></li><li><a href="#md:headers"><span>headers</span></a></li><li><a href="#md:params"><span>params</span></a></li></ul></li><li><a href="#md:example-usage"><span>Example usage</span></a></li><li><a href="#md:contributing"><span>Contributing</span></a></li></ul></li></ul></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>post-api-call-action</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base="."></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" widt