ccbikai / Sink

⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
https://sink.cool
GNU Affero General Public License v3.0
1.42k stars 501 forks source link

API #14

Open dcdebug opened 2 weeks ago

dcdebug commented 2 weeks ago

not support the api ? example : a url request the api then return a shorturl .

ccbikai commented 2 weeks ago

It's already supported, but not yet stable written, you can refer to this command line first

curl 'https://sink.cool/api/link/create' \
  -H 'authorization: Bearer SinkCool' \
  -H 'content-type: application/json' \
  --data-raw '{"url":"https://github.com/ccbikai/Sink/issues/14"}'
tomcollis commented 2 weeks ago

@ccbikai Thank you, can you specify the slug in the json?