Skip to content

Commit

Permalink
document the dynamic aspect of objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Feb 4, 2017
1 parent 492a751 commit 2f274bc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/api-usage.rst
Expand Up @@ -2,7 +2,7 @@
Getting started with the API
############################

The ``gitlab`` package provides 3 basic types:
The ``gitlab`` package provides 3 base types:

* ``gitlab.Gitlab`` is the primary class, handling the HTTP requests. It holds
the GitLab URL and authentication information.
Expand Down Expand Up @@ -68,6 +68,17 @@ Examples:
user = gl.users.create(user_data)
print(user)
The attributes of objects are defined upon object creation, and depend on the
GitLab API itself. To list the available information associated with an object
use the python introspection tools:

.. code-block:: python
project = gl.projects.get(1)
print(vars(project))
# or
print(project.__dict__)
Some ``gitlab.GitlabObject`` classes also provide managers to access related
GitLab resources:

Expand Down

0 comments on commit 2f274bc

Please sign in to comment.