MeltwaterArchive / meltwater-php

(deprecated) PHP Client for the Meltwater API

Home Page:https://developer.meltwater.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation Notice

This project is no longer actively maintained. If you need to create a client library for any of the Meltwater APIs, please refer to the OpenAPI specs of the respective API at developer.meltwater.com. From those OpenAPI specs you can generate the client yourself.

SwaggerClient-php

The Meltwater Streaming API provides the needed resources for Meltwater clients to create & delete REST Hooks and stream Meltwater search results to your specified destination.

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

  • API version: 2.0.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen

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/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@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');

$api_instance = new Swagger\Client\Api\ClientsApi();
$user_key = "user_key_example"; // string | The `user_key` from [developer.meltwater.com](https://developer.meltwater.com/admin/applications/).
$authorization = "authorization_example"; // string | `email`:`password`    Basic Auth (RFC2617) credentials. Must contain the realm `Basic` followed by a  Base64-encoded `email`:`password` pair using your Meltwater credentials.    #### Example:        Basic bXlfZW1haWxAZXhhbXJzZWNyZXQ=

try {
    $result = $api_instance->createClientCredentials($user_key, $authorization);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClientsApi->createClientCredentials: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.meltwater.com

Class Method HTTP request Description
ClientsApi createClientCredentials POST /v2/clients Register new client
ClientsApi deleteClientCredentials DELETE /v2/clients/{client_id} Delete client.
HooksApi createHook POST /v2/hooks Creates a hook for one of your predefined searches.
HooksApi deleteHook DELETE /v2/hooks/{hook_id} Delete an existing hook.
HooksApi getAllHooks GET /v2/hooks List all hooks.
Oauth2Api createToken POST /oauth2/token Create an access token
SchemasApi getEditorialStreamingJsonSchema GET /v2/schemas/editorial_streaming.json Editorial Streaming JSON schema
SchemasApi getSocialStreamingJsonSchema GET /v2/schemas/social_streaming.json Social Streaming JSON schema
SearchesApi getAllSearches GET /v2/searches List your saved searches.
Swagger_docApi getCompleteSwaggerSpec GET /v2/swagger_doc Meltwater API Swagger Spec

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

support@api.meltwater.com

About

(deprecated) PHP Client for the Meltwater API

https://developer.meltwater.com

License:Apache License 2.0


Languages

Language:PHP 99.1%Language:Shell 0.9%