Skip to content

Instantly share code, notes, and snippets.

View earth2marsh's full-sized avatar

Marsh Gardiner earth2marsh

View GitHub Profile
@earth2marsh
earth2marsh / Sample Payloads.xml
Last active December 26, 2015 04:28
This is an example for how you define the primary tag (like a category), a public/private tag, a sample request payload, a simple html table describing the request payload elements, and a simple table describing the response payload elements. (We'll be adding sample responses in the near future!)
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:apigee="http://api.apigee.com/wadl/2010/07/" xmlns="http://wadl.dev.java.net/2009/02"xmlns:t="urn:simplegeo:simplegeoresponse"xsi:schemaLocation="http://wadl.dev.java.net/2009/02 http://apigee.com/schemas/wadl-schema.xsd http://api.apigee.com/wadl/2010/07/ http://apigee.com/schemas/apigee-wadl-extensions.xsd">
<resources base="https://api.enterprise.apigee.com/v1">
<!-- API Proxy-->
<resource path="o/{org_name}/apis">
<param name="baseurl" type="xsd:string" style="template" required="true"default="api.enterprise.apigee.com">
<doc>The top-level domain of the API</doc>
</param>
<param name="version" type="xsd:string" style="template" required="true" default="v1">
<doc>The version of the API</doc>
</param>
$(document).ready(function () {
//first set the org / app path (must be orgname / appname or org id / app id - can't mix names and uuids!!)
var client = new Usergrid.Client({
orgName:'caurelio',
appName:'sandbox',
logging: true, //optional - turn on logging, off by default
buildCurl: true //optional - turn on curl commands, off by default
});
@earth2marsh
earth2marsh / JSON (after)
Created August 20, 2012 23:07
Weather before and after
{
"location": {
"lat": 37.37,
"lon": -122.04,
"name": "Sunnyvale, CA"
},
"timestamp": "Mon, 20 Aug 2012 2:54 pm PDT",
"temp": 69,
"text": "Fair",
"url": "http://weather.yahoo.com/forecast/USCA1116_f.html",
@earth2marsh
earth2marsh / wadl.xml
Created June 21, 2012 18:44
Infogroup
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:apigee="http://api.apigee.com/wadl/2010/07/"
xmlns="http://wadl.dev.java.net/2009/02"
xsi:schemaLocation="http://wadl.dev.java.net/2009/02 http://apigee.com/schemas/wadl-schema.xsd http://api.apigee.com/wadl/2010/07/ http://apigee.com/schemas/apigee-wadl-extensions.xsd">
<!-- Base defines the domain and base path of the endpoint -->
<resources base="https://api.infoconnect.com">
@earth2marsh
earth2marsh / index.html
Created July 27, 2011 22:23
Source Sample App
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Sample Application - Home Timeline</title>
<style>
* { margin: 0; padding: 0; }
:focus { outline: 0; }
html { }
body { background-color: #fff; color: #3c3c3c; font-family: helvetica, arial, sans-serif; font-size: 13px; }
@earth2marsh
earth2marsh / apigee_api.js
Created July 15, 2011 21:31
Apigee Source in progress
/**
* This library depends on jQuery and the base64 jQuery plugin (http://plugins.jquery.com/project/base64)
* Sample Usage:
* Working with the Apigee API
* - Setting up an Apigee account:
* var apigee = new $.apigee_api('https://api.apigee.com');
* apigee.init("earth2marsh","supersecret"); // pwd will be base64 encoded
*
* - Adding an application:
* apigee.request('post','/apps/myappname.json');
/**
* This library depends on jQuery and the base64 jQuery plugin (http://plugins.jquery.com/project/base64)
*/
/**
* Accepts the endpoint (ex: "http://user.apigee.com/") and builds the API Caller object
*/
function ComApigeeApiCaller(endPoint) {
var theCall = this;
/**
@earth2marsh
earth2marsh / index.html
Created March 7, 2011 23:59
Example for passing a URL to an embedded Console
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<script type="text/javascript">
var addEvent = function(obj, type, fn) {
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
} else if (obj.attachEvent) {
@earth2marsh
earth2marsh / WADL Builder
Created January 28, 2011 21:26
index.html
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript"
src="http://angularjs.org/ng/js/angular-debug.js" ng:autobind></script>
</head>
<body>
<script>
// parseUri 1.2.2
@earth2marsh
earth2marsh / index.html
Created December 7, 2010 21:20
A WADL builder
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<script type="text/javascript"
src="http://angularjs.org/ng/js/angular-debug.js" ng:autobind></script>
</head>
<body>
<script>
// parseUri 1.2.2