-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnodejs.html
182 lines (163 loc) · 9.09 KB
/
nodejs.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1">
<meta name="description" content="Circuit Developer Community - Node.js Examples">
<meta name="author" content="Roger Urscheler">
<link rel="shortcut icon" type="image/png" href="images/nodejs-favicon.png"/>
<title>Circuit API Node.js SDK Examples</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script>
if (window.location.host == 'circuit.github.io' && window.location.protocol != 'https:') {
window.location.protocol = 'https:';
}
</script>
</head>
<body>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper"></div>
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1>Node.js SDK</h1>
<p>The Node.js SDK is usually used in two types of applications:</p>
<ul>
<li>
<b>Bots</b> using OAuth 2.0 Client Credentials grant. Authenticate using <code>client_id</code> and <code>client_secret</code>. E.g. xlator-bot or node-sdk-example
</li>
<li>
<b>Server-side web applications</b> using OAuth 2.0 Authorization Grant. Authentication and token management done on the server. Logon via Node.JS SDK using the <code>accessToken</code>. E.g. node-linkify or circuit-google-assistant
</li>
</ul>
<p>The Node.js SDK is identical to the JS SDK, but does not support first-party WebRTC APIs. It does support WebRTC related APIs in which the app does no act as WebRTC endpoint (e.g. starting a conference, dialing out a number or user on behalf of the logged in user, recording).</p>
<a href="https://circuitsandbox.net/sdk" target="_blank" class="btn btn-default">API Documenation</a>
<a href="https://www.npmjs.com/package/circuit-sdk" target="_blank" class="btn btn-default">npm</a><br><br>
</div>
</div>
<!-- Examples -->
<div class="row">
<!-- Page Header -->
<div class="col-lg-12">
<h2 class="page-header">Usage</h2>
</div>
<!-- /.row -->
<div class="col-lg-12">
<p><code>npm install --save circuit-sdk</code></p>
<p>More information at <a href="https://www.npmjs.com/package/circuit-sdk">https://www.npmjs.com/package/circuit-sdk</a></p>
</div>
</div>
<!-- Examples -->
<div class="row">
<!-- Page Header -->
<div class="col-lg-12">
<h2 class="page-header">Examples</h2>
</div>
<!-- /.row -->
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<a href="https://github.com/circuit/node-linkify" target="_blank">
<img class="img-responsive" src="/images/node-linkify.jpg" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>node-linkify</h5>
<p>Web server app to modify text messages on behalf of a user. Uses OAuth2 REST API and JavaScript SDK.</p>
<a href="https://github.com/circuit/node-linkify" target="_blank" class="btn btn-default">Source</a>
<a href="videos/node-linkify.webm" target="_blank" class="btn btn-default">Demo video</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<a href="https://github.com/circuit/node-sdk-example" target="_blank">
<img class="img-responsive" src="/images/node-sdk-example.jpg" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>node-sdk-example</h5>
<p>Introduction example. Shows how to logon to circuit, register for events, lookup a conversation, send a message, attach files to a message, send a comment.</p>
<a href="https://github.com/circuit/node-sdk-example" target="_blank" class="btn btn-default">Source</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<a href="https://github.com/circuit/xlator-bot" target="_blank">
<img class="img-responsive" src="/images/xlator-bot.jpg" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>xlator-bot</h5>
<p>This sample application shows how to receive Circuit Conversation updates and how to send Circuit conversation items with the circuit node SDK.</p>
<a href="https://github.com/circuit/xlator-bot" target="_blank" class="btn btn-default">Source</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<a href="https://github.com/circuit/irc-chat-extension" target="_blank">
<img class="img-responsive" src="/images/missing.png" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>irc-chat-extension</h5>
<p>Bot to join IRC channels from circuit.</p>
<a href="https://github.com/circuit/irc-chat-extension" target="_blank" class="btn btn-default">Source</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">
<a href="https://github.com/circuit/node-load-circuit" target="_blank">
<img class="img-responsive" src="/images/missing.png" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>node-load-circuit</h5>
<p>Create conversations and messages using the circuit node SDK. Useful to load the local Circuit system for load testing.</p>
<a href="https://github.com/circuit/node-load-circuit" target="_blank" class="btn btn-default">Source</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<p>more to come...</p>
</div>
</div>
<!-- /.row -->
</div>
</div>
</div>
<!-- /#wrapper -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script>
$(function(){
$("#sidebar-wrapper").load("/sidebar.html");
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-67318539-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>