-
Notifications
You must be signed in to change notification settings - Fork 121
/
index.html
79 lines (75 loc) · 6.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<title>Box Node SDK</title>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="main.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="header">
<h1>Box Node SDK</h1>
<div class="header-buttons">
<a id="github-button" class="button" href="https://github.com/box/box-node-sdk">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="button-icon">
<path d="M16,8c0,4.4-3.6,8-8,8c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8C12.4,0,16,3.6,16,8z M10,14.5c2.7-1,4.7-3.5,4.7-6.5 c0-3.7-3-6.7-6.7-6.7c-3.7,0-6.7,3-6.7,6.7c0,3,2,5.6,4.8,6.5v-1.3c0-0.8,0.3-1.2,0.6-1.4C5,11.6,3.1,11,3.1,8 c0-0.8,0.3-1.5,0.8-2.1C3.8,5.8,3.6,5,4,3.9c0,0,0.6-0.2,2.1,0.8C6.7,4.5,7.4,4.5,8,4.5c0.7,0,1.3,0.1,1.9,0.3 c1.5-1,2.1-0.8,2.1-0.8c0.4,1.1,0.2,1.8,0.1,2c0.5,0.5,0.8,1.2,0.8,2.1c0,3-1.9,3.6-3.6,3.8C9.6,12,10,12.5,10,13.2V14.5z"/>
</svg>
<span class="button-label">Clone it on GitHub</span>
</a>
</div>
</div>
<div class="section">
<h2>Quickstart</h2>
<p>Getting started with the SDK is simple. After <a href="http://developers.box.com">creating a Box developer
account</a>, simply generate a new developer token and paste it into the example below. Running it will print
out a list of the files and folders in your Box account.</p>
<pre class="code">
<span class="keyword">var</span> BoxSDK <span class="operator">=</span> <span class="keyword">require</span>(<span class="string">"your-developer-token"</span>);
<span class="keyword">var</span> sdk <span class="operator">=</span> <span class="keyword">new</span> BoxSDK({clientID: <span class="string">"CLIENT_ID"</span>, clientSecret: <span class="string">"CLIENT_SECRET"</span>});
<span class="keyword">var</span> client <span class="operator">=</span> sdk.getBasicClient(<span class="string">"your-developer-token"</span>);
client.folders.getItems(<span class="string">"0"</span>, {limit: <span class="string">1000</span>})
.then(items => console.log(items))
.catch(error => console.log("Error:", error));</pre>
<p>
Check out the <a href="https://github.com/box/box-node-sdk/blob/main/README.md">README</a> and
<a href="https://github.com/box/box-node-sdk/tree/main/examples/app-auth">sample app</a> for more
information on how to get started.
</p>
</div>
<div class="section">
<h2>Documentation</h2>
<div>
<a class="doc-link" href="http://opensource.box.com/box-node-sdk/jsdoc/">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 43.4" class="icon">
<path d="M46 5.3L46 2.7C46 2.7 41.4 0 34.5 0C27.6 0 24 2.5 24 2.5C24 2.5 20.4 0 13.5 0C6.6 0 2 2.7 2 2.7L2 5.3L0 6.4L0 6.4L0 37.8C0 37.8 9.1 34.6 14 34.6C18.9 34.6 24 36.4 24 36.4C24 36.4 29.1 34.6 34 34.6C34.6 34.6 35.3 34.6 36 34.7L36 43.4L39.1 39.4L42 43.4L42 36C46 36.9 48 37.8 48 37.8L48 6.4L48 6.4L46 5.3zM22 29.8C20 29.2 16.8 28.4 14 28.4C9.5 28.4 8 29.2 6 29.8L6 5C6 5 8.2 3.6 14 3.6C17.4 3.6 20 4.4 22 5.9L22 29.8zM42 29.8C40 29.2 38.5 28.4 34 28.4C31.2 28.4 28 29.2 26 29.8L26 5.9C28 4.5 30.6 3.6 34 3.6C39.8 3.6 42 5 42 5L42 29.8z"/>
</svg>
JSDocs
</a>
<a class="doc-link" href="https://github.com/box/box-node-sdk/tree/main/docs/authentication.md">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 52.1" class="icon">
<path d="M40.7 22L38 22L38 12C38 5.8 32.2 0 26.1 0L15.9 0C9.8 0 4 5.8 4 12L4 14L12 14L12 12C12 9.2 13.3 8 16 8L26 8C28.7 8 30 9.2 30 12L30 22L1.3 22C0.6 22 0 22.5 0 23.2L0 50.9C0 51.5 0.6 52.1 1.3 52.1L40.7 52.1C41.4 52.1 42 51.6 42 50.9L42 23.2C42 22.5 41.4 22 40.7 22zM23 36.9L23 42C23 42.6 22.6 43 22 43L20 43C19.4 43 19 42.6 19 42L19 36.9C17.8 36.2 17 34.9 17 33.5C17 31.3 18.8 29.5 21 29.5C23.2 29.5 25 31.3 25 33.5C25 34.9 24.2 36.2 23 36.9z"/>
</svg>
Authentication
</a>
<a class="doc-link" href="https://github.com/box/box-node-sdk/tree/main/docs/files.md">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 48" class="icon">
<path d="M38 14L38 47C38 47.6 37.6 48 37 48L1 48C0.4 48 0 47.6 0 47L0 1C0 0.4 0.4 0 1 0L24 0L24 13C24 13.6 24.4 14 25 14L38 14zM26 0L26 11C26 11.6 26.4 12 27 12L38 12L26 0z"/>
</svg>
Files
</a>
<a class="doc-link" href="https://github.com/box/box-node-sdk/tree/main/docs/folders.md">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 44" class="icon">
<path d="M48 14L48 42C48 43.1 47.1 44 46 44L2 44C0.9 44 0 43.1 0 42L0 14C0 12.9 0.9 12 2 12L46 12C47.1 12 48 12.9 48 14zM46 10L46 6C46 4.9 45.1 4 44 4L23.3 4L22.6 1.9C22.3 0.9 21.1 0 20 0L10 0C8.9 0 7.7 0.9 7.4 1.9L6.7 4L4 4C2.9 4 2 4.9 2 6L2 10L46 10z"/>
</svg>
Folders
</a>
<a class="doc-link" href="https://github.com/box/box-node-sdk/blob/main/docs/README.md">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 43.4" class="icon">
<path d="M46 5.3L46 2.7C46 2.7 41.4 0 34.5 0C27.6 0 24 2.5 24 2.5C24 2.5 20.4 0 13.5 0C6.6 0 2 2.7 2 2.7L2 5.3L0 6.4L0 6.4L0 37.8C0 37.8 9.1 34.6 14 34.6C18.9 34.6 24 36.4 24 36.4C24 36.4 29.1 34.6 34 34.6C34.6 34.6 35.3 34.6 36 34.7L36 43.4L39.1 39.4L42 43.4L42 36C46 36.9 48 37.8 48 37.8L48 6.4L48 6.4L46 5.3zM22 29.8C20 29.2 16.8 28.4 14 28.4C9.5 28.4 8 29.2 6 29.8L6 5C6 5 8.2 3.6 14 3.6C17.4 3.6 20 4.4 22 5.9L22 29.8zM42 29.8C40 29.2 38.5 28.4 34 28.4C31.2 28.4 28 29.2 26 29.8L26 5.9C28 4.5 30.6 3.6 34 3.6C39.8 3.6 42 5 42 5L42 29.8z"/>
</svg>
Other Methods
</a>
</div>
</div>
</body>
</html>