Edit in GitHubLog an issue

Libraries

To make integrating with the Import API as easy as possible, we've created some client libraries for you to use. Have your own library? Want to contribute to ours? Reach out to us!

Clojure

You can install the RJMetrics Clojure client library by adding the following dependency to your project.clj.

Copied to your clipboard
[rjmetrics "0.2.0"]

Now, you can use the library like this:

Copied to your clipboard
(ns example
(:require [rjmetrics.core :as rjmetrics]))
(def config-map {:client-id 1
:api-key "your-api-key"})
(when (rjmetrics/authenticated? config-map)
;; do stuff with client
)

For more information, check out the source code on Github.

Javascript

The RJMetrics Javascript client library is available via npm:

Copied to your clipboard
npm install rjmetrics

You can also install it via npm by adding the following line to the dependencies field in your package.json file:

Copied to your clipboard
"rjmetrics": "0.2.0"

Now, you can use the library like this:

Copied to your clipboard
var rjmetrics = require("rjmetrics");
client = rjmetrics.Client(client_id, api_key);
# do stuff with client

For more information, check out the source code on Github.

PHP

The RJMetrics PHP client library can be installed using Composer.

Add the following to your project's composer.json:

Copied to your clipboard
{
"require": {
...
"rjmetrics/rjmetrics-client": "0.2.0"
}
}

Now, you can use the library in your script, like this:

Copied to your clipboard
<?php
require 'vendor/autoload.php';
$client = new RJMetrics\Client($myClientId, $myApiKey);
/* do stuff with $client */
?>

For more information, you can view the source on Github.

Python

You can install the RJMetrics Python client library with pip or easy_install.

Copied to your clipboard
pip install rjmetrics

You can also install it by adding the following line to a pip requirements file:

Copied to your clipboard
rjmetrics

Now, you can use the library like this:

Copied to your clipboard
from rjmetrics.client import Client
client = Client(client_id, api_key)
# do stuff with client

For more information, check out the source code on Github.

Ruby

The RJMetrics Ruby client library is available as a gem:

Copied to your clipboard
gem install rjmetrics-client

You can also install it via bundler by adding the following line in your Gemfile:

Copied to your clipboard
gem 'rjmetrics-client'

Now, you can use the library like this:

Copied to your clipboard
require "rjmetrics_client"
client = RJMetricsClient.new(client_id, api_key)
# do stuff with client

For more information, check out the source code on Github.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.