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.
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
PHP 5.4.0 and later
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
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
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;
}
?>
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 |
- ClientCredentials
- Error
- ErrorsCollection
- Hook
- HooksCollection
- OAuth2Token
- PostV2Hooks
- Search
- SearchesCollection
All endpoints do not require authorization.