nagg API

The API allows you to create tests, manage links, and view analytics all from your own application!

Access

Have a nagg account? Perfect. Request API acesss from your dashboard.

Basics

API methods are available with simple GET or POST requests from your browser or application. The resulting response body will always be presented to you as a JSON object.

Authentication

Request URL: http://na.gg/api.php

Parameters:

Methods

Parameters:

Options:

Add

Parameters:

Rules:

Response:

PHP Example:

			<?php
			$url = 'http://na.gg/api.php?';
            $request = array(
            'email'			=>	'frank@redhot.com',
            'password'		=>	'cupcake',
            'method'		=>	'add',
            'url[1]'		=>	'http://thechive.com',
            'percent[1]'	=>	'50',
            'url[2]'		=>	'http://theberry.com',
            'percent[2]'	=>	'50',
            'path'			=>	'chive',
            'key'			=>	'1234'
            );
            foreach($request as $k => $v)
            {
            	$url .= $k.'='.$v.'&';
			}
			$result = file_get_contents($url);
            $result = json_decode($result);
            echo '
';
            print_r($result);
            echo '
'; // You can access the elements of the response by simply doing the following: $responseMessage = $result->Response->Message; // You're able to do this because you used "json_decode" on the $result. // To get your nagg URL, simply do: $naggUrl = $result->Response->Link; ?>