Created
January 26, 2018 23:52
-
-
Save parzibyte/06fd3b973dcefae9912e059a8115ea71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<h1>API de binbox.io</h1> | |
<p id="parrafoResultados">Aquí aparecerán los resultados en caso de que todo vaya bien :)</p> | |
<script type="text/javascript" src="http://binbox.io/api.js"></script> | |
<script type="text/javascript"> | |
//Aquí pondremos el código | |
var BB = new Binbox.API("http://parzibyte.binbox.io/"); | |
var parrafoResultados = document.querySelector("#parrafoResultados"); | |
BB.create({ | |
title: "Este es el título del paste", | |
text: "Hola mundo :)" | |
}, function(resultados) { | |
if (resultados.ok) { | |
parrafoResultados.innerHTML = "Paste creado correctamente. Visítalo en: https://binbox.io/" + resultados.id + "#" + resultados.salt; | |
} else { | |
parrafoResultados.innerHTML = "Ups, algo salió mal. El error es: " + resultados.error; | |
} | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment