diff --git a/docs/api/api.rst b/docs/api/api.rst --- a/docs/api/api.rst +++ b/docs/api/api.rst @@ -196,6 +196,7 @@ are not required in args. .. --- API DEFS MARKER --- .. toctree:: + methods/views methods/license-methods methods/deprecated-methods methods/gist-methods diff --git a/docs/api/methods/deprecated-methods.rst b/docs/api/methods/deprecated-methods.rst --- a/docs/api/methods/deprecated-methods.rst +++ b/docs/api/methods/deprecated-methods.rst @@ -38,7 +38,7 @@ changeset_comment Example error output: - .. code-block:: javascript + .. code-block:: json { "id" : , diff --git a/docs/api/methods/repo-methods.rst b/docs/api/methods/repo-methods.rst --- a/docs/api/methods/repo-methods.rst +++ b/docs/api/methods/repo-methods.rst @@ -66,7 +66,7 @@ comment_commit create_repo ----------- -.. py:function:: create_repo(apiuser, repo_name, repo_type, owner=>, description=, private=, clone_uri=, landing_rev=, enable_statistics=, enable_locking=, enable_downloads=, copy_permissions=) +.. py:function:: create_repo(apiuser, repo_name, repo_type, owner=>, description=, private=, clone_uri=, push_uri=, landing_rev=, enable_statistics=, enable_locking=, enable_downloads=, copy_permissions=) Creates a repository. @@ -95,6 +95,8 @@ create_repo :type private: bool :param clone_uri: set clone_uri :type clone_uri: str + :param push_uri: set push_uri + :type push_uri: str :param landing_rev: : :type landing_rev: str :param enable_locking: @@ -789,7 +791,7 @@ maintenance pull ---- -.. py:function:: pull(apiuser, repoid) +.. py:function:: pull(apiuser, repoid, remote_uri=) Triggers a pull on the given repository from a remote location. You can use this to keep remote repositories up-to-date. @@ -804,6 +806,8 @@ pull :type apiuser: AuthUser :param repoid: The repository name or repository ID. :type repoid: str or int + :param remote_uri: Optional remote URI to pass in for pull + :type remote_uri: str Example output: @@ -811,7 +815,7 @@ pull id : result : { - "msg": "Pulled from ``" + "msg": "Pulled from url `` on repo ``" "repository": "" } error : null @@ -823,7 +827,7 @@ pull id : result : null error : { - "Unable to pull changes from ``" + "Unable to push changes from ``" } @@ -976,7 +980,7 @@ strip update_repo ----------- -.. py:function:: update_repo(apiuser, repoid, repo_name=, owner=>, description=, private=, clone_uri=, landing_rev=, fork_of=, enable_statistics=, enable_locking=, enable_downloads=, fields=) +.. py:function:: update_repo(apiuser, repoid, repo_name=, owner=>, description=, private=, clone_uri=, push_uri=, landing_rev=, fork_of=, enable_statistics=, enable_locking=, enable_downloads=, fields=) Updates a repository with the given information. diff --git a/docs/api/methods/user-group-methods.rst b/docs/api/methods/user-group-methods.rst --- a/docs/api/methods/user-group-methods.rst +++ b/docs/api/methods/user-group-methods.rst @@ -51,7 +51,7 @@ add_user_to_user_group create_user_group ----------------- -.. py:function:: create_user_group(apiuser, group_name, description=, owner=>, active=) +.. py:function:: create_user_group(apiuser, group_name, description=, owner=>, active=, sync=) Creates a new user group. @@ -71,6 +71,9 @@ create_user_group :type owner: Optional(str or int) :param active: Set this group as active. :type active: Optional(``True`` | ``False``) + :param sync: Set enabled or disabled the automatically sync from + external authentication types like ldap. + :type sync: Optional(``True`` | ``False``) Example output: @@ -368,7 +371,7 @@ revoke_user_permission_from_user_group update_user_group ----------------- -.. py:function:: update_user_group(apiuser, usergroupid, group_name=, description=, owner=, active=) +.. py:function:: update_user_group(apiuser, usergroupid, group_name=, description=, owner=, active=, sync=) Updates the specified `user group` with the details provided. @@ -387,6 +390,9 @@ update_user_group :type owner: Optional(str or int) :param active: Set the group as active. :type active: Optional(``True`` | ``False``) + :param sync: Set enabled or disabled the automatically sync from + external authentication types like ldap. + :type sync: Optional(``True`` | ``False``) Example output: diff --git a/docs/api/methods/views.rst b/docs/api/methods/views.rst new file mode 100644 --- /dev/null +++ b/docs/api/methods/views.rst @@ -0,0 +1,48 @@ +.. _views-ref: + +views +===== + +push (EE only) +-------------- + +.. py:function:: push(apiuser, repoid, remote_uri=) + + Triggers a push on the given repository from a remote location. You + can use this to keep remote repositories up-to-date. + + This command can only be run using an |authtoken| with admin + rights to the specified repository. For more information, + see :ref:`config-token-ref`. + + This command takes the following options: + + :param apiuser: This is filled automatically from the |authtoken|. + :type apiuser: AuthUser + :param repoid: The repository name or repository ID. + :type repoid: str or int + :param remote_uri: Optional remote URI to pass in for push + :type remote_uri: str + + Example output: + + .. code-block:: bash + + id : + result : { + "msg": "Pushed to url `` on repo ``" + "repository": "" + } + error : null + + Example error output: + + .. code-block:: bash + + id : + result : null + error : { + "Unable to push changes to ``" + } + +