Skip to content

Instantly share code, notes, and snippets.

View kaisteel's full-sized avatar

Kaustubh Damle kaisteel

View GitHub Profile
@kaisteel
kaisteel / page.xml
Last active April 7, 2017 09:20
Pagination example with Metamug resource file
<?xml version="1.0" encoding="UTF-8" ?>
<Resource xmlns="http://xml.metamug.net/resource/1.0" v="1.0">
<Request method="GET">
<Desc>Request to display a single page.
User needs to calculate offset = limit + offset
for each subsequent request. Offset is 900 i.e There are 1000 records.
Limit being 100, Page size cannot be more than 100.
</Desc>
<Param name="limit" type="number" min="0" max="100"/>
<Param name="offset" type="number" min="0" max="900"/>
@kaisteel
kaisteel / resource.xml
Last active March 14, 2017 18:47
Metamug Resource file
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns="http://xml.metamug.net/resource/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xml.metamug.net/resource/1.0 http://xml.metamug.net/schema/resource.xsd"
v="1.0">
<Desc>This is public resource file for demonstration</Desc>
<Request method="GET">
<Desc>
Add two positive numbers. Parameters $a and $b are checked to be numbers
before being processed by sql.