Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
181 lines (162 sloc) 5.92 KB
<header class="jumbotron page-header">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1> &nbsp; </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>
&gt; GET / HTTP/1.1
&gt; User-Agent: curl/7.27.0
&gt; Host: https://echo-api.3scale.net/echo
&gt; Accept: */*
&gt;
</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>
&lt; HTTP/1.1 200 OK
&lt; Content-Type: text/plain; charset=utf-8
&lt; Connection: close
echo
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>