Skip to content

Instantly share code, notes, and snippets.

@elisedeux
elisedeux / Linkurious_SDK_Ex3.js
Last active April 4, 2017 08:38
Retrieving nodes list and displaying the result
// Use the REST API to search for a term
function searchCustomer(term) {
// Configure and send the Ajax query asynchronously.
$.ajax({
type: "GET",
// REST method url
url: "http://localhost:3000/api/1cf9e65b/search/nodes/full",
// Define the authentication information.
headers: {
@elisedeux
elisedeux / Linkurious_SDK_Ex2.js
Last active April 4, 2017 08:38
A query to find and display the shortest path between two nodes using Linkurious REST API.
// Use the REST API to get the shortest path between two customers and render in Ogma
function shortestPath(customer1, customer2) {
// Configure and send the Ajax query asynchronously.
$.ajax({
type: "GET",
// Define the authentication information.
headers: {
"Content-Type": "application/json",
"Authorization": "Basic " + btoa('root@root.com:6160b54b872459ce1c06c1a8ccdd9019')
@elisedeux
elisedeux / Linkurious_SDK_Ex1.js
Last active April 4, 2017 08:37
Querying the Linkurious Graph API and displaying the result as a graph visualization with Ogma.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./lib/ogma.min.js"></script>
<script src="./lib/jquery-3.1.1.min.js"></script>
<style>
#graph-container {
width: 300px;