Skip to content

Commit

Permalink
IVIS-46: - Update API chapter (guardians).
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanPopenko committed Oct 26, 2016
1 parent 35c5d06 commit ba85bc1
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 49 deletions.
15 changes: 15 additions & 0 deletions docs/api/academicyear.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
List of properties from AcademicYear
====================================

#. id(NUMBER)
#. name(STRING)

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json
{
"id" : 0,
"name" : ""
}
21 changes: 21 additions & 0 deletions docs/api/afterschoolcenterschema.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
List of properties from AfterSchoolCenterSchema
===============================================

#. after_school_section(Object)
type of `AfterSchoolCenterSection <http://docs.ivis.se/en/latest/api/afterschoolcentersection.html>`_
#. day_of_week(STRING)
Only can be "MONDAY" .. "SUNDAY"
#. use_before_school(BOOLEAN)
#. use_after_school(BOOLEAN)

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json
{
"after_school_section" : {},
"day_of_week" : "MONDAY",
"use_before_school" : false,
"use_after_school" : false
}
27 changes: 27 additions & 0 deletions docs/api/guardian.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
List of properties from Guardian
================================

#. id(NUMBER)
#. person(OBJECT)
type of `Person <http://docs.ivis.se/en/latest/api/person.html>`_
#. pupils(ARRAY)
type of `Pupil <http://docs.ivis.se/en/latest/api/pupil.html>`_

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json
{
"id" : 0,
"person" : {
"id" : null,
"personal_id" : null,
"first_name" : null,
"last_name" : null,
"addresses" : { },
"emails" : { },
"phones" : { }
},
"pupils" : [ ]
}
55 changes: 6 additions & 49 deletions docs/api/guardians.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ Provides following method for `API <index.html>`_ calls:
* `Save guardians`_
* `Update guardian`_
* `Delete guardian`_
* `Get guardian or guardians by personal id`_
* `Get guardian or guardians by name`_

.. _`Get guardian`:

Expand Down Expand Up @@ -40,7 +38,7 @@ Parameters response:
#. person(OBJECT)
type of `Person <http://docs.ivis.se/en/latest/api/person.html>`_
#. pupils(ARRAY)
type of `pupils <http://docs.ivis.se/en/latest/api/pupil.html>`_
type of `Pupil <http://docs.ivis.se/en/latest/api/pupil.html>`_

Example of response:
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -83,8 +81,8 @@ Parameters response:
*Array*

.. seealso::
Array consists of objects from `Get guardian`_ method

Array consists of objects from `Get guardian`_ method

Save guardian
-------------
Expand Down Expand Up @@ -153,8 +151,8 @@ Parameters response:
*OBJECT(Guardian)*

.. note::
property will be updated, if you don't want update property it need set null

property will be updated, if you don't want update property it need set null

.. _`Delete guardian`:

Expand All @@ -178,49 +176,8 @@ Parameters response:
*OBJECT(Guardian)*

.. note::
you receive deleted object

.. _`Get guardian or guardians by personal id`:

Get guardian or guardians by personal id
-------------------------------------

URL:
~~~~
*/guardians

Method:
~~~~~~~
*GET*

Parameters request:
~~~~~~~~~~~~~~~~~~~
*personalId(STRING)*
*first(BOOLEAN)* - optional

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*ARRAY or OBJECT (Guardian)*

.. _`Get guardian or guardians by name`:

Get guardian or guardians by name
---------------------------------

URL:
~~~~
*/guardians
Method:
~~~~~~~
*GET*
you receive deleted object

Parameters request:
~~~~~~~~~~~~~~~~~~~
*name(STRING)*
*first(BOOLEAN)* - optional

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*ARRAY or OBJECT (Guardian)*

24 changes: 24 additions & 0 deletions docs/api/pupil.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
List of properties from Pupil
=============================

#. id(NUMBER)
#. person(OBJECT)
type of `Person <http://docs.ivis.se/en/latest/api/person.html>`_
#. contact_person(OBJECT)
type of `Person <http://docs.ivis.se/en/latest/api/person.html>`_
#. class_placement_from(NUMBER)
#. class_placement_to(NUMBER)
#. school_class(OBJECT)
type of `SchoolClass <http://docs.ivis.se/en/latest/api/schoolclass.html>`_
#. school
type of `School <http://docs.ivis.se/en/latest/api/school.html>`_
#. academic_year(OBJECT)
type of `AcademicYear <http://docs.ivis.se/en/latest/api/academicyear.html>`_
#. guardians(ARRAY)
type of `Guardian <http://docs.ivis.se/en/latest/api/guardian.html>`_
#. truancies(ARRAY)
type of `Truancy <http://docs.ivis.se/en/latest/api/truancy.html>`_
#. after_school_center_section(OBJECT)
type of `AfterSchoolCenterSection <http://docs.ivis.se/en/latest/api/afterschoolcentersection.html>`_
#. school_center_schema(ARRAY)
type of `AfterSchoolCenterSchema <http://docs.ivis.se/en/latest/api/afterschoolcenterschema.html>`_
40 changes: 40 additions & 0 deletions docs/api/truancy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
List of properties from Truancy
===============================

#. id(NUMBER)
#. pupil(OBJECT)
type of `Pupil <http://docs.ivis.se/en/latest/api/pupil.html>`_
#. start_date(NUMBER)
#. end_date(NUMBER)

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json
{
"id" : 0,
"pupil" : {
"id" : null,
"person" : {
"id" : null,
"personal_id" : null,
"first_name" : null,
"last_name" : null,
"addresses" : { },
"emails" : { },
"phones" : { }
},
"contact_person" : null,
"class_placement_from" : null,
"class_placement_to" : null,
"school_class" : null,
"school" : null,
"academic_year" : null,
"guardians" : [ ],
"after_school_center_section" : null,
"school_center_schema" : [ ]
},
"start_date" : 1477474352801,
"end_date" : 1477474352801
}

0 comments on commit ba85bc1

Please sign in to comment.