StackMap  JSON  API  Specification  Version  3.0  

StackMap  JSON  API  Specification   Version  3.0,  August  12,  2012  

Description   This  document  outlines  a  protocol  for  communicating  with  the  StackMap  library  mapping  system  to  be   used  by  third-­‐party  systems.    This  protocol  allows  a  third-­‐party  system  to  query  StackMap  for   information  regarding  the  location  of  holdings,  which  the  API  returns  in  the  specified  format.    Any   questions  regarding  this  document  should  be  sent  to  [email protected].  

Overview   The  StackMap  API  allows  a  system  to  query  StackMap’s  database  to  retrieve  range  maps  and   information.    The  system  accepts  queries  for  one  or  more  holding  records,  and  returns  the  data   associated  with  each  one  in  the  format  below.    The  data  is  designed  to  give  a  third-­‐party  system  all  the   information  it  needs  to  construct  a  client-­‐side  interface  similar  to  the  one  available  within  StackMap.  

Technical  Specification   Request  URL   All  requests  to  the  API  are  HTTP  GET  requests  to  http://your-­‐,  where  your-­‐ domain  is  the  specific  StackMap  installation  for  your  library.      

GET  Data   The  GET  request  consists  of  JSON  containing  the  request  fields.    Each  node  type  is  described  below.   §



o The  text  of  the  call  number  of  the  holding. “library”


o The  text  of  the  library  of  the  holding. “location”



 “callback” o To  support  AJAX,  the  API  also  supports  callback  functions  through  JSONP




A  unique  field  used  by  StackMap  to  determine  the  general  location  of  the  holding.    This   may  be  a  library  name  or  ID  number,  as  well  as  a  floor  name.    Consult  the  StackMap   team  for  more  information  on  this  field  


StackMap  JSON  API  Specification  Version  3.0  

Request  Example   An  example  request  is  given  below:   {"callno":"ABC", "library":"LIBRARY", "location":"STACKS" }

Done  using  AJAX  (such  as  with  jQuery’s  getJSON),  the  request  might  be  formatted  as: /json/?callback=jsonp1234567890123&_=1234567890123&callno=ABC&library=LIBRARY &location=STACKS

Response  Specification   The  response  from  the  StackMap  server  is  JSON  that  contains  the  information  about  the  requested   holdings.    Each  response  field  is  described  below.  Note  that  the  response  may  contain  additional  fields   as  the  API  is  improved.   Response   A  field  corresponding  to  the  holding  in  the  request  with  the  following  structure   §



o The  data  associated  with  the  result  of  the  query.  The  specifics  are  described  below. “stat”

o §

The  text  of  the  response  status.  Currently,  this  is  either  “OK”  or  “FAIL”  

“message” o

The  text  of  a  message  describing  the  response.  If  the  stat  is  “FAIL,”  this  field  will   describe  what  went  wrong

Results   A  field  corresponding  to  the  results  in  the  request  with  the  following  structure   §



o The  text  of  the  call  number  of  the  holding. “library”





o o o §

The  text  of  the  library  of  the  holding  given.   The  text  of  the  location  of  the  holding  given.   The  text  of  general  notes  about  the  given  map.  This  field  may  be  empty  if  there  are  no   comments.  

“maps” o

An  array  of  maps.  The  specifics  of  each  item  are  described  below.

Map   A  field  describing  a  single  map  associated  with  the  holding  with  the  following  structure  



StackMap  JSON  API  Specification  Version  3.0   §



o The  text  of  the  name  of  the  floor  of  the  given  map. “mapurl”

o §

“directions” o


The  text  of  the  URL  of  the  image  for  the  given  map.  If  you  want  to  have  markers  drawn   into  the  map,  you  can  append  “&marker=1”  to  the  end  of  this  url   The  text  of  the  directions  to  the  floor  for  the  given  map.  This  is  potentially  a  multi-­‐line   string.

“ranges” o

An  array  of  range.  The  specifics  of  each  item  are  described  below.

Range   A  field  describing  a  single  range  for  a  given  map  with  the  following  structure   §





o An  decimal,  the  y  position  of  the  center  of  the  range  on  the  map,  in  pixels “coordinates”  





An  decimal,  the  x  position  of  the  center  of  the  range  on  the  map,  in  pixels

An  array  of  4  coordinates,  each  a  (x,y)  pair  of  decimal  pixel  positions  


The  text  of  the  name  of  the  range  in  the  range  numbering  system “callnos” o An  array  of  call  numbers,  each  with  a  start  and  end “callnoDisplay” o The  text  of  the  call  number  data.  The  format  of  this  is  “  -­‐  ,    -­‐   ”.  This  is  equivalent  data  to  the  callnos data  but  is  formatted  for  your   convenience






Deprecated.  Use  rangename  instead  




o Deprecated.  An  integer,  the  range’s  assigned  number  on  the  floor “startcallno”



o o

Deprecated.  The  starting  call  number  of  the  range   Deprecated.  The  ending  call  number  of  the  range  

Response  Example   Below  is  an  example  response  for  the  example  query  given  above,  from  the  “Request  Example”  section.   {"results":{ "callno": "ABC", “library”: “...”, “location”: “...”, "notes": "...", "maps": { "map": [ { "floorname": "...", "mapurl": "...", "directions": "...",



StackMap  JSON  API  Specification  Version  3.0   "ranges": { "range": [ {"x": 10, "y": 10, "coordinates": [[1275.5, 1578.5], [1271.5, 1578.5], [1271.5, 1700.5], [1275.5, 1700.5]], "rangename": "...", "callnoDisplay": "A1 – B1, C1 – D1", "callnos": [ {“start”: “A1”, “end”: “B1”}, {“start”: “C1”, “end”: “D1”} ], "label": “...”, "rangeno": 123, "startcallno": "...", "endcallno": "..."}, ] }, }, ] } },"stat":"OK" }

Additional  Notes   The  JSON  API  also  supports  JSONP.  This  is  particularly  useful  for  making  AJAX  requests  between  the   StackMap  server  and  client-­‐side  JavaScript  in  the  OPAC  server.  In  this  case,  the  request  may  also  include   a  callback  parameter,  which  will  be  included  at  the  beginning.  The  rest  of  the  response  will  be  wrapped   in  parentheses.  



StackMap JSON API Specification - GitHub

o The text of the call number of the holding. ▫ “library” o The text ... o An decimal, the x position of the center of the range on the map, in pixels. ▫ “y” o An decimal ...

109KB Sizes 15 Downloads 291 Views

Recommend Documents

StackMap API Specification - GitHub
domain is the specific StackMap installation for your library. POST Data. The POST ... A node with the name of the library to search for the holding. ▫ Attributes.

CarrotPay API Specification
For HTTP pages: ​ ​ ..... the purse id (without displaying), if known OR display login and return.

API - GitHub
Dec 5, 2014 - • ... Slim ... Page 24 ...

Devicetree Specification - GitHub
Apr 30, 2016 - Companies ... A piece of software may be both a client program and a boot ..... defined by the DTSpec. 2.2. Devicetree Structure and Conventions. 10 ...... dtc-paper.pdf), An overview of the concept of the device tree and device ...

Architectural Requirements Specification - GitHub
cumbersome tool to have to port to mobile application clients. 4. Page 7. Description of Components .1 Odin-CLI .1.1 Technologies. The command line interface will be implemented in Python 3, using built-in classes and libraries to provide a usable in

System Requirements Specification - GitHub
This section describes the scope of Project Odin, as well as an overview of the contents of the SRS doc- ument. ... .1 Purpose. The purpose of this document is to provide a thorough description of the requirements for Project Odin. .... Variables. â€

Architectural Requirements Specification - GitHub
porchetta tri-tip kielbasa kevin chicken hamburger sirloin. Cow pastrami short ribs shank. Sirloin spare ribs jowl, beef ham hock kielbasa ribeye prosciutto cow. Capicola pork chop landjaeger jowl venison beef ribs sirloin tri-tip tenderloin pastrami

System Requirements Specification - GitHub
System Requirements Specification. Project Odin. Kyle Erwin. Joshua Cilliers. Jason van Hattum. Dimpho Mahoko. Keegan Ferrett. Note: This document is constantly under revision due to our chosen methodology, ... This section describes the scope of Pro

Orc Protocol Specification - GitHub
Jun 7, 2017 - RPC message format changed (4.1 Structure and Authentication). • New CLAIM .... signature to authenticate the payload. Positions 3 and ..... Kademlia ( • S/Kademlia ...

Orc Protocol Specification - GitHub
Aug 15, 2017 - This specification documents the Orc network protocol in its entirety for the purpose of enabling .... services and authentication is performed by the nature of Tor's routing. Each Orc node ... associated with held contracts (5. Data T

Requirement Specification - GitHub
The former one focuses on understanding and stating ... Controller Area Network ... Clearly, the services of DIL can be categorized in two groups, one bus the ...

BamTools API Tutorial - GitHub
Mar 23, 2011 - ... adjust how your app locates the shared library at runtime.

ActionScript® 4.0 Language Specification - GitHub
Dec 13, 2012 - Computer Software Documentation,'' as such terms are used in 48 C.F.R. §12.212 ... Dec 5 2012 Added syntactic support for variable-length unicode escape ...... 365. Expression. 366. ReferenceExpression = Expression. 367.

Commands for EV3-API - GitHub
char. Color of text. 1: black text. 0: wihteteext with black background. .... LED color cannot be changed while warning is set. ... (1: true, 0: false).

Sliceable Network Management API - GitHub
virtualizing all layer 2 functions the API distributes resource management such ... can be categorized as Infrastructure as a Service (IaaS) in the cloud computing.

Google Code-in Task API Specification Developers ... A Python API client and example code is available at .... "task_definition_name": "Write a test case.",.

Hypervisor Top Level Functional Specification - GitHub
100. HvSendSyntheticClusterIpiEx . ...... That is, the hypervisor is free to deliver the interrupt ..... When a message is sent, the hypervisor selects a free message buffer. ...... The Flags field included an invalid mask value in the proximity doma

Specification on Image Data File Version - GitHub
5.4.10 ShootingRecord heap ... the JFIF file format[1], as described below), sample software shall be provided openly to player vendors. ... In the separate "Decisions Concerning Extension" section, we define how various companies.

Anonymous Go-Kart: Specification Report Supervisor - GitHub
May 9, 2011 - [email protected] (83238549). Wim Looman ... Department of Computer and Electrical Engineering. University of ... kart, so that it can be easily controlled by a laptop. The second is to ..... BostonDynamicsTRQ6Sep09.pdf.

Chatter REST API Developer Overview - GitHub
Building an application outside the Salesforce platform. • Pull feed and social graph out into another application. • Push notifications and activity into the feed.

LERUKA LERUKA UseCase Specification: View public ... - GitHub
UseCase Name. Brief Description. Mockup. Flow of Events. Basic Flow. Narration. Alternative Flows. Special Requirements. Preconditions. Postconditions.

Cosmos​​IBC​​Specification - GitHub
access​​to​​only​​part​​of​​the​​state​​space.​​This​​can​​increase​​throughput,​​but​​also makes​​any​​transaction​​that​​touches​​multiple​​shards​​extremely​​diffi

The Quick Chart File Format Specification 1.01.pdf - GitHub
Page 1. The Quick Chart (.QCT). File Format Specification. Revision 1.01. 07 MAR 2009. Craig Shelley [email protected]. Disclaimer. THIS DOCUMENT ...

Zcash Protocol Specification, Version 2017.0-beta-2.7 - GitHub
T. The domain of a randomized algorithm may be (), indicating that it requires no ...... 32. 100. PoWMaxAdjustUp ◦. ◦ Q := 16. 100. PoWDampingFactor ◦. ◦ N := 4 .... The language consisting of the following encoding possibilities is pre x-fre