Moseycode is intended to serve as both an application that allows users to create, publish and interact with barcodes and as a platform for software developers to easily integrate barcode functionality into their applications. Software developers can use Moseycode freely within their own applications, choosing the degree of integration they want.
To make it easier for developers to introduce Moseycode into their
applications, a number of web services have been made available. At present
all services are hosted at http://services.moseycode.com
.
This service generates images of barcodes (portals in the parlance of Moseycode).
Requests to the service take one of the following two forms:
http://services.moseycode.com/portal/chamberID/data/dimensions.(jpg|png)
http://services.moseycode.com/portal/chamberID/url/dimensions.(jpg|png)?url=URL
Where
chamberID
data
dimensions
widthxheight
).URL
* All numbers supplied to the portal service are supplied as
unsigned denary integers, or as unsigned hexadecimal integers prefixed by 0x
.
This service is an auxilliary service. It performs a function that is similar to that of TinyURL but tailored to the needs of other Moseycode services.
Requests to the service take one of the following three forms:
http://services.moseycode.com/lookup/hash/URL
http://services.moseycode.com/lookup/url/hash
http://services.moseycode.com/lookup/redirect/hash
In the first case, the service returns an ASCII encoded plain text document that contains single unsigned base 10 number in the range [0, 248) to serve as a permanent and unique hash for the supplied URL.
In the second case, the service returns the URL from which the supplied hash value was generated. The URL is returned in a UTF-8 encoded plain text document.
In the third case, the service responds with a 'moved permanently' (301) redirection to the URL from which the supplied hash was generated.
In all cases, an invalid service call generates a response with status code 404
together with a brief message indicating what was wrong with the request. At
the present time, only URLs that use the schemes http
and
https
are supported.
This service is used to in the url data scheme of the portal service.
Requests to the service are of the form:
http://services.moseycode.com/chamber/chamberID
where chamberID
is a 30 bit numeric identifier,
expressed in denary, that specifies the chamber definition to be returned.
Chamber definitions are UTF-8 encoded XML documents the specifications for
which will be detailed separately.
The following examples (which do not necessarily exhibit valid data)
demonstrate various ways of invoking the services. The domain from which the
requests are made has been omitted for brevity, it is
http://services.moseycode.com
in every case.
/portal/0x87e83ac9/0/200x200.png
/portal/10001/0xfffe+0x78f80000/200x200.jpg
/portal/238432/url/200x200.png?url=http://www.google.com
/lookup/hash/http://www.google.com
/lookup/url/220353061714604
/lookup/redirect/220353061714604
/lookup/redirect/220353061714604
/chamber/7