2017 © Pedro Peláez
 

library sirena-api-client

image

zephia/sirena-api-client

  • Wednesday, February 21, 2018
  • by cyberiano
  • Repository
  • 3 Watchers
  • 0 Stars
  • 119 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 34 % Grown

The README.md

SwaggerClient-php

Sirena API for lead providers and prospect data manipulation, (*1)

This PHP package is automatically generated by the Swagger Codegen project:, (*2)

  • API version: 1.5.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit http://www.getsirena.com

Requirements

PHP 5.4.0 and later, (*3)

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:, (*4)

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/zephia/sirena-api-client.git"
    }
  ],
  "require": {
    "zephia/sirena-api-client": "1.*"
  }
}

Then run composer install, (*5)

Manual Installation

Download the files and include autoload.php:, (*6)

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

Tests

To run the unit tests:, (*7)

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:, (*8)

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

$api_instance = new Swagger\Client\Api\InteractionsApi();
$format = "format_example"; // string | An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header.
$agent = "agent_example"; // string | The id of the agent to filter
$status = "status_example"; // string | The status to filter
$created_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The start date to filter interactions by their creation date
$start = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdAfter The start date to filter interactions by their creation date (alias of createdAfter)
$created_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The end date to filter interactions by their creation date
$end = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdBefore The end date to filter interactions by their creation date (alias of createdBefore)

try {
    $result = $api_instance->getInteractions($format, $agent, $status, $created_after, $start, $created_before, $end);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InteractionsApi->getInteractions: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://api.getsirena.com/v1, (*9)

Class Method HTTP request Description
InteractionsApi getInteractions GET /prospects/interactions
LeadsApi getCategories GET /leads/categories
LeadsApi getDefaults GET /leads/defaults
LeadsApi newInsuranceLead POST /lead/insurance
LeadsApi newRetailLead POST /lead/retail
LeadsApi newSavingPlanLead POST /lead/saving-plan
LeadsApi newVehicleLead POST /lead/vehicle
NotificationsApi deactivateSubscription DELETE /notifications/subscription/{subscriptionId}
NotificationsApi getActiveSubscriptionById GET /notifications/subscription/{subscriptionId}
NotificationsApi getActiveSubscriptions GET /notifications/subscriptions
NotificationsApi getTopics GET /notifications/topics
NotificationsApi newSubscription POST /notifications/subscriptions
ProspectsApi deleteProspect DELETE /prospect/{prospectId}
ProspectsApi getInteractionById GET /prospect/{prospectId}/interaction/{interactionId}
ProspectsApi getInteractions GET /prospects/interactions
ProspectsApi getProspectById GET /prospect/{prospectId}
ProspectsApi getProspectInteractions GET /prospect/{prospectId}/interactions
ProspectsApi getProspectQuotes GET /prospect/{prospectId}/quotes
ProspectsApi getProspects GET /prospects
ProspectsApi getQuoteById GET /prospect/{prospectId}/quote/{quoteId}
ProspectsApi getQuotes GET /prospects/quotes
ProspectsApi newProspectQuote POST /prospect/{prospectId}/quotes
ProspectsApi updateProspectQuote PUT /prospect/{prospectId}/quote/{quoteId}
QuotesApi getProspectQuotes GET /prospect/{prospectId}/quotes
QuotesApi getQuoteById GET /prospect/{prospectId}/quote/{quoteId}
QuotesApi getQuotes GET /prospects/quotes
QuotesApi newProspectQuote POST /prospect/{prospectId}/quotes
QuotesApi updateProspectQuote PUT /prospect/{prospectId}/quote/{quoteId}

Documentation For Models

Documentation For Authorization

ApiKey

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

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: http://localhost:2000/oauth2/authorization
  • Scopes:
    • leads:write: Lead Provider
    • prospects:read: Read Prospects
    • prospects:readAdditionalData: Read Prospects Aditional Data
    • prospects:write: Write Prospects
    • notifications: Notifications

Author

it@getsirena.com, (*10)

The Versions

21/02 2018

dev-master

9999999-dev http://swagger.io

  Sources   Download

proprietary

The Requires

  • ext-curl *
  • ext-json *
  • ext-mbstring *
  • php >=5.5

 

The Development Requires

api php swagger sdk

21/02 2018

1.0.6

1.0.6.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.5
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

21/02 2018

1.0.5

1.0.5.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.5
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

21/02 2018

1.0.4

1.0.4.0 http://swagger.io

  Sources   Download

proprietary

The Requires

 

The Development Requires

api php swagger sdk

21/02 2018

1.0.3

1.0.3.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

21/02 2018

1.0.2

1.0.2.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

17/11 2017

1.0.1

1.0.1.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk

16/11 2017

1.0.0

1.0.0.0 http://swagger.io

  Sources   Download

proprietary

The Requires

  • php >=5.4
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api php swagger sdk