narnoo/php-sdk

A PHP-SDK for Narnoo API

dev-master 2020-06-26 03:56 UTC

README

The narnoo-php-sdk is a library to interact with Narnoo's RESTFUL API. It performs all the heavy coding work so PHP developers can quickly make calls to our API.

Detailed information about using this API will be added to this page and the repo Wiki.

Work in progress using the latest API

Narnoo.com

Register a user account

Get started with the PHP SDK

Installation

Install our library with composer

composer require narnoo/php-sdk

Authentication

You can find your business API keys from within your business's Narnoo.com account. Only businesses with an approved plan have access to their API keys.

alt text

Once you have your API keys then you can authenticate your API calls and return your bearer token.

<?php
include "vendor/autoload.php";
use Narnoo\Authenticate\Authenticate;

$authen 	= new Authenticate();
$key 		= 'xxxxxxxxxxxx';
$secret 	= 'xxxxxxxxxxxx';
$token 		= $authen->getToken($key,$secret);

//For testing purposes we print out the response. However, you would save this taken to your database for future calls.
echo "<pre>";
print_r($token);
echo "</pre>";
?>

Example Calls

These examples will be updated as we go!

Connect

  1. Find operators to follow
  2. Search for operators to follow
  3. Follow an operator
  4. List operators being followed
  5. Unfollow an operator
  6. Bookable operators

Listing

  1. Get an operator listing

Products

  1. Get list of products
  2. Get product details

Booking

  1. Get bookable products
  2. Get bookable product details
  3. Get the booking products reservation details
  4. Get product availability
  5. Create a booking reservation

Token Owner's Media

  1. Image Details
  2. Print Details
  3. Video Details
  4. Logo Details
  5. Album Details

Connected Operator's Media

  1. Image Details
  2. Print Details
  3. Video Details
  4. Logo Details
  5. Album Details