-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrest.html
125 lines (113 loc) · 6.03 KB
/
rest.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
<!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 - REST API Examples">
<meta name="author" content="Roger Urscheler">
<link rel="shortcut icon" type="image/png" href="images/restapi-favicon.png"/>
<title>Circuit API REST 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>REST API</h1>
<p>In terms of authentication, the REST API supports OAuth2 and Basic Authentication. Webhooks are also supported for asynchronous events. WebRTC is not supported with the REST API, use the JS SDK for WebRTC.</p>
<a href="https://circuitsandbox.net/rest/v2/swagger/ui/index.html" target="_blank" class="btn btn-default">API Documentation</a>
<a href="https://circuitsandbox.net/rest/v2/swagger" target="_blank" class="btn btn-default">Swagger Definition</a>
<br><br>
<p>See <a href="oauth.html">OAuth 2.0</a> for information on how to register an app.</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/webserver-example" target="_blank">
<img class="img-responsive" src="/images/rest-oauth-app.jpg" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>node.js web app w/ OAuth</h5>
<p>node.js web app to access the REST API. Shows how to authenticate using OAuth2 without any library and then perform REST calls.</p>
<a href="https://github.com/circuit/webserver-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/circuit-REST-bot" target="_blank">
<img class="img-responsive" src="/images/webhooks.png" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>OAuth, REST & Webhooks</h5>
<p>This is an example bot that uses RESTful API calls to monitor a conversation on Circuit. The bot will log the most recent items in the conversation, post a new item once it is listening, and then log any new items posted in the conversation.</p>
<a href="https://github.com/circuit/circuit-REST-bot" 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/trivia" target="_blank">
<img class="img-responsive" src="/images/trivia.png" alt="">
</a>
</div>
<div class="panel-body">
<h5><i class="fa fa-fw fa-check"></i>REST API, DialogFlow, Cloud Functions</h5>
<p>A trivia game for Circuit written with Google Cloud Functions, Google Cloud Datastore, DialogFlow and the Circuit REST API.</p>
<a href="https://github.com/circuit/trivia" target="_blank" class="btn btn-default">Source</a>
</div>
</div>
</div>
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<p></p>
</div>
</div>
</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>