2 lines
49 KiB
JavaScript
2 lines
49 KiB
JavaScript
|
(this["webpackJsonpsia-skynet"]=this["webpackJsonpsia-skynet"]||[]).push([[0],{231:function(e,t,a){},232:function(e,t,a){},233:function(e,t,a){},234:function(e,t,a){},235:function(e,t,a){},236:function(e,t,a){},240:function(e,t,a){},245:function(e,t,a){},246:function(e,t,a){},248:function(e,t,a){},249:function(e,t,a){},250:function(e,t,a){},251:function(e,t,a){},254:function(e,t,a){},255:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(15),c=a.n(r);a(36),a(37);var s=function(){return l.a.createElement("div",{className:"app"},l.a.createElement("img",{className:"top-swoosh",src:"/images/top-swoosh.svg",alt:"top swoosh"}),l.a.createElement("div",{className:"width"},l.a.createElement(se,null),l.a.createElement(fe,null),l.a.createElement(pe,null),l.a.createElement(ve,null)),l.a.createElement("div",{className:"home-white"},l.a.createElement("div",{className:"width"},l.a.createElement(ge,null),l.a.createElement(je,null))),l.a.createElement(ne,null))},o=a(28),i=a(3),m=a.n(i);a(38);function u(e){var t=e.href,a=e.type,n=e.children,r=e.full,c=e.className,s=Object(o.a)(e,["href","type","children","full","className"]),i=m()("button",{full:r},c);return t?l.a.createElement("a",Object.assign({href:t,className:i},s),n):a?l.a.createElement("button",Object.assign({type:a,className:i},s),n):l.a.createElement("button",Object.assign({type:"button",className:i},s),n)}var d=a(27),h=a(257),f=(a(39),{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#171917",color:"#e6e1dc"},"hljs-comment":{color:"#bc9458",fontStyle:"italic"},"hljs-quote":{color:"#bc9458",fontStyle:"italic"},"hljs-keyword":{color:"#c26230"},"hljs-selector-tag":{color:"#c26230"},"hljs-string":{color:"#a5c261"},"hljs-number":{color:"#a5c261"},"hljs-regexp":{color:"#a5c261"},"hljs-variable":{color:"#a5c261"},"hljs-template-variable":{color:"#a5c261"},"hljs-subst":{color:"#519f50"},"hljs-tag":{color:"#e8bf6a"},"hljs-name":{color:"#e8bf6a"},"hljs-type":{color:"#da4939"},"hljs-symbol":{color:"#6d9cbe"},"hljs-bullet":{color:"#6d9cbe"},"hljs-built_in":{color:"#6d9cbe"},"hljs-builtin-name":{color:"#6d9cbe"},"hljs-attr":{color:"#6d9cbe"},"hljs-link":{color:"#6d9cbe",textDecoration:"underline"},"hljs-params":{color:"#d0d0ff"},"hljs-attribute":{color:"#cda869"},"hljs-meta":{color:"#9b859d"},"hljs-title":{color:"#ffc66d"},"hljs-section":{color:"#ffc66d"},"hljs-addition":{backgroundColor:"#144212",color:"#e6e1dc",display:"inline-block",width:"100%"},"hljs-deletion":{backgroundColor:"#600",color:"#e6e1dc",display:"inline-block",width:"100%"},"hljs-selector-class":{color:"#9b703f"},"hljs-selector-id":{color:"#8b98ab"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}});function p(){var e=Object(n.useState)(1),t=Object(d.a)(e,2),a=t[0],r=t[1];return l.a.createElement("div",{className:"code-examples"},l.a.createElement("ul",{className:"code-examples-tabs"},l.a.createElement("li",{onClick:function(){return r(1)},className:m()({active:1===a})},"Python"),l.a.createElement("li",{onClick:function(){return r(2)},className:m()({active:2===a})},"CURL"),l.a.createElement("li",{onClick:function(){return r(3)},className:m()({active:3===a})},"Node.js"),l.a.createElement("li",{onClick:function(){return r(4)},className:m()({active:4===a})},"Go")),l.a.createElement("div",{className:"code-examples-body"},1===a&&l.a.createElement(h.a,{wrapLines:!0,showLineNumbers:!0,language:"python",style:f},'from siaskynet import Skynet\npath = "./image.jpg"\nskylink = Skynet.UploadFile(path)\nprint("Upload successful, skylink: " + skylink)'),2===a&&l.a.createElement(h.a,{wrapLines:!0,showLineNumbers:!0,language:"curl",style:f},'curl -X POST "https://siasky.net/api/skyfile" -F file=@image.jpg'),3===a&&l.a.createElement(h.a,{wrapLines:!0,showLineNumbers:!0,language:"node",style:f},"const skynet = require('@nebulous/skynet');\n\n(async () => {\n\tconst path = \"./image.jpg\"\n\tconst skylink = await skynet.UploadFile(\n\t\tpath,\n\t\tskynet.DefaultUploadOptions\n\t)\n\tconsole.log(`Upload successful, skylink: ${skylink}`)\n})()"),4===a&&l.a.createElement(h.a,{wrapLines:!0,showLineN
|
||
|
//# sourceMappingURL=main.73ef0a5e.chunk.js.map
|