Page MenuHomePhorge

No OneTemporary

Authored By
Unknown
Size
14 KB
Referenced Files
None
Subscribers
None
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..69fa449
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1 @@
+_build/
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..42b4a33
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = python -msphinx
+SPHINXPROJ = Copenhagen
+SOURCEDIR = .
+BUILDDIR = _build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
diff --git a/doc/conf.py b/doc/conf.py
new file mode 100644
index 0000000..f0ca6ab
--- /dev/null
+++ b/doc/conf.py
@@ -0,0 +1,171 @@
+# -*- coding: utf-8 -*-
+#
+# Copenhagen documentation build configuration file, created by
+# sphinx-quickstart on Thu Oct 12 11:39:26 2017.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#
+# needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = []
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Copenhagen'
+copyright = u'2017, Aleksander Machniak, Jeroen van Meeuwen'
+author = u'Aleksander Machniak, Jeroen van Meeuwen'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = u'0.1'
+# The full version, including alpha/beta/rc tags.
+release = u'0.1-1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#
+# html_theme_options = {}
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# This is required for the alabaster theme
+# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
+html_sidebars = {
+ '**': [
+ 'about.html',
+ 'navigation.html',
+ 'relations.html', # needs 'show_related': True theme option to display
+ 'searchbox.html',
+ 'donate.html',
+ ]
+}
+
+
+# -- Options for HTMLHelp output ------------------------------------------
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Copenhagendoc'
+
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+ # The paper size ('letterpaper' or 'a4paper').
+ #
+ # 'papersize': 'letterpaper',
+
+ # The font size ('10pt', '11pt' or '12pt').
+ #
+ # 'pointsize': '10pt',
+
+ # Additional stuff for the LaTeX preamble.
+ #
+ # 'preamble': '',
+
+ # Latex figure (float) alignment
+ #
+ # 'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+# author, documentclass [howto, manual, or own class]).
+latex_documents = [
+ (master_doc, 'Copenhagen.tex', u'Copenhagen Documentation',
+ u'Aleksander Machniak, Jeroen van Meeuwen', 'manual'),
+]
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+ (master_doc, 'copenhagen', u'Copenhagen Documentation',
+ [author], 1)
+]
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+# dir menu entry, description, category)
+texinfo_documents = [
+ (master_doc, 'Copenhagen', u'Copenhagen Documentation',
+ author, 'Copenhagen', 'One line description of project.',
+ 'Miscellaneous'),
+]
+
+
+
diff --git a/doc/events.rst b/doc/events.rst
new file mode 100644
index 0000000..eaecc4a
--- /dev/null
+++ b/doc/events.rst
@@ -0,0 +1,46 @@
+===========
+``/events``
+===========
+
+``GET /events/<folder-uid>/<event-uid>``
+========================================
+
+Request an event.
+
+.. NOTE::
+
+ Obtain the folder uid from ``/folders``, and the event uid from
+ ``/folders/<folder-uid>/objects``
+
+**Example Result**
+
+``GET /events/6c11cd1e5283576e/1D41B2DB805B93596B85F6B7BCAD5700-9EFCC9880FAF1EAB``
+
+.. parsed-literal::
+
+ {
+ "class": "PUBLIC",
+ "created": "2015-02-05T05:26:20Z",
+ "dtend": {
+ "date-time": "2015-02-06T12:30:00",
+ "parameters": {
+ "tzid": "/kolab.org/Europe/Berlin"
+ }
+ },
+ "dtstamp": "2015-02-05T05:26:20Z",
+ "dtstart": {
+ "date-time": "2015-02-06T06:30:00",
+ "parameters": {
+ "tzid": "/kolab.org/Europe/Berlin"
+ }
+ },
+ "organizer": {
+ "cal-address": "mailto:%3Cjeroen%40kolab.org%3E",
+ "parameters": {
+ "cn": "van Meeuwen, Jeroen"
+ }
+ },
+ "sequence": 0,
+ "summary": "test",
+ "uid": "1D41B2DB805B93596B85F6B7BCAD5700-9EFCC9880FAF1EAB"
+ }
diff --git a/doc/folders.rst b/doc/folders.rst
new file mode 100644
index 0000000..9546f54
--- /dev/null
+++ b/doc/folders.rst
@@ -0,0 +1,210 @@
+============
+``/folders``
+============
+
+``GET /folders``
+================
+
+Request a full list of folders.
+
+**Example Result**
+
+.. parsed-literal::
+
+ [
+ (...)
+ {
+ "fullpath": "Calendar",
+ "name": "Calendar",
+ "type": "event.default",
+ "uid": "6c11cd1e5283576e"
+ },
+ {
+ "fullpath": "Calendar/Personal",
+ "name": "Personal",
+ "parent": "6c11cd1e5283576e",
+ "type": "event",
+ "uid": "2faf3307-7d32-4d22-bb1b-9a8a40fb3872"
+ },
+ (...)
+ {
+ "fullpath": "Drafts",
+ "name": "Drafts",
+ "type": "mail.drafts",
+ "uid": "16dd16e25283576d"
+ },
+ (...)
+ {
+ "fullpath": "INBOX",
+ "name": "INBOX",
+ "type": "mail.inbox",
+ "uid": "169aad0b52725a31"
+ },
+ (...)
+ {
+ "fullpath": "Sent",
+ "name": "Sent",
+ "type": "mail.sentitems",
+ "uid": "5deaff235283576d"
+ },
+ {
+ "fullpath": "Spam",
+ "name": "Spam",
+ "type": "mail.junkemail",
+ "uid": "5df585705283576e"
+ },
+ (...)
+ {
+ "fullpath": "Trash",
+ "name": "Trash",
+ "type": "mail.wastebasket",
+ "uid": "0e307e915283576e"
+ }
+ ]
+
+.. NOTE::
+
+ The response includes properties that can be filtered. For example,
+ ``GET /folders?properties=name`` will return only the names of the
+ folders.
+
+.. NOTE::
+
+ This API call requires the client to filter the folders by type.
+
+ Any empty type is considered a mail type.
+
+``DELETE /folders/<folder-uid>``
+================================
+
+Delete a folder
+
+``GET /folders/<folder-uid>``
+=============================
+
+Get information about a specific folder.
+
+**Example Result**
+
+``GET /folders/169aad0b52725a31``
+
+.. parsed-literal::
+
+ {
+ "fullpath": "INBOX",
+ "name": "INBOX",
+ "type": "mail.inbox",
+ "uid": "169aad0b52725a31"
+ }
+
+.. NOTE::
+
+ This call should include additional metadata about the folder contents;
+
+ * recent,
+ * unread,
+ * total objects
+
+``GET /folders/<folder-uid>/folders``
+=====================================
+
+Retrieve a list of sub-folders, if any.
+
+``GET /folders/<folder-uid>/objects``
+=====================================
+
+Obtain a list of objects in the folder specified with ``uid``.
+
+**Example Result**
+
+``GET /folders/169aad0b52725a31/objects``
+
+.. parsed-literal::
+
+ [
+ (...)
+ {
+ "bcc": [],
+ "categories": [],
+ "cc": [],
+ "date": "Mon, 4 Sep 2017 01:09:20 +0100",
+ "flags": [
+ "seen"
+ ],
+ "from": {
+ "address": "noreply_support@comodo.com",
+ "name": "Comodo Security Services"
+ },
+ "has-attach": false,
+ "internaldate": " 4-Sep-2017 02:16:09 +0200",
+ "message-id": "mid:44",
+ "reply-to": [],
+ "sender": [],
+ "size": 2332,
+ "subject": "Comodo Domain Validation for \*.kolab.org",
+ "to": [
+ {
+ "address": "administrator@kolab.org",
+ "name": "administrator@kolab.org"
+ }
+ ],
+ "uid": "112"
+ },
+ (...)
+ ]
+
+``HEAD /folders/<folder-uid>/folders``
+======================================
+
+Retrieve the number of sub-folders (as an ``X-Count`` response header value).
+
+``HEAD /folders/<folder-uid>/objects``
+======================================
+
+Retrieve an object count (as an ``X-Count`` response header value).
+
+``POST /folders``
+=================
+
+Create a folder.
+
+**Example Result**
+
+``POST /folders -d '{"name":"Test"}'``
+
+.. parsed-literal:
+
+ {
+ "uid": "92ba0f35-40fe-4d0c-9b2a-81052e4e2cec"
+ }
+
+``POST /folders/<folder-uid>/deleteobjects``
+============================================
+
+Delete selected objects from the folder. Supply a list of object UIDs.
+
+**Example Result**
+
+``POST /folders/169aad0b52725a31/deleteobjects`` with ``[112,113]`` will delete objects 112 and 113.
+
+``POST /folders/<folder-uid>/empty``
+====================================
+
+Clear out the contents of the folder.
+
+``POST /folders/<folder-uid>/move/<folder-uid>``
+================================================
+
+Move objects to another folder. The first folder uid is the source, the second folder uid the target.
+
+Supply a list of object uids to move.
+
+``HEAD /folders/<folder-uid>``
+==============================
+
+Verify the folder exists.
+
+``PUT /folders/<folder-uid>``
+=============================
+
+Update the folder.
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..63fdbfc
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,11 @@
+========================
+Copenhagen API Reference
+========================
+
+.. toctree::
+ :maxdepth: 1
+
+ events
+ info
+ folders
+ mails
diff --git a/doc/info.rst b/doc/info.rst
new file mode 100644
index 0000000..f725cf0
--- /dev/null
+++ b/doc/info.rst
@@ -0,0 +1,17 @@
+=========
+``/info``
+=========
+
+``GET /info``
+=============
+
+Request general info about Copenhagen.
+
+.. parsed-literal::
+
+ {
+ "capabilities": [],
+ "name": "Kolab REST API",
+ "version": "0.1"
+ }
+
diff --git a/doc/mails.rst b/doc/mails.rst
new file mode 100644
index 0000000..7afc1c6
--- /dev/null
+++ b/doc/mails.rst
@@ -0,0 +1,45 @@
+==========
+``/mails``
+==========
+
+``GET /mails/<folder-uid>/<message-uid>``
+=========================================
+
+**Example Result**
+
+``GET /mails/169aad0b52725a31/112``
+
+.. parsed-literal::
+
+ {
+ "bcc": [],
+ "categories": [],
+ "cc": [],
+ "date": "Mon, 4 Sep 2017 01:09:20 +0100",
+ "flags": [
+ "seen"
+ ],
+ "from": {
+ "address": "noreply_support@comodo.com",
+ "name": "Comodo Security Services"
+ },
+ "has-attach": false,
+ "internaldate": " 4-Sep-2017 02:16:09 +0200",
+ "message-id": "<LI4o29XdHNdhWPJ9jBEhmg@mcmail4.mcr.colo.comodo.net>",
+ "reply-to": [],
+ "sender": [],
+ "size": 2332,
+ "subject": "Comodo Domain Validation for \*.kolab.org",
+ "text": "Dear administrator@kolab.org,\n\nComodo has received a request (...).
+ \n\nKind Regards,\n\nComodo Security Services\n\nComodo CA Limited - US Office
+ \n525 Washington Blvd.\nJersey City, NJ 07310-1600\n\nComodo CA Limited -
+ European Office\n26 Office Village,\nExchange Quay, Trafford Road,\nSalford,
+ Manchester M5 3EQ,\nUnited Kingdom\n",
+ "to": [
+ {
+ "address": "administrator@kolab.org",
+ "name": "administrator@kolab.org"
+ }
+ ],
+ "uid": "112"
+ }

File Metadata

Mime Type
text/x-diff
Expires
Fri, Apr 24, 12:48 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18896678
Default Alt Text
(14 KB)

Event Timeline