Skip to content

Commit

Permalink
Update demo API and announcements
Browse files Browse the repository at this point in the history
  • Loading branch information
keitharm committed Aug 5, 2016
1 parent e3c42f5 commit ba6dd6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions views/pages/dashboard.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<div class="announcements">
<h3>Announcements</h3>
<div class="entry">
<span class="title">Welcome to the Beta! - <span class="date" data-date="07-29-2016 12:28:03"></span></span>
<p>Thanks for trying out the beta!<br><br>If you have any questions, feedback, etc. send an email to <a href="mailto:[email protected]" class="green">[email protected]</a>.<br><br>Thanks!<br>- Keith</p>
<span class="title">Welcome to the Beta! - <span class="date" data-date="08-04-2016 12:28:03"></span></span>
<p>Thanks for trying out the beta!<br><br>Just a few things to note:<br>Former RandomAPI users: If you upgraded your account during the old beta, you'll be receiving an email<br>next week with information on how your old subscription will be transferred over to your new account.<br><br>As for everyone else, if you have any questions, feedback, etc. send an email to <a href="mailto:[email protected]" class="green">[email protected]</a>.<br><br>Thanks!<br>- Keith</p>
</div>
</div>
<div class="ads">
Expand Down
11 changes: 8 additions & 3 deletions views/pages/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
</section>
<section class="tryitout">
<h4>Try it out!</h4>
<pre id="aceEditor" name="code">let age = random.numeric(18, 65);
<pre id="aceEditor" name="code">// Custom user snippet that generates credit card numbers
const cc = require('keith/Credit Card Generator/2');

let age = random.numeric(18, 65);
api.age = age; // Attached to implicit api object
api.phone = phoneNum(); // Calling user defined function

Expand All @@ -24,6 +27,8 @@ api.favoriteColor = list([
'violet'
]);

api.visa = String(cc('VISA')).match(/.{4}/g).join('-');

function phoneNum(format) {
format = format || "(xxx) xxx-xxxx";
return String(format).split('').map(digit => {
Expand All @@ -49,11 +54,11 @@ function phoneNum(format) {
</div>
<div class="one-third column tripleSection">
<h4 class="tripleTitle">Powerful</h4>
<p class="tripleInfo">You have complete control over the output of your API. Whether your API has complicated conditions or takes advantage of a published snippet, </p>
<p class="tripleInfo">You have complete control over the output of your API. Whether your API has complicated logic and conditions or takes advantage of a published snippet, the output can be custom tailored to your liking thanks to Javascript.</p>
</div>
<div class="one-third column tripleSection">
<h4 class="tripleTitle">Sharing</h4>
<p class="tripleInfo">Did you create an awesome piece of code that you think would be helpful for others to use in their APIs? We have snippets! Think of it like NPM modules for APIs.</p>
<p class="tripleInfo">Did you create an awesome piece of code that you think would be helpful for others to use in their APIs? We have <a class='green' href="documentation#snippets" target="_blank">snippets</a>! Think of it like NPM modules for APIs. Check out our Snippet browser <a class='green' href="search" target="_blank">here</a> and search for credit card for example.</p>
</div>
</div>
</section>
Expand Down

0 comments on commit ba6dd6b

Please sign in to comment.