OneHub

Component ID

2897373

Component name

OneHub

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

13

Component created

Component changed

Component body

This module connects via OAuth to OneHub API. Right now, that is all it does. However, it gives you a class to work with.

How to Use

Once you setup and authorize the module here: /admin/config/services/onehub

In your files do this:

use DrupalonehubOneHubAPI;

function whatever() {
  $oh = new OneHubAPI();

  // This will return an object on success or NULL if it fails
  $api = $oh->callAPI('string of url endpoint defined here: https://developer.onehub.com/');
}

Extending the Class

You can do this if you need to add more magic, etc

namespace DrupalYOURMODULE;

use DrupalonehubOneHubAPI;

YOURCLASS extends OneHubAPI {
 // codez
}