Skip to content

Instantly share code, notes, and snippets.

View subnetmarco's full-sized avatar
🦍
Hiring, Thinking, Coding

Marco Palladino subnetmarco

🦍
Hiring, Thinking, Coding
View GitHub Profile
<api format="JSON">
<authentication type="header">
<description><![CDATA[This is a simple header authentication]]><description>
<parameters>
<parameter name="X-Pippo-Username" optional="false">
<description><![CDATA[Please enter here your username]]></description>
</parameter>
<parameter name="X-Pippo-Password" optional="false">
<description><![CDATA[Please enter here your password]]></description>
<?php
require_once("Bitly.php");
$bitly = new Bitly("MY_PUBLIC_KEY", "MY_PRIVATE_KEY");
// ...
?>
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://mashape.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mashape.com http://mashape.com/schema/mashape-api-3.0.xsd">
<method name="Get User" http="GET">
<url><![CDATA[/users/{id}]]></url>
<parameters>
<parameter optional="false">id</parameter>
</parameters>
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://mashape.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mashape.com http://mashape.com/schema/mashape-api-3.0.xsd">
<!-- Your methods and objects here -->
</api>
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://mashape.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://mashape.com http://mashape.com/schema/mashape-api-3.0.xsd">
<method name="Get User" http="GET">
<url><![CDATA[/users/{id}]]></url>
<parameters>
<parameter optional="false">id</parameter>
</parameters>
{
"username": "Mark",
"email": "mark@somedomain.com",
"age": 23
}
<object name="User">
<field>username</field>
<field>email</field>
<field>age</field>
</object>
<method name="Get User" http="GET">
<url><![CDATA[/users/{id}]]></url>
<parameters>
<parameter optional="false">id</parameter>
</parameters>
<result object="User"/>
</method>
<object name="User">
<field>username</field>
{
"username": "Mark",
"emails": [
"mark@mashape.com",
"marco@mashape.com"
],
"age": 23,
"comments": [
{
"text": "I like this",
<object name="User">
<field>username</field>
<field>age</field>
<field array="true">emails</field>
<field array="true" object="Comment">comments</field>
</object>
<object name="Comment">
<field>id</field>
<field>text</field>
</object>