Skip to content

DynamicSignal/voicestorm-api-reports-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Introduction

VoiceStorm is a platform that allows you to create advocacy communities for a brand, organization, or cause. Community managers source and distribute approved content to members. Members share the content on their social channels, thereby amplifying the brand message. Learn more at http://www.dynamicsignal.com.

##Purpose of this test package: While you can use the stock VoiceStorm manager and member hub with any VoiceStorm community, that allows to view the reports on Manager Hub and leaderboard for members. Few organizations might want to disclose more reports data to members. This test package is intended to help you do just that.

This test package includes server to server calls to get reports and users related to those reports as below:

  1. Authenticate server side.
  2. Look up reports in VoiceStorm by start and end date.
  3. If there are reports generated within the given dates get the users information such as display name, profile image.
  4. Display the reports in a table.
  5. Able to change the columns and the number of rows to be displayed.

You can use it as an example/guide to display reports data to members or to use internally. This test package can be extended in many ways as you want like, adding the ability to choose custom start and end date by the user etc.

##Download, install, and run to display reports:

To display reports data of your own VoiceStorm instance, you will need to download the sample code and modify it to point at your own VoiceStorm instance. The guide below will walk you through this process in 4 steps:

  1. Set up your webserver to run and install the test package. Once installed properly, the test package will run against your VS instance.
  2. Contact Dynamic Signal and get your own VS instance and API credentials.
  3. Modify the test package in order to point it at your new VS instance.
  4. Test it!

The sample site uses REST APIs to make authentic calls to the server. Further reference docs and required documentation are available at http://dev.voicestorm.com/. Once you go through this guide, you should have enough background to display more or less information of reports data to users.

###Step 1: Set up webserver/environment

  1. Install WAMP, or comparable webserver.
    1. Actual requirements are:
      1. Webserver
      2. PHP
      3. CURL
      4. HTTPS cert
    2. No database is required
  2. Test the environment:
    1. Ensure CURL is installed.
    2. Ensure PHP is installed.
  3. Download the code to the desired directory within the WAMP file structure.

You should now be able to run the code. Try it by opening up your install location in a browser. Next, let’s get you set up on your own VoiceStorm instance.

###Step 2: Obtain your VoiceStorm instance

You will need to contact DS and request an instance of VoiceStorm with API access. Be sure you get the following from the DS rep:

  1. URL for the new community ([example].voicestorm.com)
  2. The Admin -> API should be visible in the manager application ([example].voicestorm.com/manage/api), and this information should be available in that tab:
    1. Access Token
    2. Token Secret
    3. REST API Base URL

###Step 3: Modify test package to point at your own VoiceStorm instance

Download the code to your machine, and make the following changes, using tokens and URLs found at Admin -> API ([example]voicestorm.com/manage/api).

File Code Line From API Page
config.php $voicestormAccessToken Access Token
$voicestormTokenSecret Token Secret
$voicestormBaseUrl REST API Base URL

Examples

$voicestormAccessToken="XXXXXXXXXXXXXXXXXXXX";
$voicestormTokenSecret= "XXXXXXXXXXXXXXXXXXXX";
$voicestormBaseUrl="https://[example].voicestorm.com/v1";

###Step 4: Testing

Please test the following:

Now you should be able to see the Last 30 days reports. Must be able to see different results by changing the duration in the dropdown. Also, you can modify the columns and rows that are to be displayed by changing $reportDisplayFields (columns that are displayed) and $displayRows (Number of rows that are to be displayed) in config.php.

Have any questions?

We are eager to hear them. Email us at info@dynamicsignal.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages