Skip to content

Commit

Permalink
Adds more documentation to docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
Florencia-97 committed Jan 29, 2024
1 parent 3608d58 commit cad3d06
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 26 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ Communication package for javascript.
$ npm i @eryxcoop/appyx-comm
```

# Contribute
## Contribute

In order to update npm package a new release must be created. Any new release must be named
@eryxcoop/appyx-comm-{version}

# Work to be done

- [x] Deploy library as a package in npm
- [ ] Complete documentation
- [x] Add ApiClient
- [x] Add tests
@eryxcoop/appyx-comm-{version}
22 changes: 20 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx_mdinclude",
]


Expand All @@ -26,7 +28,23 @@
# html_theme = "sphinx_rtd_theme"

# -- Options for HTML output -------------------------------------------------

# -- 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"
html_theme_options = {
"description": "...",
"fixed_sidebar": True,
"badge_branch": "main",
"github_button": False,
"github_user": "eryxcoop",
"github_repo": "appyx-comm",
"show_powered_by": False,
"sidebar_collapse": False,
}
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'alabaster'
html_static_path = ['_static']
36 changes: 34 additions & 2 deletions docs/api.rst → docs/guide.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
``ApiClient``
-------------

wip


``Requesters``
-------------

Information about the requesters.
wip

``Endpoints``
-------------

Information about endpoints.
When you create and ``Endpoint`` you are defining where the request should be made, what type of request is it and what kind of responses should you expect.
Your ApiClient will be able to execute the endpoint you created.
For example, you can create an endpoint like this:

.. code-block:: javascript
:linenos:
class ExampleEndpoint extends Endpoint{
url() {
return "example_url";
}
ownResponses() {
return [GetExampleResponse];
}
method() {
return this.constructor.getMethod();
}
needsAuthorization() {
return true;
}
}
// Now you can use it like this
const endpointToExample = new ExampleEndpoint();
const response = await client._callEndpoint(endpointToExample);
``Responses``
-------------
Expand Down
18 changes: 5 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
appyx-comm
=========

.. image:: https://github.com/github/docs/actions/workflows/test.yml/badge.svg
:alt: GitHub Actions - CI


.. image:: https://badge.fury.io/js/@eryxcoop%2Fappyx-comm.svg
:target: https://badge.fury.io/js/@eryxcoop%2Fappyx-comm
.. mdinclude:: ../README.md

Appy-Comm
-----

Appy-Comm is a library to help you to communicate with Appyx, but also if your are not using it! Now you request are simpler and responses can be handled easily.
Appy-Comm is a library to help you to communicate with Appyx, but also if your are not using it! Now your requests are simpler and responses can be handled easily.


.. toctree::
:maxdepth: 2
:caption: Usage
:hidden:
:maxdepth: 2

api
guide


.. toctree::
Expand Down

0 comments on commit cad3d06

Please sign in to comment.