Skip to content

Instantly share code, notes, and snippets.

View heridev's full-sized avatar
🌠
Exploring GraphQL with the Github explorer

Heriberto Magaña heridev

🌠
Exploring GraphQL with the Github explorer
View GitHub Profile
@heridev
heridev / gist:9256948
Last active February 3, 2023 14:09
Spree, spree api, spree routes, Spree Routes, routes spree, endpoints spree, spree endpoints, api spree, spree api, api queries

More examples using spree demo on heroku

curl -d 'spree_user[email][email protected]&spree_user[password]=spree123' http://spree-demo-store.herokuapp.com/api/v1/authorizations

curl -i -H "X-Spree-Token: 5e06dc07fda2b1e4b6ba792ba18e5d964d567cf33a575f55" http://spree-demo-store.herokuapp.com/api/products.json

curl -i -H "X-Spree-Token: 5e06dc07fda2b1e4b6ba792ba18e5d964d567cf33a575f55" http://spree-demo-store.herokuapp.com/api/products/706676762.json

// Requests for users type customer that have been used the public registration to the store
@heridev
heridev / gist:8985406
Created February 13, 2014 22:39
Probar funcionalidad de api en rails con ajax
Para generar un nuevo token desde la api usamos lo siguiente:
var server = 'http://localhost:3000';
var userAuthUrl = server + '/api/sessions/create?access_token=';
$.ajax({
url: userAuthUrl + access_token,
success: function(resp) {
console.log(resp);
}
@heridev
heridev / gist:8793914
Created February 3, 2014 22:37
Css para bootstrap-glyphicons
[class^="icon-"],
[class*=" icon-"] {
display: inline-block;
/*width: 14px;
height: 14px;*/
width: 32px;
height: 32px;
margin-top: 1px;
margin-right: .3em;
/*line-height: 14px;*/