WhenHub

Welcome to the WhenHub Developer Platform

Here, you'll find comprehensive guides and documentation to help you start working with WhenHub as quickly as possible, as well as support if you get stuck. Let's jump right in!

If you are new to WhenHub, please take a moment to learn more.

Build VisualizationsVisualizations

Create interesting interactive visualizations for Whencasts.

Get Started

Use the WhenHub APIWhenHub API

Programmatically interact with the WhenHub platform.

Get Started
WhenHub Developer Platform
Suggest Edits

Visualization Methods

Visualizations methods

 

Visualizations contain three methods which allow configuration for CSS and JavaScript resources to be loaded into the Player, navigation through events from the player, and initialization the player once the visualization is ready.

Suggest Edits

config Object

Object arrays of CSS and JS references used in visualization

 

Specifies the CSS and JavaScript resources that the Whencast Player should load for the visualization. These resources will be bundled together in a bundle.css and a bundle.js file. The files are loaded with the player and before the start method is called.

Method Parameters

visualization.config = {
  styles: [
    "css/styles.css"                        // CSS for visualization
  ],

  scripts: [
    "~/jquery/1.11.1/jquery-1.11.1.min",    // reference JS in WhenHub cdn library
    "js/scripts.js"                         // JS for visualization
  ]
};
Suggest Edits

navigate()

Method for navigating visualization with WhenHub Player controls or Auto Play. Returns the index of the event that is selected by the Player.

 

Pass the index to the method created for navigating within the visualization. An example would be scrolling or sliding to the next event if autoplay was selected in the schedule settings.

Method Parameters

Method Params
Description

index

Index of selected event in list of events displayed in current Whencast.

Sample Code

visualization.navigate = function(index) {
  // Your code to navigate events within your visualization
  console.log(index); // logs index of selected event from Player in events array
};
Suggest Edits

start()

This describes the start method for the visualizations.

 

The construction of the visualization should be located within this method. The Whencast Player will call the visualization.start method after it has loaded the bundled resources defined in the visualization.config object. The entire schedule object with all events and event data is passed into this method. The settings defined in the schedule, Whencast Player Handlers as well as the container id of the element that the visualization will be placed in in the Player is also passed in through this method.

Method Parameters

Method Params
Description

containerId

The id of the div element within the player that the visualization will reside in.

schedule

Schedule object contains all information about current schedule. This includes all events and event meta data such as date/time and all media and links

handlers

Built in methods for interacting with the WhenHub Player.

settings

Settings are passed in from the schedule and are set in the Studio. They can be either generic settings or custom settings specified by the visualization.

Sample Code

visualization.start = function (containerId, schedule, handlers, settings) {
    
        // Method for creating visualization


        handlers.ready(); // Call method when visualization is ready to be rendered.
        
        // Optional parameter is passed to ready method when length of events
        // shown in visualization does not match total number of events for schedule. 
        // Examples would be for visualizations that only show events with media 
        // attached or locations specified

        // handlers.ready(int);


        // handlers.showDetail(id);
        // Action to display details of a specific event. Parameter is the event's Id


        // handlers.focusScheduleEvent(eventParam);
        // calling this method with the event id or index, depending on how 
        // handlers.ready was called, will update the WhenHub player navigation scrubber
        // to the current location of the event selected


    };
Suggest Edits

Sample Schedule Object

 

This is a sample schedule object using the "Hello!" schedule.

{
  "calendar": {
    "calendarType": "absolute"
  },
  "name": "Hello!",
  "description": "Welcome to WhenHub! This is a sample schedule that will give you an overview of the primary WhenHub features.",
  "curator": "WhenHub Curator",
  "scope": "public",
  "views": 4054,
  "sync": false,
  "viewCode": "Z26uRTW",
  "tags": [
    "home",
    "order:0"
  ],
  "featured": true,
  "id": "57c443f4e899ed5809ffc36e",
  "userId": "562fc4e3c6a01fb8058bc910",
  "createdAt": "2016-08-29T14:17:24.000Z",
  "updatedAt": "2017-01-31T16:25:33.000Z",
  "createdBy": "562fc4e3c6a01fb8058bc910",
  "updatedBy": "562fc4e3c6a01fb8058bc910",
  "hubId": "561af4617735621063d246a8",
  "_sources": [],
  "hub": "business",
  "events": [
    {
      "when": {
        "period": "month",
        "relative": null,
        "startDate": "2017-01",
        "startTimezone": "America/Los_Angeles",
        "endDate": null,
        "endTimezone": null,
        "recurrenceRule": null,
        "recurrenceException": null
      },
      "name": "Welcome to Whenhub",
      "description": "<p class=\"ql-align-justify\">Welcome to Whenhub! Thanks for trying out our platform. With the Whenhub you can create dynamic visualizations, publish them anywhere you wish and allow people to easily consume and connect with your content. Whether you are using time to tell a story, promoting a calendar of events, or sharing a simple schedule, Whenhub is your new publishing tool for the past, present and future.</p><p class=\"ql-align-justify\"><br></p><p class=\"ql-align-justify\"><br></p>",
      "order": 0,
      "customFieldData": {},
      "id": "57ced9e52de542601e971c37",
      "createdAt": "2016-09-06T14:59:49.000Z",
      "updatedAt": "2017-01-23T16:37:20.000Z",
      "createdBy": "562fc4e3c6a01fb8058bc910",
      "updatedBy": "562fc4e3c6a01fb8058bc910",
      "scheduleId": "57c443f4e899ed5809ffc36e",
      "primaryAction": {
        "url": "https://www.whenhub.com/wp-content/uploads/2016/10/WhenHub-Overview-Infographic.pdf",
        "label": "WhenHub InfoGraphic"
      },
      "cleanDescription": "Welcome to Whenhub! Thanks for being part of how the future will communicate and interact with time....",
      "gridImageUrl": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/100/whenhub.jpg",
      "rowIndex": 14,
      "media": [
        {
          "type": "image"
          "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/whenhub.jpg",
          "name": "",
          "autoScaled": true,
          "sources": [],
          "id": "583dec4cf1b13608d05140ea",
          "eventId": "57ced9e52de542601e971c37",
          "createdAt": "2016-11-29T20:59:56.000Z",
          "updatedAt": "2016-11-29T20:59:56.000Z",
          "createdBy": "562fc4e3c6a01fb8058bc910",
          "updatedBy": "562fc4e3c6a01fb8058bc910"
        }
      ]
    },
    {
      "when": {
        "period": "month",
        "relative": null,
        "startDate": "2017-02",
        "startTimezone": "America/Los_Angeles",
        "endDate": null,
        "endTimezone": "America/Los_Angeles",
        "recurrenceRule": null,
        "recurrenceException": null
      },
      "name": "Introducing the Studio",
      "description": "<p>The Studio is the engine within the Whenhub platform. Within the studio you can create schedules from scratch, sync to Google calendars, sync to RSS feeds, or import event data that becomes the base for your visualizations or \"Whencasts\". From there you can incorporate images, videos, URL links, custom data fields, tags and much more. Once you have incorporated the rich media into your schedule you can then select the Whencast configuration that delivers the best visualization of your content.</p><p><br></p>",
      "location": {
        "name": "Pleasanton",
        "locality": null,
        "address": null,
        "city": "Pleasanton",
        "postalCode": null,
        "country": "United States",
        "geolocation": {
          "lat": 37.6624312,
          "lng": -121.87467889999999
        },
        "region": "CA",
        "telephone": null,
        "timezone": "America/Los_Angeles",
        "streetNumber": null,
        "streetName": null
      },
      "order": 1,
      "customFieldData": {},
      "id": "57d82784544effb00f3af9e4",
      "createdAt": "2016-09-13T16:21:24.000Z",
      "updatedAt": "2016-11-30T22:50:26.000Z",
      "createdBy": "562fc4e3c6a01fb8058bc910",
      "updatedBy": "562fc4e3c6a01fb8058bc910",
      "scheduleId": "57c443f4e899ed5809ffc36e",
      "media": [
        {
          "type": "file",
          "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/infographic_final.pdf",
          "name": "",
          "id": "57ec22aa31e3b20432f89d2a",
          "eventId": "57d82784544effb00f3af9e4",
          "createdBy": "562fc4e3c6a01fb8058bc910",
          "updatedBy": "562fc4e3c6a01fb8058bc910",
          "_sources": [
            {
              "name": "",
              "url": ""
            }
          ]
        },
        {
          "type": "image",
          "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/whenhub_icon_blue.jpg",
          "name": "",
          "order": 0,
          "autoScaled": true,
          "sources": [],
          "id": "583ded8cf1b13608d05140ec",
          "eventId": "57d82784544effb00f3af9e4",
          "createdAt": "2016-11-29T21:05:16.000Z",
          "updatedAt": "2016-11-29T21:05:16.000Z",
          "createdBy": "562fc4e3c6a01fb8058bc910",
          "updatedBy": "562fc4e3c6a01fb8058bc910"
        },
        {
          "type": "image",
          "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/4icons_square.jpg",
          "name": "",
          "order": 1,
          "autoScaled": true,
          "sources": [],
          "id": "582a3905b7146308e0b03c38",
          "eventId": "57d82784544effb00f3af9e4",
          "createdAt": "2016-11-14T22:21:56.000Z",
          "updatedAt": "2016-11-29T21:05:14.000Z",
          "createdBy": "562fc4e3c6a01fb8058bc910",
          "updatedBy": "562fc4e3c6a01fb8058bc910"
        },
        {
          "type": "image",
          "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/Screen_Shot_2016-10-03_at_2.34.38_PM.png",
          "name": "",
          "order": 2,
          "id": "57f2cf32d6fbec6c267b6781",
          "eventId": "57d82784544effb00f3af9e4",
          "updatedAt": "2016-11-29T21:05:14.000Z",
          "createdBy": "567379343262be6007a4b922",
          "updatedBy": "567379343262be6007a4b922",
          "_sources": [
            {
              "name": "",
              "url": ""
            }
          ]
        }
      ]
    }
  ],
  "media": [
    {
      "type": "image",
      "url": "https://whenhub.blob.core.windows.net/media/57c443f4e899ed5809ffc36e/smiley_face.jpg",
      "autoScaled": true,
      "id": "583dec0d451c991b0c5d3cd6",
      "scheduleId": "57c443f4e899ed5809ffc36e",
      "createdAt": "2016-11-29T20:58:53.000Z",
      "updatedAt": "2016-11-29T20:58:53.000Z",
      "createdBy": "562fc4e3c6a01fb8058bc910",
      "updatedBy": "562fc4e3c6a01fb8058bc910"
    }
  ]
}
Suggest Edits

Whencast Player Handlers

Built in methods for interacting with the Whencast Player.

 
Suggest Edits

ready()

A Whencast Player handler method that notifies the Whencast Player when the visualization is ready. The Player will then render the Whencast with the visualization.

 

An optional parameter can be passed to the ready method when length of events shown in visualization does not match total number of events for schedule. This will update the Player scrubber and auto play to have the correct number of events as defined by the visualization. Examples would be for visualizations that only show a list of events filtered by whether or not media is attached or locations are specified.

Method Parameters

Parameters
Type
Description
Required?

eventsLength

Integer

Length of items in array of events. Only needed when only showing a subset of events.

Optional

Sample Code

visualization.start = function (containerId, schedule, handlers, settings){
  handlers.ready();
  
  // optional version with number of events passed to ready method 
  handlers.ready(eventsLength); // events is the array of filtered events
}
Suggest Edits

showDetail()

A Whencast Player handler method that shows the built in detail view for the event.

 

Passing in an event id to this method will present the full details of the event in a full screen popup window.

Method Parameters

Parameter
Type
Description
Required?

id

String

The id of a specific event.

Required

Sample Code

// Get the id of the first event in the schedule
// where i = the index of an event in the array 
// of events
var id = schedule.events[i].id

// Display detail view for specified event
handlers.showDetail(id);
Suggest Edits

focusScheduleEvent()

A Whencast Player handler method that updates the built in navigation for the Player based on navigation within the visualization.

 

When navigating within visualization, the Whencast Player should be notified of the current event selected. This will keep the Player controls and the visualization synchronized. The id of the currently selected event is passed to the handler and the Player will update the position of the scrubber.

Method Parameters

Parameter
Type
Description
Require?

id

String

The id of a specific event used to update Player's scrubber location

Required

Sample Code

// Get the id of the first event in the schedule
// where i = the index of an event in the array 
// of events
var id = schedule.events[i].id

// update Whencast Player scrubber position
handlers.focusScheduleEvent(id);
Suggest Edits

Whencast Helpers

Common built in Whencast helper methods to aid in development.

 

The Whencast Player has several helper methods to assist in visualization development.

Suggest Edits

getFormatedDate()

Returns a date or range of dates for an event. Optional parameters allow customization of formatting and start, end or date range for each event.

 

Working with dates in JavaScript can be challenging! This method allows formatting of dates with several different options. First, dates can be returned as a single start or end date, or as a range of date and/time for the specified event. For dates that have an end date/time, the beginning and ending date/time as well as the range of date/time can be returned. For dates without an ending date/time, a start date can be returned. If both is selected as the dateOptions.startorEndDate value, the start date will be returned. Single dates will be returned using the periodFormat formatting. Date ranges will be returned with rangeFormat formatting and options.

For date standard date formatting, WhenHub leverages moment.js. Start, end, and single time dates, leverage the formatting from dateOptions.periodFormat using MomentJS patterns. View MomentJS formatting documentation here: https://momentjs.com/docs/#/displaying/format/

For date ranges, we leverage the Twix plugin for MomentJs. These options are defined in the dateOptions.rangeFormat. You can find the options that are available through this method here: http://isaaccambron.com/twix.js/docs.html#all-the-options

Method Parameters

Parameter
Type
Description
Required?

event

Object

Selected Event in schedule

Required

dateOptions

Object

Options to pass to the method

Optional

dateOptions.startOrEndDate

String

Returns the start, end, or range of dates for event as specifed. Valid options: 'start', 'end', 'both'.

Optional

dateOptions.periodFormat

Object

Options for single dates

Optional

dateOptions.rangeFormat

Object

Options for date ranges

Optional

Default Options

var dateOptions = {
  startOrEndDate: 'both', // 'start', end', or 'both'
  periodFormat: {
    minute: 'MMMM D, YYYY, hh:mm a',
    day: 'MMMM D, YYYY',
    month: 'MMMM, YYYY',
    year:'YYYY'
  },
  rangeFormat: {
    yearFormat: 'YYYY',
    monthFormat: 'MMMM',
    dayFormat: 'D',
    weekdayFormat: 'ddd',
    hourFormat: 'h',
    minuteFormat: 'mm',
    meridiemFormat: 'a',
    groupMeridiems: true,
    implicitMinutes: false
  }
}

Sample Code

for (var i = 0; i < schedule.events.length; i++) {
    var dateOptions = {
        startOrEndDate: 'both',
        periodFormat: {
            // ...
        },
        rangeFormat: {
            // ...
        }
    }
    var date = wcHelper.getFormatedDate(schedule.events[i], dateOptions);
    console.log(date); // Logs date range for each event
}

Examples

Using the following dates, below are some example returns for changing the startOrEndDate value:

Event does not have an end date:

startDate: March 18, 2018 10 pm

startOrEndDate value
Result

start

March 18, 2018, 10:00 pm

end

undefined

both

March 18, 2018, 10:00 pm

Event has an end date:

startDate: March 18, 2018 10 pm;
endDate: March 18, 2018 11:30 pm

startOrEndDate value
Result

start

March 18, 2018, 10:00 pm

end

March 18, 2018, 11:30 pm

both

March 18, 2018, 10:00 - 11:30 pm

Suggest Edits

getCurrentTheme()

Returns an object of colors as defined by the theme defined in the schedule settings.

 

Whencast Studio allows for schedules to be themed by the schedule curator. By passing in the theme color from the settings.theme parameter, the color variations for that theme will be returned.

Method Parameters

Parameter
Type
Description
Required?

selectedColor

String

A valid color name from the list of available themes. See below for a list of the valid theme colors.

Required

WhenHub Theme Colors

Theme label
Theme name

Blue

blue

Brown

brown

Cool Grey

coolgrey

Green

green

Orange

orange

Purple

purple

Red

red

Teal

teal

Turquoise

turquoise

Warm Grey

warmgrey

Yellow

yellow

Sample Code

var selectedColor = settings.theme; // current default theme color
var selectedTheme = wcHelper.getCurrentTheme(selectedColor);

console.log(selectedTheme); // logs object of colors for selected theme
console.log(selectedTheme['hc-dark']); // logs "#726C69" (hc-dark color for blue theme) 

Example Response

Example object returned from getCurrentTheme method with a passed in parameter of the default theme color "blue".

{
  accent1-dark: "#F47B20",
  accent1-light: "#FBB034",
  accent2-dark: "#C60651",
  accent2-light: "#D06F1A",
  dark: "#3B5B96",
  grey: "#878A94",
  hc-dark: "#2D354F",
  hc-light: "#90ABD9",
  light: "#4E84C4"
}
Suggest Edits

getThemes()

Returns an array of all themes and colors.

 

This method will return all colors for all themes.

Theme Colors

Theme
light
dark
hc-light
hc-dark
accent1-light
accent1-dark
accent2-light
accent2-dark
grey

Blue

#4E84C4

#3B5B96

#90ABD9

#2D354F

#FBB034

#F47B20

#D06F1A

#C60651

#878A94

Brown

#AD774E

#7C3A00

#FFD293

#4F2D15

#927C71

#5D6847

#95B0D7

#5B575C

#99949D

Cool Grey

#B7B2B0

#918D8A

#E2E0DF

#726C69

#D4C5A5

#4A4D59

#EAECEC

#BE854C

#84817F

Green

#90A056

#77783B

#D2D89A

#67652F

#FDB913

#3C5F4B

#F3901D

#443418

#808587

Orange

#FCAE46

#FB9307

#FCBE6E

#F47B20

#8D8B00

#7E4300

#7E8083

#54301A

#5F6062

Purple

#875985

#56004E

#A684A7

#46166B

#FBB034

#3D2A4B

#CCC2B6

#A3A510

#6D6C6D

Red

#C85346

#BF202C

#DFA08E

#721012

#685040

#572700

#8897AF

#3D4252

#817E8B

Teal

#37C5EE

#1080A3

#B9E5F7

#0073AE

#D5D10E

#B2BB1E

#FFC425

#C0A22F

#6E797F

Turquoise

#5BB0C3

#05A2B7

#ADD1DC

#008C99

#17A485

#005581

#83C257

#EE2B74

#BFC3CF

Warm Grey

#C5B8B1

#8A7967

#DAD0CA

#675A4D

#D8D9DA

#A1A1A4

#FDB913

#6D6E71

#5F6062

Yellow

#F5C553

#F0BB48

#FADB92

#EFA80D

#F15D22

#E31B23

#AB0634

#7A003C

#6D6E71

Suggest Edits

getImage()

Gets the image for an event in the desired size.

 

Images are saved into different sizes upon upload through the studio to allow for optimized usage in the visualizations. This method will return the url for the first image of the event in the desired size. Available sizes are xs, sm, md, lg, and xl (see below for Image size options).

Method Paramters

Parameter
Type
Description
Required?

event

Object

Selected Event in schedule

Required

size

String

Desired size of image. 'sm' is default.
See table below for valid sizes.

Optional

Image size options

Size
Image Width

xs

100px

sm (default)

300px

md

500px

lg

750px

xl

100px

Sample Code

for (var i = 0; i < schedule.events.length; i++) {
  var img = wcHelper.getImage(schedule.events[i], 'sm', true);
  console.log(img); // Logs the url for the image
}
Suggest Edits

getImageDefault()

Get event images. If no image is found for the event, the WhenHub logo is returned.

 

Method Parameters

Method Param
Description

event

The individual event.

Sample Code

function getImageDefault(event) {
    var eventImage = _.find(_.sortBy(event.media, _.property('priority')), {
        type: 'image'
    });
    if (eventImage) {
        return eventImage.url.replace('whenhub.blob.core.windows.net', 'cdn.whenhub.com/cloud');
    }
    return 'https://cdn.whenhub.com/img/logo/logo-square.png';
}
Suggest Edits

rangeSlider()

Date range slider component that can be added to any visualization.

 

This method adds a date range slider to the visualization. The component requires that the events from the schedule be passed into it. A callback method that returns a filtered events list is provided which can be used to rerender the view. Several optional parameters are also available for placement and basic color adjustment. An ID of a div may also be passed to use an existing div. Otherwise, a new div will be created.

Example Range Slider

Example Range Slider

Method Parameters

Parameters
Type
Description
Required
Default Value

events

Object

Events passed in by schedule.events from the visualization.start method

Required

loadTemplate

Callback Method

Callback method used in visualization to rerender view.

Required

sliderOptions

Object

Object list of options

Optional

sliderOptions.vposition

String

Position of range slider in view.

Options: 'top' || 'bottom'

Optional

bottom

sliderOptions.containerId

String

Id of container to place range finder

Optional

wh_rangeFilter

sliderOptions.bgColor

String

background color of range slider

Optional

#fff (white)

sliderOptions.textColor

String

Color of dates on range slider

Optional

#000 (black)

sliderOptions.fireOnLoad

Boolean

Fire callback on initial load

Optional

false

Sample Code

Visualization.config

A reference to google charts must be added to visualizations scripts array.

visualization.config = {
  styles: [
    // ...
  ],
  scripts: [
    'https://www.gstatic.com/charts/loader.js',
    // ...
  ]
}

Visualization.start

The range slider can then be loaded within the start method.

visualization.start = function (containerId, schedule, handlers, settings) {
  // ...
  function loadTemplate(eventList) {
      // Render view
      someRenderFunction(eventList);
  }
  
  var sliderOptions = {
      vposition: 'bottom',
      containerId: 'wh_rangeFilter',
      bgColor: '#fff',
      textColor: '#000',
      fireOnLoad: false
  }
  wcHelper.rangeSlider(schedule.events, loadTemplate, sliderOptions);
  // ...
});
Suggest Edits

filterScheduleByTime()

Return a list of events filtered by beginning and ending time/dates.

 

This method will return a filtered list of events.

Method Parameters

Parameters
Type
Description

events

Object

Events passed in by schedule.events from the visualization.start method

startEndTime

Object

Object with start and end times

startEndTime.startTime

String

Beginning Date string from schedule to filter schedule by earliest.

startEndTime.endTime

String

Ending Date string from schedule to filter schedule by latest.

Sample Code

wcHelper.filterScheduleByTime(schedule.events, startEndTime);
Suggest Edits

getSmallestPeriod()

Returns smallest period type in schedule.

 

This method will return the smallest period used by the schedule. For example if a schedule includes events with dates that are year, month, day, and minute period ranges, minute will be returned. If The schedule includes events with dates that are month and day period ranges, day will be returned.

Method Parameters

Parameter
Type
Description

events

Object

Events passed in by schedule.events from the visualization.start method

Sample Code

var smallestPeriod = wcHelper.getSmallestPeriod(schedule.events);

console.log(smallestPeriod);
// returns 'minute', 'day', 'month', or 'year'
Suggest Edits

Accessing the API

 

1. Get Access Token from WhenHub Account page

Get your access token from your WhenHub Account page. If you do not yet have a WhenHub Account, you will be required create one by logging in with a Google, Facebook, Twitter, GitHub, or LinkedIn account.

2. Authenticate your API Call

Your Access Token can be passed to the API either through a ULR query parameter or through the header object as the Authentication parameter value.

Examples

// ACCESS_TOKEN = your access token from your WhenHub account page

URL parameter
https://api.whenhub.com/api/users/me?access_token=ACCESS_TOKEN

Header Object

headers: {
    Authentication: ACCESS_TOKEN
}

For more information an your Access Token view the Connecting with Your Access Token page

3. Testing API endpoints within this documentation

You can test the API endpoints below once you have retrieved your Access Token. It can be added to the Query Auth by clicking the icon to the left of the Try It button to the right of the code samples.

Suggest Edits

Get My User Information

This endpoint will return user information for the user with the access token being sent to the API. Values returned include, Display Name, URL for profile image, schedules followed, username, email address and user id.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/users/me
curl --request GET \
  --url https://api.whenhub.com/api/users/me
var request = require("request");

var options = { method: 'GET', url: 'https://api.whenhub.com/api/users/me' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/users/me")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/users/me");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/users/me"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Example Response

{
  "displayName": "string",
  "photo": "string",
  "login": "2017-04-11",
  "timezone": "string",
  "schedulesFollowed": [
    "string"
  ],
  "username": "string",
  "email": "string",
  "id": "string",
  "createdAt": "2017-04-11",
  "updatedAt": "2017-04-11",
  "createdBy": "string",
  "updatedBy": "string"
}
Suggest Edits

Get My Schedules

Get the list of schedules for the user whose access token is being sent to the API. This information does not include the events or media items for the schedules.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/users/me/schedules
curl --request GET \
  --url https://api.whenhub.com/api/users/me/schedules
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.whenhub.com/api/users/me/schedules' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/users/me/schedules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/users/me/schedules");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/users/me/schedules"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Example Response

[
  {
    "calendar": {
      "calendarType": "string",
      "value": "2017-04-11"
    },
    "icon": "string",
    "name": "string",
    "description": "string",
    "curator": "string",
    "scope": "private",
    "location": {
      "name": "string",
      "locality": "string",
      "address": "string",
      "city": "string",
      "postalCode": "string",
      "country": "string",
      "geolocation": {
        "lat": 0,
        "lng": 0
      },
      "region": "string",
      "telephone": "string",
      "timezone": "string"
    },
    "likes": 0,
    "views": 0,
    "rating": "string",
    "reference": {},
    "sync": true,
    "viewCode": "string",
    "customFields": [
      {}
    ],
    "tags": [
      "string"
    ],
    "order": 0,
    "sources": [
      "string"
    ],
    "id": "string",
    "userId": "string",
    "createdAt": "2017-04-11",
    "updatedAt": "2017-04-11",
    "createdBy": "string",
    "updatedBy": "string",
    "hubId": "string"
  }
]

More Information

Suggest Edits

Get Schedule with Events

This endpoint returns the list of schedules for the user whose access token is being sent to the API. The information returned includes the schedule's events as well as the media for the events only.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/schedules/scheduleId?filter[include][events]=media
curl --request GET \
  --url 'https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.whenhub.com/api/schedules/scheduleId',
  qs: { 'filter[include][events]': 'media' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

The id of the schedule to retrieve.

 

Example Response

{
  "calendar": {
    "calendarType": "string",
    "value": "2017-04-11"
  },
  "icon": "string",
  "name": "string",
  "description": "string",
  "curator": "string",
  "scope": "private",
  "location": {
    "name": "string",
    "locality": "string",
    "address": "string",
    "city": "string",
    "postalCode": "string",
    "country": "string",
    "geolocation": {
      "lat": 0,
      "lng": 0
    },
    "region": "string",
    "telephone": "string",
    "timezone": "string"
  },
  "likes": 0,
  "views": 0,
  "rating": "string",
  "reference": {},
  "sync": true,
  "viewCode": "string",
  "customFields": [
    {}
  ],
  "tags": [
    "string"
  ],
  "order": 0,
  "sources": [
    "string"
  ],
  "id": "string",
  "userId": "string",
  "createdAt": "2017-04-11",
  "updatedAt": "2017-04-11",
  "createdBy": "string",
  "updatedBy": "string",
  "hubId": "string",
  "events": [
    {
      "when": {
        "period": "string",
        "relative": "string",
        "startDate": "string",
        "startTimezone": "string",
        "endDate": "string",
        "endTimezone": "string",
        "recurrenceRule": "string",
        "recurrenceException": "string"
      },
      "name": "string",
      "description": "string",
      "icon": "string",
      "location": {
        "name": "string",
        "locality": "string",
        "address": "string",
        "city": "string",
        "postalCode": "string",
        "country": "string",
        "geolocation": {
          "lat": 0,
          "lng": 0
        },
        "region": "string",
        "telephone": "string",
        "timezone": "string"
      },
      "resources": [
        "string"
      ],
      "priority": "string",
      "reference": {},
      "draft": true,
      "tags": [
        "string"
      ],
      "order": 0,
      "customFieldData": {},
      "id": "string",
      "createdAt": "2017-04-11",
      "updatedAt": "2017-04-11",
      "createdBy": "string",
      "updatedBy": "string",
      "scheduleId": "string"
    }
  ]
}
Suggest Edits

Schedules with Events & Media

This endpoint returns the list of schedules for the user whose access token is being sent to the API. The information returned includes the schedule's events as well as the media for the schedule and the events.

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/schedules/scheduleId?filter[include]=media&filter[include][events]=media
curl --request GET \
  --url 'https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media&filter%5Binclude%5D=media'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.whenhub.com/api/schedules/scheduleId',
  qs: 
   { 'filter[include][events]': 'media',
     'filter[include]': 'media' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media&filter%5Binclude%5D=media")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/schedules/scheduleId?filter%5Binclude%5D%5Bevents%5D=media&filter%5Binclude%5D=media");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

Id of schedule to retreive.

 

More Information

Suggest Edits

Create a new schedule

Add a new schedule to your WhenHub account by posting a schedule object to the //api.whenhub.com/api/users/me/schedules API endpoint. Check out the Understanding the Schedule Object section to see an example and additional information. The minimum requirements for creating a new schedule is your Access Token and the name of the schedule. The data will be passed as a JSON object to the API.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/users/me/schedules
curl --request POST \
  --url https://api.whenhub.com/api/users/me/schedules
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/users/me/schedules' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/users/me/schedules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/users/me/schedules");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/users/me/schedules"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

name
string
required

The name of the schedule.

description
string

The description of the schedule.

scope
string

When a user creates a schedule, they have the option to make it viewable to the public or to only themselves. The scope field defines which option they have chosen as either 'public' or 'private'.

tags
array of strings

Tags help a user categorize their schedules. As there can be many tags to a schedule, this value is an array of all the tags a user has added.

sources
array

Sources cited for the content of the schedule.

events
array

See Create a new Event for information on event object structure.

 

Sample data payload for creating a new schedule

Parameter
Type
Description
Required?

name

String

The name of the Schedule

Required

description

String

The description of the schedule

Optional

curator

String

Name of the user that created the schedule

Optional

scope

String

When a user creates a schedule, they have the option to make it viewable to the public or to only themselves. The scope field defines which option they have chosen as either 'public' or 'private'.

Optional

tags

Array of Strings

Tags help a user categorize their schedules. As there can be many tags to a schedule, this value is an array of all the tags a user has added.

Optional

sources

Array of Strings

Sources cited for the content of the schedule.

Optional

events

Array of Objects

The Events in the schedule. These can be added through the Create An Event method once the schedule has been created. For more information see the Understanding the Event Object

Optional

{
  "name": "Hello!",
  "description": "Welcome to WhenHub! This is a sample schedule that will give you an overview of the primary WhenHub features.",
  "curator": "WhenHub Curator",
  "scope": "public",
  "tags": [
    "home",
    "order:0"
  ],
  "sources": [
    0: "Example Source for schedule",
    1: "Another example source for this schedule"
  ],
  "events": [
    // Optionally include your events
    // See Understanding the Event Object page for more information
  ]
}

Full Schedule Object Details

For a full description of the Schedule Object check out the Understanding the Schedule Object page.

More Information

Suggest Edits

Update a Schedule

Update an existing schedule to your WhenHub account by posting a schedule object to the //api.whenhub.com/api/users/me/schedules API endpoint. Check out the Understanding the Schedule Object section to see an example and additional information. The data will be passed as a JSON object to the API.

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.whenhub.com/api/schedules/id
curl --request PATCH \
  --url https://api.whenhub.com/api/schedules/id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.whenhub.com/api/schedules/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.whenhub.com/api/schedules/id");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Id of schedule that is being updated.

Body Params

name
string

The name of the schedule.

description
string

The description of the schedule.

scope
string

When a user creates a schedule, they have the option to make it viewable to the public or to only themselves. The scope field defines which option they have chosen as either 'public' or 'private'.

tags
array of strings

Tags help a user categorize their schedules. As there can be many tags to a schedule, this value is an array of all the tags a user has added.

sources
array

Sources cited for the content of the schedule.

events
array

See Create a new Event for information on event object structure.

 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

$.get('http://yoursite.com/test/' + id, function(data) {
    console.log(data);
});
Suggest Edits

Create a new event

Once a new schedule has been created, new events can be added to the schedule with this API endpoint. Check out the Understanding the Event Object section to see an example and additional information.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/schedules/id/events
curl --request POST \
  --url https://api.whenhub.com/api/schedules/id/events
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/schedules/id/events' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/id/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/schedules/id/events");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/id/events"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Id of schedule to which the new event is being added.

Body Params

when
object
 
when.period
string
required

Represent the increment of the values stored in startDate and endDate.

when.startDate
datetime
required

The date and time the event starts. See Understanding the Event Object for more information.

when.startTimezone
string

These fields specify which timezone the start date is in. The acceptable values can be found here Moment.js TimeZones.

when.endDate
datetime

The date and time the event ends. See Understanding the Event Object for more information.

when.endTimezone
string

These fields specify which timezone the end date is in. The acceptable values can be found here Moment.js TimeZones.

when.recurrenceRule
string
when.recurrenceException
string
name
string

Name of Event.

description
string

Description of event.

primaryAction
object
 
primaryAction.url
string

Link to an external site.

primaryAction.label
string

Name to be used for Primary Action link.

media
array of objects

Media item for event

type
url
name
sources
customFieldData
object
 
customFieldData.[CUSTOM FIELD GUID]
string

The key for the object matches the id for the custom field that is used from the schedule object. The value for this object will vary based on the custom field settings from the schedule.

location
object

Location of event.

 
location.name
string

Name of location

location.locality
string

The locality, such as district, of the event.

location.address
string

Address of location

location.city
string

City of location.

location.postalCode
string

Postal code of location

location.country
string

Country of location

location.geolocation
mixed

Geolocation object containing Latitude and Longitude of location. {"lat": float, "lng": float}

 

Example Value

{
  "when": {
    "period": "string", // minute, day, month, year
    "relative": "string",
    "startDate": "string", 	// moment.js formatting
    "startTimezone": "string",
    "endDate": "string", 	// moment.js formatting
    "endTimezone": "string",
    "recurrenceRule": "string",
    "recurrenceException": "string"
  },
  "name": "string",
  "description": "string",
  "icon": "string",
  "location": {
    "name": "string",
    "locality": "string",
    "address": "string",
    "city": "string",
    "postalCode": "string",
    "country": "string",
    "geolocation": {
      "lat": 0,
      "lng": 0
    },
    "region": "string",
    "telephone": "string",
    "timezone": "string"
  },
  "resources": [
    "string"
  ],
  "priority": "string",
  "reference": {},
  "draft": true,
  "tags": [
    "string"
  ],
  "order": 0,
  "customFieldData": {},
  "id": "string",
  "createdAt": "2017-04-11",
  "updatedAt": "2017-04-11",
  "createdBy": "string",
  "updatedBy": "string",
  "scheduleId": "string",
  "media": [
    {
      "type": "string",		// video, file, image, or link
      "url": "string",
      "name": "string",
      "sources": [
      	"string"
      ],
      "id": "string",
      "eventId": "string",
      "createdAt": "string", 	// moment.js formatting
      "updatedAt": "string", 	// moment.js formatting
      "createdBy": "string", 	// user id
      "updatedBy": "string" 	// user id
    }
  ]
}

More Information

Suggest Edits

Update an event

This method will update an existing event. The schedule Id an event Id are required for this method. For more information on the event object check out the Understanding the Event Object page.

 

Query Auth

 Authentication is required for this endpoint.
puthttps://api.whenhub.com/api/schedules/scheduleId/events/eventId
curl --request PUT \
  --url https://api.whenhub.com/api/schedules/scheduleId/events/eventId
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.whenhub.com/api/schedules/scheduleId/events/eventId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId/events/eventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.whenhub.com/api/schedules/scheduleId/events/eventId");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId/events/eventId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

Id of schedule to which the event is being updated.

eventId
string
required

Id of event that is being updated.

Body Params

name
string

Name of the event.

description
string

Description of the event.

when
object

Object that defines the start and optional end date and time zones for the event.

 
when.period
string
required

Represent the increment of the values stored in startDate and endDate.

when.startDate
datetime
required

The date and time the event starts. See Understanding the Event Object for more information.

when.startTimezone
string

These fields specify which timezone the start date is in. The acceptable values can be found here Moment.js TimeZones.

when.endDate
datetime

The date and time the event ends. See Understanding the Event Object for more information.

when.endTimezone
string

These fields specify which timezone the end date is in. The acceptable values can be found here Moment.js TimeZones.

when.recurrenceRule
string
when.recurrenceException
string
primaryAction
object

Used to display a primary call to action if visualization supports it and as a primary call to action in the event detail view.

 
primaryAction.url
string

Link to an external site.

primaryAction.label
string

Name to be used for Primary Action link.

media
array of objects

Media item for event. Valid values for media.type are: "image", "link", "video", or "file"

type
url
name
sources
customFieldData
object

Custom data as defined by the schedule for the event.

 
customFieldData.[CUSTOM FIELD GUID]
string

The key for the object matches the id for the custom field that is used from the schedule object. The value for this object will vary based on the custom field settings from the schedule.

location
object

Location of event.

 
location.name
string

Name of location

location.locality
string

The locality, such as district, of the event.

location.address
string

Address of location

location.city
string

City of location.

location.postalCode
string

Postal code of location

location.country
string

Country of location

location.geolocation
mixed

Geolocation object containing Latitude and Longitude of location. {"lat": float, "lng": float}

 

Example Value

{
  "when": {
    "period": "string",
    "relative": "string",
    "startDate": "string",
    "startTimezone": "string",
    "endDate": "string",
    "endTimezone": "string",
    "recurrenceRule": "string",
    "recurrenceException": "string"
  },
  "name": "string",
  "description": "string",
  "icon": "string",
  "location": {
    "name": "string",
    "locality": "string",
    "address": "string",
    "city": "string",
    "postalCode": "string",
    "country": "string",
    "geolocation": {
      "lat": 0,
      "lng": 0
    },
    "region": "string",
    "telephone": "string",
    "timezone": "string"
  },
  "resources": [
    "string"
  ],
  "priority": "string",
  "reference": {},
  "draft": true,
  "tags": [
    "string"
  ],
  "order": 0,
  "customFieldData": {},
  "id": "string",
  "createdAt": "2017-04-11",
  "updatedAt": "2017-04-11",
  "createdBy": "string",
  "updatedBy": "string",
  "scheduleId": "string"
}

More Information

Suggest Edits

Remove an event

This API endpoint will remove a specified event from it's schedule.

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.whenhub.com/api/events/eventId
curl --request DELETE \
  --url https://api.whenhub.com/api/events/eventId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.whenhub.com/api/events/eventId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/events/eventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.whenhub.com/api/events/eventId");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/events/eventId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

eventId
string
required

Id of event that is being removed.

 
Suggest Edits

Delete Multiple Events

Remove multiple events by passing an array of event ids to this API endpoint.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/schedules/scheduleId/events/deleteMany
curl --request POST \
  --url https://api.whenhub.com/api/schedules/scheduleId/events/deleteMany
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/schedules/scheduleId/events/deleteMany' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId/events/deleteMany")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/schedules/scheduleId/events/deleteMany");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId/events/deleteMany"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

Id of the schedule from which the events will be removed.

Body Params

eventIds
array of strings
required

Array of event Ids to be deleted.

 

More Information

API Explorer - Delete many events by {{id}}

Suggest Edits

Add an image to a Schedule

Binary file upload and you will receive a url to that file. Media images will be auto scaled to sizes by width (2500, 1000, 750, 500, 300, 100)

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/api/schedules/scheduleId/upload
curl --request POST \
  --url https://api.whenhub.com/api/api/schedules/scheduleId/upload
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/api/schedules/scheduleId/upload' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/api/schedules/scheduleId/upload")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/api/schedules/scheduleId/upload");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/api/schedules/scheduleId/upload"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

schdeduleId
string
required

Body Params

Type
string
url
string
 

More Information

API Explorer - Upload image to schedule

Suggest Edits

Add an image to an Event

Binary file upload and you will receive a url to that file. Media images will be auto scaled to sizes by width (2500, 1000, 750, 500, 300, 100)

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/events/eventId/media
curl --request POST \
  --url https://api.whenhub.com/api/events/eventId/media
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/events/eventId/media' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/events/eventId/media")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/events/eventId/media");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/events/eventId/media"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

eventId
string
required

Body Params

Type
string
url
string
 

Example Value

{
  "type": "string", // "image"
  "content": "string",
  "url": "string",
  "name": "string",
  "description": "string",
  "order": 0,
  "autoScaled": true,
  "sources": [
    "string"
  ],
  "id": "string",
  "userId": "string",
  "eventId": "string",
  "scheduleId": "string",
  "createdAt": "2017-04-11",
  "updatedAt": "2017-04-11",
  "createdBy": "string",
  "updatedBy": "string"
}

More Information

API Explorer - Creates a new instance in media of this model

Suggest Edits

Add a New Collaborator to a Schedule

Add new collaborators or viewers to specified schedules by the user's email address.

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.whenhub.com/api/schedules/id/editors/email
curl --request POST \
  --url https://api.whenhub.com/api/schedules/id/editors/email
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.whenhub.com/api/schedules/id/editors/email' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/id/editors/email")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.whenhub.com/api/schedules/id/editors/email");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/id/editors/email"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The id of the schedule to add the new person to the collaborators list.

Body Params

permissionLevel
string
required

Permission level allowed for user on specified schedule. **Valid values are "editor" and "viewer".

email
string

Email of person to be added to editors list.

 
Suggest Edits

Remove a Collaborator from a Schedule

Remove a collaborator from a schedule with their User Id

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId
curl --request DELETE \
  --url https://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId/editors/remove/userId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

Id of schedule from which the collaborator will be removed.

userId
string
required

Id of collaborator to be removed.

 
Suggest Edits

Get Specific Event

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/schedules/scheduleId/events/eventId
curl --request GET \
  --url https://api.whenhub.com/api/schedules/scheduleId/events/eventId
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.whenhub.com/api/schedules/scheduleId/events/eventId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/schedules/scheduleId/events/eventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/schedules/scheduleId/events/eventId");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/schedules/scheduleId/events/eventId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

scheduleId
string
required

Id of Schedule with specific Event

eventId
string
required

Id of specific event.

 
Suggest Edits

Get Media Items for a Specific Event

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.whenhub.com/api/events/eventId/media
curl --request GET \
  --url https://api.whenhub.com/api/events/eventId/media
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.whenhub.com/api/events/eventId/media' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.whenhub.com/api/events/eventId/media")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.whenhub.com/api/events/eventId/media");

xhr.send(data);
import requests

url = "https://api.whenhub.com/api/events/eventId/media"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

eventId
string
required

Id of event.