- Design considerations: dates in ISO 8601, Caching, Errors, JSONP, Pagination, Selection, Introspection,
- Realtime updates
- Authentication & Authorization
- JS SDK
- What can I do through the APIs?
- Get in contact
- How can I help?
- How can I create my own app?
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
import grails.plugins.selenium.SeleniumTest | |
@Mixin(SeleniumTest) | |
class SomeTests extends GroovyTestCase { | |
void testHomepageLoads() { | |
selenium.open "$contextPath/" | |
assertTrue selenium.isTextPresent("Welcome to Graildsdss") | |
} | |
} |
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
grails.project.class.dir = "target/classes" | |
grails.project.test.class.dir = "target/test-classes" | |
grails.project.test.reports.dir = "target/test-reports" | |
//grails.project.war.file = "target/${appName}-${appVersion}.war" | |
grails.project.dependency.resolution = { | |
// inherit Grails' default dependencies | |
inherits( "global" ) { | |
// uncomment to disable ehcache | |
// excludes 'ehcache' | |
} |
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
story "As a consumer I want to get details of a user so I can show the user information in my own site", { | |
scenario "Get user information anonymously without filtering", { | |
def facebook = new groovyx.net.http.RESTClient("https://graph.facebook.com/") | |
def response = facebook.get(path:"jleibiusky") | |
assert response.status == 200 | |
assert response.data.name == "Jonathan Leibiusky" | |
assert response.data.first_name == "Jonathan" | |
} | |
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
package questions | |
class QuestionsController { | |
// GET /customers/$id/questions/pending/items | |
def customerItemsWithPendingQuestions = { | |
def items = Item.findAllByPendingQuestionsGreaterThan(0) | |
render items as JSON | |
} | |
// GET /items/$id/questions/pending |
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> | |
<meta content="text/html; charset=UTF-8" http-equiv="content-type"> | |
</head> | |
<body> | |
<p>Por sesión: <span id="session"></span></p> | |
<p>Por sitio: <span id="site"></span></p> | |
<script> |
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
server { | |
listen 8080; | |
server_name xxx.yyy.com; | |
location / { | |
error_page 500 502 503 @fallback; | |
proxy_pass http://upstream1; | |
} | |
location @fallback { | |
proxy_pass http://upstream2; |
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
function isPrime(n) { | |
if (n<2) return false; | |
if (n==2) return true; | |
for (var i=2; i<n; i++) { if (n%i==0) return false; } | |
return true; | |
} |
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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<script> | |
$(document).ready(function() { | |
$.ajax({url:"https://api.mercadolibre.com/sites", dataType:"json"}).done(function(data) {console.log(data);}).fail(function(){console.log("error")});}); | |
</script> | |
</body> |
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
- Todos los campos de texto soportarán markdown | |
Estructura General: | |
{ | |
name: "", //nombre del recurso | |
description: "", //descripción general del recurso | |
considerations: [], //consideraciones a tener en cuenta. es un array de strings. pueden ser reglas de negocio, etc. | |
attributes: {}, // información de los atributos | |
methods: {}, //métodos permitidos y ejemplos de cosas que se pueden hacer con cada uno |
OlderNewer