ScreenStepsScreenSteps API v1 XML API (Deprecated)How do I get a list of manuals from the API?

How do I get a list of manuals from the API?

This article contains information on the V1 XML API which has been deprecated. For docs on the V2 JSON API please see here:

http://help.screensteps.com/m/screenstepslive-api/c/182738

This article will show you how to get a list of manuals using the API. We aren't going to deal with authorizing requests in this article, just with the request urls themselves.

Example setup

To get a list of manuals what you really are doing is requesting the contents of a site. Remember that all API requests must go through a site.  

Let's say we have the following setup:

A site called "My Application" with two manuals in it:

  1. Beginner's Guide
  2. Advanced User's Guide

Request contents of a space

Request contents of a space

My request url will look like the example above:

  1. My account name (bmls).
  2. s - since I am requesting the contents of a site.
  3. The id of the site I am requesting.

If the request is properly authenticated then I will receive an XML response detailing the contents of this space.  It will contain my two manuals - "Beginner's Guide"

and "Advanced User's Guide".

Build a link in your app for each manual

Build a link in your app for each manual

Now that I know the id of the manuals in my site I can build a url or interface element that the user can click on to see that manual.

Let's say that the user selects "Beginner's Guide" in your application. You know form the XML you used to build this interface element that "Beginner's Guide" has an ID of 22. You pass that to your code for Handling the API calls.

Build request for manual contents

Build request for manual contents

Using the site id and the manual id we can now request the manual's contents.  You will notice that he url is almost exactly the same except that we have now added 'm/22' to the end of the url. This will give us the contents of the manual that the user requested.

Process response and display manual table of contents

Process response and display manual table of contents

ScreenSteps returns a response containing an XML representation of the manual table of contents (TOC).  You can then use this XML to display the manual TOC to your user.

Getting the contents of an article

Getting the contents of an article

You will use the same exact process to get the contents of an article. Your request will look like the one above where:

1. 22 = the manual id.

2. l = means we are requesting an article (lesson) in the manual.

3. 48 = the article id.

 

0 Comments

Add your comment

E-Mail me when someone replies to this comment