1.6 KiB
Code Sharing Platform
Web service to store syntax highlighted code snippets generating unique identifiers with the added possibility of configure its self-deletion based on time and views limitations.
There are two possible interfaces: API and web. The API interface returns data as JSON, while the web interface uses HTML, JS, and CSS.
Web interface endpoints
-
GET /should return the starting page: -
GET /code/newshould return the page that allows to save a new snippet: -
GET /code/UUIDshould return the page with associated code snippet: -
GET /code/latestshould return the page with 10 most recently uploaded unrestricted code snippets:
API interface endpoints
-
GET /api/code/newshould take a JSON object with a fieldcodeand two other fields:1.
timefield containing the time (in seconds) during which the snippet is accessible.2.
viewsfield containing a number of views allowed for this snippet.And return JSON with a single field id:
-
GET /api/code/UUIDshould return a JSON object with associated code snippet: -
GET /api/code/latestshould return a JSON array the 10 most recently uploaded unrestricted code snippets:






