rabble-rouser / Healthspek-WebSpeks

Healthspek Web Speks Developer's Guide and Quick-Start Template
0 stars 0 forks source link

Web Spek Developer's Guide
& Quick-Start Template

Healthspek Web Speks are web pages embedded into the Healthspek iPad and Web Apps. Web Speks open the opportunity for you, as a developer, to create a Spek to be available for all Healthspek users. After your Spek is approved, it can be added by Healthspek users to their Healthspek Dashboards alongside all of their other Speks.

Learn more about the Healthspek Apps at Healthspek.com.

Getting Started

A Web Spek is simply a web page that you host and manage. It is viewable in Healthspek Apps in a web view. HTML, CSS and Javascript can be used as desired. We provide a Web Spek API so that your Spek can interact with the Healthspek App for added functionality.

Download our Web Spek template as a starting point for your first Spek: http://github.com/rabble-rouser/Healthspek-WebSpeks/archive/gh-pages.zip

Server Requirements You will be hosting your own Web Speks. Your server configuration must meet these guidelines:

Testing Web Speks

Submitting Your Web Spek to Healthspek

Your Web Spek must be approved by Healthspek before it is added to the Healthspek Apps. Send an email to nshaw@rabbleandrouser.com with your Web Spek name and URL to have it reviewed and added to the Healthspek Apps.

Web Spek Files

Web Spek API

Load this Javascript in your Spek HTML page to access the Web Spek API:

<script type="text/javascript" src="https://github.com/rabble-rouser/Healthspek-WebSpeks/raw/gh-pages//app.healthspek.com/api/webspek/">

API Actions:

open – open a full-screen web view

modal – open a modal web view

close – close the current full-screen or model web view

You can optionally load (or reload) a page in the parent web view:

Working with Member-Specific Data

When your Web Spek is loaded via its URL, two parameters will be passed via the URL query string:

  1. accessCode - This is a session identifier that is necessary when communicating directly with the ChartNow API. This session identifier is only guaranteed to be valid during the user's current session.
  2. individualID - This is a unique member ID that can be used to store information specific to the current member. This ID will always refer to the same member and will never change.

Web Spek Style Guide

Load this CSS in your Spek HTML page to use our CSS styles:

<link href="https://github.com/rabble-rouser/Healthspek-WebSpeks/blob/gh-pages//app.healthspek.com/api/webspek/style.css" rel="stylesheet" type="text/css">