summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/api-usage.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/api-usage.rst b/docs/api-usage.rst
index 4f8cb37..a15aecb 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -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.
@@ -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: