Permalink
Browse files

Renamed 'image.json' in 'image-json' API.

  • Loading branch information...
marcomontalbano committed Sep 15, 2018
1 parent babd30c commit 14be74e33af8e60ee26e39f07d45bdd7014250cd
Showing with 3 additions and 5 deletions.
  1. +2 −2 src/index.html
  2. +1 −1 src/index.js
  3. +0 −2 src/lambda/{image.json.js → image-json.js}
View
@@ -99,7 +99,7 @@ <h2>Features</h2>
<h2>API</h2>
<section>
<pre class="language"><code class="language"><span class="token punctuation"><span class="method">[GET]</span> <span class="url">https://video-to-markdown.netlify.com/.netlify/functions/<b>image.json</b></span>?<span class="param-name">url</span>=<span class="param-value">{video-url}</span></span></code></pre>
<pre class="language"><code class="language"><span class="token punctuation"><span class="method">[GET]</span> <span class="url">https://video-to-markdown.netlify.com/.netlify/functions/<b>image-json</b></span>?<span class="param-name">url</span>=<span class="param-value">{video-url}</span></span></code></pre>
<p>
<pre class="language-javascript"><code>{
"provider": "youtube",
@@ -109,7 +109,7 @@ <h2>API</h2>
}</code></pre>
</p>
<p>
The <code>image.json</code> API accept only one <code><b class="param-name">url</b></code> parameter.<br />
The <code>image-json</code> API accept only one <code><b class="param-name">url</b></code> parameter.<br />
The value <code><b class="param-value">{video-url}</b></code> is a video url <small>(e.g. <a href="https://youtu.be/aqz-KE-bpKQ" rel="nofollow" target="_blank">https://youtu.be/aqz-KE-bpKQ</a>)</small>
</p>
</section>
View
@@ -56,7 +56,7 @@ $('form').on('submit', function(e) {
const title = $form.find('[name="title"]').val();
const videoUrl = $form.find('[name="url"]').val();
const lambdaUrl = `${location.protocol}//${location.host}/.netlify/functions`;
const jsonUrl = `${lambdaUrl}/image.json?url=${videoUrl}`;
const jsonUrl = `${lambdaUrl}/image-json?url=${videoUrl}`;
const imageUrl = `${lambdaUrl}/image?url=${videoUrl}`;
if (videoUrl_memo === videoUrl) {
@@ -1,8 +1,6 @@
import fileType from 'file-type';
import VideoWrapper from './classes/VideoWrapper';
const isDevelopment = process.env.NODE_ENV === 'development';
const throwException = (statusCode, message, callback) => {
callback = callback || (() => {});
const error = {

0 comments on commit 14be74e

Please sign in to comment.