/
index.html.liquid
181 lines (162 loc) · 5.92 KB
/
index.html.liquid
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
<header class="jumbotron page-header">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1> </h1>
</div>
</div>
</div>
</header>
{% if current_user and current_account.applications.size == 0 %}
{% if current_user.sections.size > 0 %}
{% include 'group_membership_plans' %}
{% else %}
{% include 'custom_field_plans' %}
{% endif %}
{% elsif current_user %}
<section class="start">
<div class="container">
<div class="row">
<div class="col-md-6">
<h1>Lets get started</h1>
<p class="lead">
I will obey your orders. I will serve this ship as First Officer. And in an attack against the Enterprise, I will die with this crew. But I will not break my oath of loyalty to Starfleet. and attack the Romulans. But the probability of making a six is no greater than that of rolling a seven. I'll alert the crew.
</p>
</div>
<div class="col-md-6" style="padding-top:2em;">
<div class="panel panel-default" id="access-details">
<div class="panel-heading">
<i class="fa fa-key"></i>
Credentials
{% if current_account.applications.size > 0 %}
<a class="pull-right" href="{{ urls.applications }}" title="Applications">
<i class="fa fa-chevron-right"></i>
</a>
{% endif %}
</div>
<div class="panel-body panel-footer">
{% if current_account.applications.size == 1 %}
{% assign app = current_account.applications.first %}
{% if app.user_key_mode? %}
<dl class="dl-horizontal">
<dt>App name</dt>
<dd><a href="{{ app.url }}">{{ app.name }}</a></dd>
<dt>Key</dt>
<dd>
<code>{{ app.user_key }}</code>
<p>Add this as a <code>user_key</code> parameter to your API calls to authenticate.</p>
</dd>
</dl>
{% elsif app.app_id_mode? %}
<dl class="dl-horizontal">
<dt>App name</dt>
<dd><a href="{{ app.url }}">{{ app.name }}</a></dd>
<dt>App ID</dt>
<dd><code>{{ app.application_id }}</code></dd>
<dt>Key</dt>
<dd><code>{{ app.keys.first }}</code></dd>
</dl>
{% elsif app.oauth_mode? %}
<dl class="dl-horizontal">
<dt>App name</dt>
<dd><a href="{{ app.url }}">{{ app.name }}</a></dd>
<dt>Client ID</dt>
<dd><code>{{ app.application_id }}</code></dd>
<dt>Client Secret</dt>
<dd><code>{{ app.keys.first }}</code></dd>
</dl>
{% endif %}
{% if app.trial? %}
<div class="alert alert-warning">
<h3>Trial period</h3>
<p>{{ app.remaining_trial_period_days }} days remaining.</p>
</div>
{% endif %}
{% elsif current_account.applications.size > 1 %}
<a href="{{ urls.applications }}" class="btn btn-primary">See your Applications & their credentials</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</section>
{% else %}
<section class="sell">
<div class="container">
<div class="row">
<div class="col-md-4">
<h3>Register</h3>
<p>
<i class="fa fa-sign-in fa-3x pull-left"></i> Register to the developer portal to use the Echo API
</p>
</div>
<div class="col-md-4">
<h3>Get your API key</h3>
<p>
<i class="fa fa-key fa-3x pull-left"></i> Use your API key to authenticate and report the calls you make
</p>
</div>
<div class="col-md-4">
<h3>Create your app</h3>
<p>
<i class="fa fa-code fa-3x pull-left"></i> Start coding and create awesome applications with the Echo API
</p>
</div>
</div>
</div>
</section>
{% assign multiple_apps = provider.multiple_applications_allowed? %}
<section class="plans" id="plans">
{% if multiple_apps %}
{% include 'multiple_app_signup_form' %}
{% else %}
{% include 'single_app_signup_form' %}
{% endif %}
</section>
<!-- lets remove this from here... -->
{% endif %}
<section class="invert">
<div class="container">
<h1>Run your requests</h1>
<div class="row">
<div class="col-md-12">
<h3><code style="display:block">$ curl -v https://echo-api.3scale.net</code></h3>
<br/>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
Request
</div>
<div class="panel-body panel-footer">
<pre>
> GET / HTTP/1.1
> User-Agent: curl/7.27.0
> Host: https://echo-api.3scale.net/echo
> Accept: */*
>
</pre>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
Response
</div>
<div class="panel-body panel-footer">
<pre>
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=utf-8
< Connection: close
echo
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>