This file contains hidden or 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 Ember from "ember"; | |
export default Ember.Object.extend({ | |
open: function(authentication){ | |
var userId = authentication.userId; | |
var token = authentication.accessToken; | |
var store = this.get('store'); | |
return new Ember.RSVP.Promise(function(resolve, reject){ | |
Ember.$.ajax({ | |
type: "POST", |
This file contains hidden or 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 ng-app="ChinookApp"> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script> | |
<script src="libs/angular-resource.min.js"></script> | |
<script src="app.js" type="text/javascript"></script> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<link rel="stylesheet" href="app.css"> |
This file contains hidden or 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
require 'spec_helper' | |
describe Api::ElementsController do | |
let!(:user) { FactoryGirl.create(:user) } | |
let(:fire) { FactoryGirl.create(:element, name: "fire") } | |
let(:uber_fire) { FactoryGirl.create(:element, name: "uber fire") } | |
let(:vesuvius) { FactoryGirl.create(:element, name: "vesuvius", parents: [fire, uber_fire, fire]) } | |
let(:kolumbo) { FactoryGirl.create(:element, name: "kolumbo", parents: [fire, uber_fire, fire]) } |
This file contains hidden or 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
## post an edge | |
curl -d "" -v http://localhost:8182/graphs/dexsample/edges?_outV=1024\&_inV=1025\&_label=friend | |
curl -v -X POST -H "Content-Type:application/json" -d '{name:"willa"}' http://localhost:8182/graphs/tinkergraph/vertices/100 | |
curl -v -d 'age=(integer,100)' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1 | |
curl -v -d 'age=(list,((i,100)))' -X POST http://localhost:8182/graphs/tinkergraph/vertices/1 | |
curl -v -X POST -H "Content-Type:application/json" -d '{"script":"g.v(1)"}' http://localhost:8182/graphs/tinkergraph/tp/gremlin |