mirror of
https://github.com/SrIzan10/makesweet-api.git
synced 2026-05-01 10:55:14 +00:00
index.html wasn't added
This commit is contained in:
23
index.html
Normal file
23
index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<h2 id="how-to-use-the-makesweet-api">How to use the makesweet api:</h2>
|
||||
<ol type="1">
|
||||
<li>get a computer</li>
|
||||
<li>get curl</li>
|
||||
<li>send a POST request with things in it</li>
|
||||
<li>receive a response</li>
|
||||
<li>do whatever you want with it.</li>
|
||||
</ol>
|
||||
<p>examples (assuming MAKESWEET_API is set as env var):</p>
|
||||
<hr />
|
||||
<p>send only text (use &text for more text):</p>
|
||||
<pre><code>curl -H "Authorization: key" -XPOST https://api.makesweet.com/make/heart-locket?text=hello -o hello.gif</code></pre>
|
||||
<hr />
|
||||
<p>send only images (for multiple images, repeat with another -F):</p>
|
||||
<pre><code>curl -H "Authorization: key" -XPOST https://api.makesweet.com/make/heart-locket -F "images[]=@image.jpg" -o animation.gif</code></pre>
|
||||
<hr />
|
||||
<p>send both text and images:</p>
|
||||
<pre><code>curl -H "Authorization: key" -XPOST https://api.makesweet.com/make/heart-locket?text=squirrel -F "images[]=@image.jpg" -o animation.gif</code></pre>
|
||||
<hr />
|
||||
<p>send stuff with text border:</p>
|
||||
<pre><code>curl -H "Authorization: key" -XPOST "https://api.makesweet.com/make/heart-locket?text=a+frog,%0Aa+very,+very+coolfrog&textborder=200" -F images=@frog.jpg -o frog.gif</code></pre>
|
||||
<hr />
|
||||
<p>the default is images go before text, use &textfirst=1 to make text go first.</p>
|
||||
Reference in New Issue
Block a user