diff --git a/build/404.html b/build/404.html index 780244e7..fd29e905 100644 --- a/build/404.html +++ b/build/404.html @@ -4,7 +4,7 @@ Page Not Found | TTLxGOVEE Documentation - + diff --git a/build/assets/js/d06775cc.6bb0a7df.js b/build/assets/js/d06775cc.6bb0a7df.js new file mode 100644 index 00000000..5e034a8b --- /dev/null +++ b/build/assets/js/d06775cc.6bb0a7df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[304],{8320:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>c});var t=r(4848),i=r(8453);const a={sidebar_position:4},o="Integrations: Webhooks",s={id:"Integrations/webhooks",title:"Integrations: Webhooks",description:"Documentation for the POST webhooks Integration (Last Updated Feb. 2nd, 2024)",source:"@site/docs/Integrations/webhooks.md",sourceDirName:"Integrations",slug:"/Integrations/webhooks",permalink:"/docs/Integrations/webhooks",draft:!1,unlisted:!1,editUrl:"https://github.com/TinkerTechLab/TTLxGOVEE-Documentation/docs/Integrations/webhooks.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"tutorialSidebar",previous:{title:"Integrations: iOS Client",permalink:"/docs/Integrations/ios"},next:{title:"Integrations: Time Pattern",permalink:"/docs/Integrations/time-pattern"}},l={},c=[{value:"Getting Started",id:"getting-started",level:2},{value:"Postman",id:"postman",level:2},{value:"Examples",id:"examples",level:2},{value:"cURL",id:"curl",level:3},{value:"PHP's cURL Library",id:"phps-curl-library",level:3},{value:"PHP's Guzzle Library",id:"phps-guzzle-library",level:3},{value:"Python's HTTP.Client Library",id:"pythons-httpclient-library",level:3},{value:"Python's requests Library",id:"pythons-requests-library",level:3},{value:"C#'s HTTPClient",id:"cs-httpclient",level:3},{value:"Swift's URLSession",id:"swifts-urlsession",level:3}];function p(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"integrations-webhooks",children:"Integrations: Webhooks"}),"\n",(0,t.jsx)(n.p,{children:"Documentation for the POST webhooks Integration (Last Updated Feb. 2nd, 2024)"}),"\n",(0,t.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Create an ",(0,t.jsx)(n.a,{href:"https://govee.tinkertechlab.com/automations",children:"automation"}),' with "webhook" as a trigger']}),"\n",(0,t.jsx)(n.li,{children:"Be sure to copy your API key and Private key into the application you wish to use the API with before closing the modal"}),"\n",(0,t.jsxs)(n.li,{children:["In your application, create a POST HTTP request to ",(0,t.jsx)(n.code,{children:"https://govee.tinkertechlab.com/api/v1/webhook/api"})," with the following parameters:"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api_key"}),' (Your API Key beings with "TTL-")']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"public_key"})," (Your private key is provided in the Trigger setup modal with your API key)"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"postman",children:"Postman"}),"\n",(0,t.jsxs)(n.p,{children:["Confused? Take a look at this ",(0,t.jsx)(n.a,{href:"https://www.postman.com/greenreader9/workspace/ttlxgovee-public-webhooks-api/overview",children:"example on postman"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.p,{children:"Be sure to insert your full API key, and Public key! Remember to use the API key provided when you setup the trigger, don't use your GOVEE API key"}),"\n",(0,t.jsx)(n.h3,{id:"curl",children:"cURL"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-curl",children:"curl --location 'https://govee.tinkertechlab.com/api/v1/webhook/api' \\\r\n--header 'Content-Type: application/x-www-form-urlencoded' \\\r\n--data-urlencode 'api_key=TTL-' \\\r\n--data-urlencode 'public_key='\n"})}),"\n",(0,t.jsx)(n.h3,{id:"phps-curl-library",children:"PHP's cURL Library"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:" 'https://govee.tinkertechlab.com/api/v1/webhook/api',\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_ENCODING => '',\r\n CURLOPT_MAXREDIRS => 10,\r\n CURLOPT_TIMEOUT => 0,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => 'POST',\r\n CURLOPT_POSTFIELDS => 'api_key='.$api_key.'&public_key='.$public_key,\r\n CURLOPT_HTTPHEADER => array(\r\n 'Content-Type: application/x-www-form-urlencoded'\r\n ),\r\n));\r\n\r\n$response = curl_exec($curl);\r\n\r\ncurl_close($curl);\r\necho $response;\n"})}),"\n",(0,t.jsx)(n.h3,{id:"phps-guzzle-library",children:"PHP's Guzzle Library"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:" 'application/x-www-form-urlencoded'\r\n];\r\n$options = [\r\n'form_params' => [\r\n 'api_key' => $api_key,\r\n 'public_key' => $public_key\r\n]];\r\n$request = new Request('POST', 'https://govee.tinkertechlab.com/api/v1/webhook/api', $headers);\r\n$res = $client->sendAsync($request, $options)->wait();\r\necho $res->getBody();\n"})}),"\n",(0,t.jsx)(n.h3,{id:"pythons-httpclient-library",children:"Python's HTTP.Client Library"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-Python",children:'# Python http.client Library\r\n\r\nimport http.client\r\n\r\napi_key = "TTL-" # Replace with your TTL API key\r\npublic_key = "" # Replace with your public key\r\n\r\nconn = http.client.HTTPSConnection("govee.tinkertechlab.com")\r\n\r\npayload = f\'api_key={api_key}&public_key={public_key}\'\r\nheaders = {\r\n \'Content-Type\': \'application/x-www-form-urlencoded\'\r\n}\r\n\r\nconn.request("POST", "/api/v1/webhook/api", payload, headers)\r\nres = conn.getresponse()\r\ndata = res.read()\r\n\r\nprint(data.decode("utf-8"))\n'})}),"\n",(0,t.jsx)(n.h3,{id:"pythons-requests-library",children:"Python's requests Library"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-Python",children:"# Python requests Library\r\n\r\nimport requests\r\n\r\napi_key = \"TTL-\" # Replace with your TTL API key\r\npublic_key = \"\" # Replace with your public key\r\n\r\nurl = \"https://govee.tinkertechlab.com/api/v1/webhook/api\"\r\n\r\npayload = f'api_key={api_key}&public_key={public_key}'\r\nheaders = {\r\n 'Content-Type': 'application/x-www-form-urlencoded'\r\n}\r\n\r\nresponse = requests.post(url, headers=headers, data=payload)\r\n\r\nprint(response.text)\n"})}),"\n",(0,t.jsx)(n.h3,{id:"cs-httpclient",children:"C#'s HTTPClient"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-C#",children:'// C# HTTPClient\r\n\r\nvar apiKey = "TTL-"; // Replace with your TTL API key\r\nvar publicKey = ""; // Replace with your public key\r\n\r\nvar client = new HttpClient();\r\nvar request = new HttpRequestMessage(HttpMethod.Post, "https://govee.tinkertechlab.com/api/v1/webhook/api");\r\n\r\nvar collection = new List>();\r\ncollection.Add(new KeyValuePair("api_key", apiKey));\r\ncollection.Add(new KeyValuePair("public_key", publicKey));\r\n\r\nvar content = new FormUrlEncodedContent(collection);\r\nrequest.Content = content;\r\n\r\nvar response = await client.SendAsync(request);\r\nresponse.EnsureSuccessStatusCode();\r\n\r\nConsole.WriteLine(await response.Content.ReadAsStringAsync());\r\n\n'})}),"\n",(0,t.jsx)(n.h3,{id:"swifts-urlsession",children:"Swift's URLSession"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-swift",children:'// Swift URLSession\r\n\r\nimport Foundation\r\n\r\nlet apiKey = "TTL-" // Replace with your TTL API key\r\nlet publicKey = "" // Replace with your public key\r\n\r\nlet parameters = "api_key=\\(apiKey)&public_key=\\(publicKey)"\r\nlet postData = parameters.data(using: .utf8)\r\n\r\nvar request = URLRequest(url: URL(string: "https://govee.tinkertechlab.com/api/v1/webhook/api")!, timeoutInterval: Double.infinity)\r\nrequest.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")\r\n\r\nrequest.httpMethod = "POST"\r\nrequest.httpBody = postData\r\n\r\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in\r\n guard let data = data else {\r\n print(String(describing: error))\r\n return\r\n }\r\n print(String(data: data, encoding: .utf8)!)\r\n}\r\n\r\ntask.resume()\n'})})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>s});var t=r(6540);const i={},a=t.createContext(i);function o(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/build/assets/js/runtime~main.98f00a29.js b/build/assets/js/runtime~main.98f00a29.js new file mode 100644 index 00000000..d9d20df9 --- /dev/null +++ b/build/assets/js/runtime~main.98f00a29.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,r,a,o,f={},n={};function d(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return f[e].call(r.exports,r,r.exports,d),r.loaded=!0,r.exports}d.m=f,d.c=n,e=[],d.O=(t,r,a,o)=>{if(!r){var f=1/0;for(i=0;i=o)&&Object.keys(d.O).every((e=>d.O[e](r[c])))?r.splice(c--,1):(n=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[r,a,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var f={};t=t||[null,r({}),r([]),r(r)];for(var n=2&a&&e;"object"==typeof n&&!~t.indexOf(n);n=r(n))Object.getOwnPropertyNames(n).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,d.d(o,f),o},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,r)=>(d.f[r](e,t),t)),[])),d.u=e=>"assets/js/"+({9:"5b1016f7",48:"a94703ab",61:"1f391b9e",98:"a7bd4aaa",134:"393be207",139:"b7f452c3",304:"d06775cc",322:"8307f285",401:"17896441",416:"d9e16301",469:"f2852c15",520:"df6dfd9b",541:"cd07c179",581:"935f2afb",630:"4f2dd8bc",634:"c4f5d8e4",647:"5e95c892",667:"0692367a",697:"b906a42b",719:"0a561b05",784:"97913273",900:"b3bbf9a2",935:"6a8f41d0",969:"14eb3368",976:"0e384e19"}[e]||e)+"."+{9:"b9dcc032",48:"8b0ccadb",61:"ea25450b",98:"fd305e17",134:"8abc99e4",139:"a883b469",237:"7663bed8",304:"6bb0a7df",322:"57836932",401:"292c9a17",416:"db6e47b1",469:"1ea0bd0a",520:"d0714859",541:"29f57260",581:"d7b2429a",630:"cd5ae0c0",634:"397e1b2d",647:"1dd55255",667:"912e91e9",697:"a7b46935",719:"ac30c12a",784:"5f777e77",900:"5125ed42",922:"7a40a2f2",935:"cb9ec643",969:"14ef70e8",976:"c103877c"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="docs:",d.l=(e,t,r,f)=>{if(a[e])a[e].push(t);else{var n,c;if(void 0!==r)for(var b=document.getElementsByTagName("script"),i=0;i{n.onerror=n.onload=null,clearTimeout(s);var o=a[e];if(delete a[e],n.parentNode&&n.parentNode.removeChild(n),o&&o.forEach((e=>e(r))),t)return t(r)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=l.bind(null,n.onerror),n.onload=l.bind(null,n.onload),c&&document.head.appendChild(n)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/",d.gca=function(e){return e={17896441:"401",97913273:"784","5b1016f7":"9",a94703ab:"48","1f391b9e":"61",a7bd4aaa:"98","393be207":"134",b7f452c3:"139",d06775cc:"304","8307f285":"322",d9e16301:"416",f2852c15:"469",df6dfd9b:"520",cd07c179:"541","935f2afb":"581","4f2dd8bc":"630",c4f5d8e4:"634","5e95c892":"647","0692367a":"667",b906a42b:"697","0a561b05":"719",b3bbf9a2:"900","6a8f41d0":"935","14eb3368":"969","0e384e19":"976"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(t,r)=>{var a=d.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((r,o)=>a=e[t]=[r,o]));r.push(a[2]=o);var f=d.p+d.u(t),n=new Error;d.l(f,(r=>{if(d.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),f=r&&r.target&&r.target.src;n.message="Loading chunk "+t+" failed.\n("+o+": "+f+")",n.name="ChunkLoadError",n.type=o,n.request=f,a[1](n)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,f=r[0],n=r[1],c=r[2],b=0;if(f.some((t=>0!==e[t]))){for(a in n)d.o(n,a)&&(d.m[a]=n[a]);if(c)var i=c(d)}for(t&&t(r);b Security Levels | TTLxGOVEE Documentation - + diff --git a/build/docs/GOVEE-API-Keys/using-multiple-keys/index.html b/build/docs/GOVEE-API-Keys/using-multiple-keys/index.html index fa7e8e1e..e9bc73a4 100644 --- a/build/docs/GOVEE-API-Keys/using-multiple-keys/index.html +++ b/build/docs/GOVEE-API-Keys/using-multiple-keys/index.html @@ -4,7 +4,7 @@ Using Multiple GOVEE API Keys | TTLxGOVEE Documentation - + diff --git a/build/docs/Integrations/discord/index.html b/build/docs/Integrations/discord/index.html index 6bd55a95..f6465bf2 100644 --- a/build/docs/Integrations/discord/index.html +++ b/build/docs/Integrations/discord/index.html @@ -4,7 +4,7 @@ Integrations: Discord | TTLxGOVEE Documentation - + diff --git a/build/docs/Integrations/ios/index.html b/build/docs/Integrations/ios/index.html index f02ca135..3a7875ea 100644 --- a/build/docs/Integrations/ios/index.html +++ b/build/docs/Integrations/ios/index.html @@ -4,7 +4,7 @@ Integrations: iOS Client | TTLxGOVEE Documentation - + diff --git a/build/docs/Integrations/time-pattern/index.html b/build/docs/Integrations/time-pattern/index.html index 968075ca..11a5cdd9 100644 --- a/build/docs/Integrations/time-pattern/index.html +++ b/build/docs/Integrations/time-pattern/index.html @@ -4,7 +4,7 @@ Integrations: Time Pattern | TTLxGOVEE Documentation - + diff --git a/build/docs/Integrations/webAPI/index.html b/build/docs/Integrations/webAPI/index.html index 974731b1..ad237fe2 100644 --- a/build/docs/Integrations/webAPI/index.html +++ b/build/docs/Integrations/webAPI/index.html @@ -4,7 +4,7 @@ Integrations: WebAPI | TTLxGOVEE Documentation - + diff --git a/build/docs/Integrations/webhooks/index.html b/build/docs/Integrations/webhooks/index.html index e7e3aac5..2b8cf8ba 100644 --- a/build/docs/Integrations/webhooks/index.html +++ b/build/docs/Integrations/webhooks/index.html @@ -4,7 +4,7 @@ Integrations: Webhooks | TTLxGOVEE Documentation - + @@ -22,12 +22,19 @@

Postmanexample on postman.

Examples

Be sure to insert your full API key, and Public key! Remember to use the API key provided when you setup the trigger, don't use your GOVEE API key

+

cURL

curl --location 'https://govee.tinkertechlab.com/api/v1/webhook/api' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'api_key=TTL-' \
--data-urlencode 'public_key='
+

PHP's cURL Library

<?php
// PHP cURL Library

$api_key = "TTL-"; // Replace with your TTL API key
$public_key = ""; // Replace with your public key

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://govee.tinkertechlab.com/api/v1/webhook/api',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'api_key='.$api_key.'&public_key='.$public_key,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
+

PHP's Guzzle Library

<?php
// PHP Guzzle Library

$api_key = "TTL-"; // Replace with your TTL API key
$public_key = ""; // Replace with your public key

$client = new Client();
$headers = [
'Content-Type' => 'application/x-www-form-urlencoded'
];
$options = [
'form_params' => [
'api_key' => $api_key,
'public_key' => $public_key
]];
$request = new Request('POST', 'https://govee.tinkertechlab.com/api/v1/webhook/api', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
+

Python's HTTP.Client Library

# Python http.client Library

import http.client

api_key = "TTL-" # Replace with your TTL API key
public_key = "" # Replace with your public key

conn = http.client.HTTPSConnection("govee.tinkertechlab.com")

payload = f'api_key={api_key}&public_key={public_key}'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}

conn.request("POST", "/api/v1/webhook/api", payload, headers)
res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
+

Python's requests Library

# Python requests Library

import requests

api_key = "TTL-" # Replace with your TTL API key
public_key = "" # Replace with your public key

url = "https://govee.tinkertechlab.com/api/v1/webhook/api"

payload = f'api_key={api_key}&public_key={public_key}'
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.post(url, headers=headers, data=payload)

print(response.text)
+

C#'s HTTPClient

// C# HTTPClient

var apiKey = "TTL-"; // Replace with your TTL API key
var publicKey = ""; // Replace with your public key

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://govee.tinkertechlab.com/api/v1/webhook/api");

var collection = new List<KeyValuePair<string, string>>();
collection.Add(new KeyValuePair<string, string>("api_key", apiKey));
collection.Add(new KeyValuePair<string, string>("public_key", publicKey));

var content = new FormUrlEncodedContent(collection);
request.Content = content;

var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();

Console.WriteLine(await response.Content.ReadAsStringAsync());

-
// Swift URLSession

import Foundation

let apiKey = "TTL-" // Replace with your TTL API key
let publicKey = "" // Replace with your public key

let parameters = "api_key=\(apiKey)&public_key=\(publicKey)"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://govee.tinkertechlab.com/api/v1/webhook/api")!, timeoutInterval: Double.infinity)
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}

task.resume()
+

Swift's URLSession

+
// Swift URLSession

import Foundation

let apiKey = "TTL-" // Replace with your TTL API key
let publicKey = "" // Replace with your public key

let parameters = "api_key=\(apiKey)&public_key=\(publicKey)"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://govee.tinkertechlab.com/api/v1/webhook/api")!, timeoutInterval: Double.infinity)
request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}

task.resume()
\ No newline at end of file diff --git a/build/docs/automations-actions-events/index.html b/build/docs/automations-actions-events/index.html index be074c69..1973f2f2 100644 --- a/build/docs/automations-actions-events/index.html +++ b/build/docs/automations-actions-events/index.html @@ -4,7 +4,7 @@ Automations, Actions, and Events | TTLxGOVEE Documentation - + diff --git a/build/docs/category/govee-api-keys/index.html b/build/docs/category/govee-api-keys/index.html index 88adb5b8..6bd0d35e 100644 --- a/build/docs/category/govee-api-keys/index.html +++ b/build/docs/category/govee-api-keys/index.html @@ -4,7 +4,7 @@ GOVEE API Keys | TTLxGOVEE Documentation - + diff --git a/build/docs/category/integrations/index.html b/build/docs/category/integrations/index.html index 4f15aa9e..c25bee05 100644 --- a/build/docs/category/integrations/index.html +++ b/build/docs/category/integrations/index.html @@ -4,7 +4,7 @@ Integrations | TTLxGOVEE Documentation - + diff --git a/build/docs/intro/index.html b/build/docs/intro/index.html index 34f41505..b6ef357a 100644 --- a/build/docs/intro/index.html +++ b/build/docs/intro/index.html @@ -4,7 +4,7 @@ Getting Started (Connecting to GOVEE) | TTLxGOVEE Documentation - + diff --git a/build/docs/signin-with-google/index.html b/build/docs/signin-with-google/index.html index ebceabdf..a76001ae 100644 --- a/build/docs/signin-with-google/index.html +++ b/build/docs/signin-with-google/index.html @@ -4,7 +4,7 @@ Signin With Google | TTLxGOVEE Documentation - + diff --git a/build/docs/support/index.html b/build/docs/support/index.html index e6df4829..28e49e6a 100644 --- a/build/docs/support/index.html +++ b/build/docs/support/index.html @@ -4,7 +4,7 @@ Get Support | TTLxGOVEE Documentation - + diff --git a/build/docs/upgrading/index.html b/build/docs/upgrading/index.html index 2487535b..7e3630ee 100644 --- a/build/docs/upgrading/index.html +++ b/build/docs/upgrading/index.html @@ -4,7 +4,7 @@ Upgrading your Account | TTLxGOVEE Documentation - + diff --git a/build/markdown-page/index.html b/build/markdown-page/index.html index fd296f12..10e13337 100644 --- a/build/markdown-page/index.html +++ b/build/markdown-page/index.html @@ -4,7 +4,7 @@ Markdown page example | TTLxGOVEE Documentation - + diff --git a/docs/Integrations/webhooks.md b/docs/Integrations/webhooks.md index bb47e640..d6fbeced 100644 --- a/docs/Integrations/webhooks.md +++ b/docs/Integrations/webhooks.md @@ -24,6 +24,7 @@ Confused? Take a look at this [example on postman](https://www.postman.com/green Be sure to insert your full API key, and Public key! Remember to use the API key provided when you setup the trigger, don't use your GOVEE API key +### cURL ```curl curl --location 'https://govee.tinkertechlab.com/api/v1/webhook/api' \ @@ -32,6 +33,7 @@ curl --location 'https://govee.tinkertechlab.com/api/v1/webhook/api' \ --data-urlencode 'public_key=' ``` +### PHP's cURL Library ```php sendAsync($request, $options)->wait(); echo $res->getBody(); ``` +### Python's HTTP.Client Library ```Python # Python http.client Library @@ -107,6 +112,7 @@ data = res.read() print(data.decode("utf-8")) ``` +### Python's requests Library ```Python # Python requests Library @@ -127,6 +133,7 @@ response = requests.post(url, headers=headers, data=payload) print(response.text) ``` +### C#'s HTTPClient ```C# // C# HTTPClient @@ -151,6 +158,7 @@ Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` +### Swift's URLSession ```swift // Swift URLSession