Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Shelter Database
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
CHARISM
Shelter Database
Commits
c70d8920
Commit
c70d8920
authored
Sep 07, 2016
by
Cédric Bonhomme
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.list.lu:charism/shelter-database
parents
18b7a4f2
43b6d361
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
537 additions
and
5 deletions
+537
-5
CHANGELOG.md
CHANGELOG.md
+1
-5
documentation/api.rst
documentation/api.rst
+32
-0
documentation/api_v0.1.rst
documentation/api_v0.1.rst
+54
-0
documentation/deployment.rst
documentation/deployment.rst
+442
-0
documentation/index.rst
documentation/index.rst
+8
-0
No files found.
CHANGELOG.md
View file @
c70d8920
Shelter Database project news
Shelter Database project news
<<<<<<< HEAD
0.
3 (2016-08-02)
0.
3 (2016-08-02)
*
merge the rodekruis repository (https://github.com/rodekruis/shelter-database)
*
merge the rodekruis repository (https://github.com/rodekruis/shelter-database)
in the LIST repository;
in the LIST repository;
...
@@ -10,7 +10,3 @@ Shelter Database project news
...
@@ -10,7 +10,3 @@ Shelter Database project news
0.
1 (2016-04-10)
0.
1 (2016-04-10)
*
first stable prototype with base functionalities.
*
first stable prototype with base functionalities.
=======
0.
1 (2015-03-30)
-
initial release.
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
documentation/api.rst
View file @
c70d8920
...
@@ -28,6 +28,10 @@ Web Services
...
@@ -28,6 +28,10 @@ Web Services
============
============
Example of requests to the Web Service
Example of requests to the Web Service
<<<<<<< HEAD
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
--------------------------------------
--------------------------------------
.. code-block:: shell
.. code-block:: shell
...
@@ -46,6 +50,34 @@ Example of requests to the Web Service
...
@@ -46,6 +50,34 @@ Example of requests to the Web Service
# Get the translations of a string
# Get the translations of a string
$ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
$ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
Web Services
============
Example of requests to the Web Service
--------------------------------------
.. code-block:: shell
# Get the list of root categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_null"}]}
# Get the list of child categories
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"}]}
# Get information about the child category "Walls & Frame"
$ GET http://127.0.0.1:5000/api/category?q={"filters":[{"name":"parent_id","op":"is_not_null"},{"name":"name","op":"eq","val":"Walls %26 frame"}]}
# Get information about an attribute
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Landform"}]}
$ GET http://127.0.0.1:5000/api/attribute?q={"filters":[{"name":"name","op":"eq","val":"Main hazards in country"}]}
# Get the translations of a string
$ GET http://127.0.0.1:5000/api/translation?q={"filters":[{"name":"original","op":"eq","val":"Name of shelter"}]}
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
=======
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
documentation/api_v0.1.rst
View file @
c70d8920
...
@@ -62,6 +62,10 @@ request parameters:
...
@@ -62,6 +62,10 @@ request parameters:
Examples:
Examples:
<<<<<<< HEAD
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
.. code-block:: shell
.. code-block:: shell
...
@@ -89,6 +93,56 @@ Examples:
...
@@ -89,6 +93,56 @@ Examples:
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire
#get all shelters which have a specific attribute value
#get all shelters which have a specific attribute value
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
Web Services
============
Usage of the development API v0.1
---------------------------------
request parameters:
**attribute**: pass one or more attribute names, such as `<attribute=Name,Vegetation>`
NOTE: Currently the attribute names may contain capital letters and spaces.
Spaces should be substituted as `<%20>` int the URL, for example
`<Climate%20Zone>`. An alternative "coding-friendly" attribute naming will be implemented shortly,
as unique strings for each attribute whithout spaces and upper case letters.
**format**: use `<format=prettytext>` to get the nicely formatted attribute names in the JSON,
instead of the "coding-friendly" attribute names.
Examples:
.. code-block:: shell
http://0.0.0.0:5000/api/v0.1
# Welcome message and version info
http://0.0.0.0:5000/api/v0.1/shelters
# Get all shelters and their attributes
http://0.0.0.0:5000/api/v0.1/shelters/3
# Get a specific shelter via shelter ID
http://0.0.0.0:5000/api/v0.1/shelters?attribute=Vegetation
# Get all shelters which have an atttribute value for "Vegetation"
http://0.0.0.0:5000/api/v0.1/shelters?attribute=vegetation&format=prettytext
# Get all shelters which have an atttribute value for "Vegetation", with nicely formatted attribute names
http://0.0.0.0:5000/api/v0.1/attributes/Climate zone
# Get all available values of an attribute
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type
#get all shelters which have a specific attribute
http://0.0.0.0:5000/api/v0.1/shelters/Kitchen type/open fire
#get all shelters which have a specific attribute value
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
=======
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
documentation/deployment.rst
View file @
c70d8920
This diff is collapsed.
Click to expand it.
documentation/index.rst
View file @
c70d8920
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
=======
<<<<<<< HEAD
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
.. Shelter Database documentation master file, created by
.. Shelter Database documentation master file, created by
sphinx-quickstart on Sun Jun 19 21:53:46 2016.
sphinx-quickstart on Sun Jun 19 21:53:46 2016.
You can adapt this file completely to your liking, but it should at least
You can adapt this file completely to your liking, but it should at least
...
@@ -89,4 +93,8 @@ Web Services
...
@@ -89,4 +93,8 @@ Web Services
api
api
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
>>>>>>> 011351c71fefe44d232b84497307f51ee6d5b501
=======
=======
<<<<<<< HEAD
>>>>>>> b6b3759e10b96db233dac9cadc04365ff404dd97
=======
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 56b170c62373521aae3518c6fece0335e0e06ec5
>>>>>>> 19a939463af74c6008ef819369c07cfda36d9d34
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment