Skip to content

Latest commit

 

History

History
91 lines (59 loc) · 1.63 KB

messagehub078.md

File metadata and controls

91 lines (59 loc) · 1.63 KB
copyright lastupdated
years
2015, 2017
2016-11-22

{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre}

How to use the {{site.data.keyword.mql}} API in {{site.data.keyword.messagehub}}

{: #mql_how}

To use the API, add a reference to the latest available {{site.data.keyword.mql}} client API for your chosen language as follows:

Java

{: #mql_java_how notoc}

Add the following reference to your Maven pom file:

<dependency>
    <groupId>com.ibm.mqlight</groupId>
    <artifactId>mqlight-api</artifactId>
    <version>LATEST</version>
</dependency>

{:codeblock}

Node.js

{: #mql_node_how notoc}

Add the following reference to the dependency section of your package.json file:

"mqlight" : "1.0.x"

{: codeblock}

And add the following require statement to your source file:

var mqlight = require(‘mqlight’);

{: codeblock}

Ruby

{: #mql_ruby_how notoc}

Add the following reference to the Gemfile:

gem 'mqlight', '~> 1.0'

{: codeblock}


And add the following require statement to your source file:
require ‘mqlight’

{: codeblock}

Python

{: #mql_python_how notoc}

Add the following reference to your requirements.txt file:

git+git://github.com/mqlight/python-mqlight.git@readthedocs

{:codeblock}


And add the following import statement to your source file:
import mqlight

{:codeblock}