Mashup Macros



We've taken our best Mashup Macros, as well as examples contributed by Mashup Developer Community members, and put them here for you to reuse. If you have a Mashup Macro, you might want to enter the Share Your Mashup Macro Contest (and earn some cash for your work).

Mashup Macro - Fibonacci Number Generator

Posted 08/05/2009 - 16:09 by Blythe

This Mashup Macro accepts a Fibonacci sequence number as input and then outputs the corresponding Fibonacci number.

The Incas used them.  They are over 3,000 years old.  Now you can get them from a simple Mashup Macro.  For those of you that want the whole story on Fibonacci numbers, I suggest you read up: http://en.wikipedia.org/wiki/Fibonacci_number [Read More...]

Mashup Macro - Fusion Chart Formatter

Posted 08/05/2009 - 15:47 by Blythe

This Mashup Macro takes repeating data from any service and produces a standard format that can be instantantly visualized in all (single series) Fusion Charts.  [Read More...]

Mashup Macro - Add Latitude/Longitude

This macro 'geotags' (i.e. adds latitude and longitude values) the mashup based upon any type of geographic information including zip code, city/state/country, or places of interest.

One note: To get this macro to work, you must first register 'http://ws.geonames.org/postalCodeSearch?postalcode=20816&country=US' as a Presto service and name it 'geonames'.  (You can read more about the geonames service at http://www.geonames.org.)  [Read More...]

Mashup Macro - Add/Subtract/Multiply/Divide

This is a basic mashup macro that let's the user use a mathematical operator (add, subtract, multiply, divide) between a selected field from 2 mashup inputs.  

The example below shows multiply.  Modify the operator in this line for add, subtract, or divide: 'array[count][nodeName] = array[count][lhsVar] * array[count][rhsVar];'. [Read More...]

An Introduction to Mashup Macros - How to Create a Custom Macro in Presto Wires

Posted 10/23/2008 - 13:49 by Americo Savinon

In this example I am going to show you how you can create a custom Wires action using EMML Macros.

You can think of a Macro as a normal function on any programming language, this function recieves some parameters, process them and then returns a result. Macros work in the same way as normal functions but they run on EMML.  [Read More...]