File tree 1 file changed +63
-0
lines changed
1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ <div align =" center " >
2
+ <img alt =" Square Cloud Banner " src =" https://cdn.squarecloud.app/png/github-readme.png " >
3
+ </div >
4
+
5
+ <h1 align =" center " >@squarecloud/blob</h1 >
6
+
7
+ <p align =" center " >Official <a href =" https://squarecloud.app " target =" _blank " >Square Cloud</a > Blob SDK for NodeJS.</p >
8
+
9
+ <div align =" center " >
10
+ <div style =" width : fit-content ; display : flex ; align-items : flex-start ; gap : 4px ;" >
11
+ <img alt="NPM License" src="https://img.shields.io/npm/l/@squarecloud/blob">
12
+ <img alt="NPM Downloads" src="https://img.shields.io/npm/dw/@squarecloud/blob">
13
+ <a href="https://npmjs.com/package/@squarecloud/blob">
14
+ <img alt="NPM Version" src="https://img.shields.io/npm/v/@squarecloud/blob">
15
+ </a>
16
+ </div >
17
+ </div >
18
+
19
+ ## Installation
20
+
21
+ ``` bash
22
+ npm install @squarecloud/blob
23
+ // or
24
+ yarn add @squarecloud/blob
25
+ // or
26
+ pnpm add @squarecloud/blob
27
+ ```
28
+
29
+ ## Documentation
30
+
31
+ Visit our [ official API documentation] ( https://docs.squarecloud.app/blob-reference/ ) for more information about how this service.
32
+
33
+ ## Getting Started
34
+
35
+ ``` ts
36
+ import { SquareCloudBlob } from " @squarecloud/blob"
37
+ // const { SquareCloudBlob } = require("@squarecloud/blob");
38
+
39
+ const blob = new SquareCloudBlob (" Your API Key" )
40
+ const objects = await blob .objects .list ()
41
+ ```
42
+
43
+ ### Creating an object
44
+
45
+ ``` ts
46
+ const object = await blob .objects .put ({ file: " path/to/file.png" , name: " my_image" })
47
+ console .log (object .url )
48
+ ```
49
+
50
+ ### Deleting objects
51
+
52
+ ``` ts
53
+ const objectsToDelete = [" ID/prefix/name1_xxx-xxx.zip" , " ID/prefix/name_xxx-xxx-xxx.png" ]
54
+ await blob .objects .delete (objectsToDelete )
55
+ ```
56
+
57
+ ## Contributing
58
+
59
+ Feel free to contribute with suggestions or bug reports at our [ GitHub repository] ( https://github.com/squarecloudofc/sdk-blob-js ) .
60
+
61
+ ## Authors
62
+
63
+ - [ @joaotonaco ] ( https://github.com/joaotonaco )
You can’t perform that action at this time.
0 commit comments