No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
test
.php_cs
.travis.yml
README.md
autoload.php
composer.json
git_push.sh
phpunit.xml.dist

README.md

SwaggerClient-php

This is the SMS Fusion API

This PHP package is automatically generated by the Swagger Codegen project:

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/smsfusion/smsfusion-php.git"
    }
  ],
  "require": {
    "smsfusion/smsfusion-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('key', 'Bearer');

$api_instance = new Swagger\Client\Api\HLRApi();
$key = "key_example"; // string | API Key as generated from the <a href='https://www.smsfusion.com.au/admin/api/'>admin panel</a>
$num = "num_example"; // string | A single phone number or <a href='https://www.smsfusion.com.au/help/msisdn/'>MSDISDN</a>
$cc = "cc_example"; // string | 2 character country code <a href='https://en.wikipedia.org/wiki/ISO_3166-2'>ISO 3166-2</a> for formatting local numbers internationally

try {
    $result = $api_instance->getHLR($key, $num, $cc);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HLRApi->getHLR: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.smsfusion.com.au/

Class Method HTTP request Description
HLRApi getHLR GET /hlr/ HLR number lookup
HLRApi getHLRCallback GET /hlr-callback/ HLR number lookup with results going to a callback URL
SMSApi sendSMS GET /sms/ Send an SMS

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: key
  • Location: URL query string

Author

support@smsfusion.com.au