Skip to content
MarPiRK edited this page Apr 15, 2015 · 4 revisions

Documentation of API. Description of possible attributes and outcomes.

Documentation current API version: 0.0.1

Output format

On the output is XML file with module-specific or general purpose tags.

General documentation info

All modules in this documentation have following format:

no. name (`short name`)

text description

Input

Attribute Description Values
attr desc possible values

Output

Tag Description Body Attributes
tag desc body attr

Errors

Id Name Description Attributes
id name desc attr

Documentation

0. General

It is used for all modules.

Input

Attribute Description Values
client Client name android
version Version number of client Version number or beta – then API doesn't care about compatibility.
module Module name lucky

Output

Tag Description Body Attributes
api Generic API info version – API version number
error Message of thrown error Error message name – error name
Every error has also its own attributes (see Errors section).

Errors

Id Name Description Attributes
1 runtime Runtime error, which should not pop out! Create issue if you see this error These attributes are not mandatory:
error_id – id of error, with witch was problem
problem_attrib – attribute, with which was problem
2 db Database error with mysql message as body db_errno – mysql's error number
3 parse Some kind of parse error
4 noAttr Attribute not found attribute – attribute, which was not found
5 attrNotValid Attribute is not valid (for invalid format – parse error) attribute – attribute, which is invalid
valid (not mandatory) – the best value of this attribute
6 nothing Nothing to show name – what exactly should be shown

1. Lucky numbers (lucky)

Lucky numbers are in Polish Szczęśliwe Numerki. Every school day at the beginning of day two numbers are ruffled. People with those numbers in class register, cannot be asked during lessons.

Input

Attribute Description Values
   range | Return numbers from range of dates (see date attributes below) | `0` or `1`
    date | If `range` is `0` returns numbers of specific day, otherwise range is from that date until today | Date in format `Y-m-d`

date1
date2 | Only applicable if range is 1date1 is range beginning date and date2 is ending date | Date in format Y-m-d

Output

Tag Description Body Attributes
lucky Lucky numbers Array of integers divided by , date – lucky number date

Errors

Id Name Description Attributes
3 parse Thrown when date format is not valid wrong – wrong date string
valid – valid date format

Clone this wiki locally