Skip to content

Commit ba6dd6b

Browse files
committed
Update demo API and announcements
1 parent e3c42f5 commit ba6dd6b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

views/pages/dashboard.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<div class="announcements">
2626
<h3>Announcements</h3>
2727
<div class="entry">
28-
<span class="title">Welcome to the Beta! - <span class="date" data-date="07-29-2016 12:28:03"></span></span>
29-
<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>
28+
<span class="title">Welcome to the Beta! - <span class="date" data-date="08-04-2016 12:28:03"></span></span>
29+
<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>
3030
</div>
3131
</div>
3232
<div class="ads">

views/pages/index.ejs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
</section>
1515
<section class="tryitout">
1616
<h4>Try it out!</h4>
17-
<pre id="aceEditor" name="code">let age = random.numeric(18, 65);
17+
<pre id="aceEditor" name="code">// Custom user snippet that generates credit card numbers
18+
const cc = require('keith/Credit Card Generator/2');
19+
20+
let age = random.numeric(18, 65);
1821
api.age = age; // Attached to implicit api object
1922
api.phone = phoneNum(); // Calling user defined function
2023

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

30+
api.visa = String(cc('VISA')).match(/.{4}/g).join('-');
31+
2732
function phoneNum(format) {
2833
format = format || "(xxx) xxx-xxxx";
2934
return String(format).split('').map(digit => {
@@ -49,11 +54,11 @@ function phoneNum(format) {
4954
</div>
5055
<div class="one-third column tripleSection">
5156
<h4 class="tripleTitle">Powerful</h4>
52-
<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>
57+
<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>
5358
</div>
5459
<div class="one-third column tripleSection">
5560
<h4 class="tripleTitle">Sharing</h4>
56-
<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>
61+
<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>
5762
</div>
5863
</div>
5964
</section>

0 commit comments

Comments
 (0)