Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

MeltwaterArchive/meltwater-ruby

Repository files navigation

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.

Meltwater Ruby SDK

Disclaimer: This client was generated automatically based on our swagger_spec. We are sharing it for purely demonstrative purposes. We hope it it helps. If you have any comments please open an issue, we would love to hear from you!

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 SDK is automatically generated by the Swagger Codegen project:

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

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-2.0.0.gem

(for development, run gem install --dev ./swagger_client-2.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'swagger_client', '~> 2.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'swagger_client'

api_instance = SwaggerClient::ClientsApi.new

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=


begin
  #Register new client
  result = api_instance.create_client_credentials(user_key, authorization)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling ClientsApi->create_client_credentials: #{e}"
end

Documentation for API Endpoints

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

Class Method HTTP request Description
SwaggerClient::ClientsApi create_client_credentials POST /v2/clients Register new client
SwaggerClient::ClientsApi delete_client_credentials DELETE /v2/clients/{client_id} Delete client.
SwaggerClient::HooksApi create_hook POST /v2/hooks Creates a hook for one of your predefined searches.
SwaggerClient::HooksApi delete_hook DELETE /v2/hooks/{hook_id} Delete an existing hook.
SwaggerClient::HooksApi get_all_hooks GET /v2/hooks List all hooks.
SwaggerClient::Oauth2Api create_token POST /oauth2/token Create an access token
SwaggerClient::SchemasApi get_editorial_streaming_json_schema GET /v2/schemas/editorial_streaming.json Editorial Streaming JSON schema
SwaggerClient::SchemasApi get_social_streaming_json_schema GET /v2/schemas/social_streaming.json Social Streaming JSON schema
SwaggerClient::SearchesApi get_all_searches GET /v2/searches List your saved searches.
SwaggerClient::SwaggerDocApi get_complete_swagger_spec GET /v2/swagger_doc Meltwater API Swagger Spec

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.