summaryrefslogtreecommitdiff
path: root/docs/api-usage.rst
Commit message (Collapse)AuthorAgeFilesLines
* fix: add `get_all` param (and `--get-all`) to allow passing `all` to APINejc Habjan2022-07-211-5/+6
|
* feat: add `asdict()` and `to_json()` methods to Gitlab ObjectsJohn L. Villalovos2022-07-201-0/+32
| | | | | | | | | | | | | | | Add an `asdict()` method that returns a dictionary representation copy of the Gitlab Object. This is a copy and changes made to it will have no impact on the Gitlab Object. The `asdict()` method name was chosen as both the `dataclasses` and `attrs` libraries have an `asdict()` function which has the similar purpose of creating a dictionary represenation of an object. Also add a `to_json()` method that returns a JSON string representation of the object. Closes: #1116
* docs: describe ROPC flow in place of password authenticationNejc Habjan2022-07-041-13/+19
|
* docs(api): add separate section for advanced usageNejc Habjan2022-06-251-160/+0
|
* docs(api): document usage of head() methodsNejc Habjan2022-06-251-0/+22
|
* docs(api): stop linking to python-requests.orgNejc Habjan2022-06-251-3/+3
|
* docs(api-usage): add import os in exampleArthur Lutz2022-06-241-0/+1
|
* docs(usage): refer to upsteam docs instead of custom attributesNejc Habjan2022-06-061-14/+12
|
* docs: documentation updates to reflect addition of mutually exclusive attributesWalter Rowe2022-06-051-4/+5
|
* feat(client): introduce `iterator=True` and deprecate `as_list=False` in ↵John L. Villalovos2022-05-291-9/+13
| | | | | | | | | | | `list()` `as_list=False` is confusing as it doesn't explain what is being returned. Replace it with `iterator=True` which more clearly explains to the user that an iterator/generator will be returned. This maintains backward compatibility with `as_list` but does issue a DeprecationWarning if `as_list` is set.
* docs: use `as_list=False` or `all=True` in Getting startedJohn L. Villalovos2022-05-291-5/+13
| | | | | | | | | In the "Getting started with the API" section of the documentation, use either `as_list=False` or `all=True` in the example usages of the `list()` method. Also add a warning about the fact that `list()` by default does not return all items.
* docs: update issue example and extend API usage docsMichael Sweikata2022-05-241-0/+11
|
* docs: add retry_transient infosNolan Emirot2022-02-041-3/+3
| | | Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
* docs: add transient errors retry infoNolan Emirot2022-02-031-0/+1
|
* chore: add `pprint()` and `pformat()` methods to RESTObjectJohn L. Villalovos2022-01-081-0/+14
| | | | | This is useful in debugging and testing. As can easily print out the values from an instance in a more human-readable form.
* fix: handle situation where GitLab does not return valuesjlvillal/paginationJohn L. Villalovos2021-12-301-2/+11
| | | | | | | | | | | | | | | | If a query returns more than 10,000 records than the following values are NOT returned: x.total_pages x.total Modify the code to allow no value to be set for these values. If there is not a value returned the functions will now return None. Update unit test so no longer `xfail` https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers Closes #1686
* docs(api): clarify job token usage with auth()Axel Amigo Arnold2021-10-081-1/+4
| | | | See issue #1620
* feat: default to gitlab.com if no URL givenNejc Habjan2021-09-081-18/+24
| | | | | BREAKING CHANGE: python-gitlab will now default to gitlab.com if no URL is given
* fix!: raise error if there is a 301/302 redirectionJohn L. Villalovos2021-09-081-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Before we raised an error if there was a 301, 302 redirect but only from an http URL to an https URL. But we didn't raise an error for any other redirects. This caused two problems: 1. PUT requests that are redirected get changed to GET requests which don't perform the desired action but raise no error. This is because the GET response succeeds but since it wasn't a PUT it doesn't update. See issue: https://github.com/python-gitlab/python-gitlab/issues/1432 2. POST requests that are redirected also got changed to GET requests. They also caused hard to debug tracebacks for the user. See issue: https://github.com/python-gitlab/python-gitlab/issues/1477 Correct this by always raising a RedirectError exception and improve the exception message to let them know what was redirected. Closes: #1485 Closes: #1432 Closes: #1477
* feat: allow global retry_transient_errors setupKarun Japhet2021-08-291-0/+11
| | | | | | `retry_transient_errors` can now be set through the Gitlab instance and global configuration Documentation for API usage has been updated and missing tests have been added.
* docs(api): add behavior in local attributes when updating objectsNejc Habjan2021-05-061-0/+20
|
* docs: add docs and examples for custom user agentfeat/override-user-agentNejc Habjan2021-01-311-0/+3
|
* Revert "feat: use keyset pagination by default for `all=True`"Max Wittig2020-03-091-5/+1
|
* chore: fix broken requests linksNejc Habjan2020-02-251-2/+2
| | | | Another case of the double slash rewrite.
* docs: add reference for REQUESTS_CA_BUNDLENejc Habjan2020-02-251-0/+12
|
* docs(pagination): clear up pagination docsfeat/all-keyset-paginationMax Wittig2020-02-121-3/+2
| | | | Co-Authored-By: Mitar <mitar.git@tnode.com>
* feat: use keyset pagination by default for `all=True`Max Wittig2020-01-271-0/+5
|
* Merge pull request #1000 from matusf/update-auth-docsMax Wittig2020-01-261-3/+0
|\ | | | | Update auth docs
| * docs(auth): remove email/password authMatus Ferech2020-01-261-3/+0
| |
* | feat: add global order_by option to ease paginationfeat/keyset-paginationMax Wittig2020-01-261-2/+2
| |
* | feat: support keyset pagination globallyMax Wittig2020-01-261-0/+12
|/
* feat: allow cfg timeout to be overrided via kwargsAndrew Tergis2019-12-161-0/+17
| | | | | | | | | | | | | On startup, the `timeout` parameter is loaded from config and stored on the base gitlab object instance. This instance parameter is used as the timeout for all API requests (it's passed into the `session` object when making HTTP calls). This change allows any API method to specify a `timeout` argument to `**kwargs` that will override the global timeout value. This was somewhat needed / helpful for the `import_github` method. I have also updated the docs accordingly.
* feat: retry transient HTTP errorsMitar2019-12-121-0/+18
| | | | Fixes #970
* feat: add support for job tokenMathieu Parent2019-09-061-0/+4
| | | | See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage
* docs(api-usage): fix project group exampleNikolaos Pothitos2019-06-191-2/+2
| | | | Fixes #798
* docs: remove v3 supportno-more-v3Gauvain Pocentek2019-06-081-6/+1
|
* fix(api): avoid parameter conflicts with python and gitlabno-param-conflictsGauvain Pocentek2019-01-131-0/+19
| | | | | | | | | | Provide another way to send data to gitlab with a new `query_parameters` argument. This parameter can be used to explicitly define the dict of items to send to the server, so that **kwargs are only used to specify python-gitlab specific parameters. Closes #566 Closes #629
* fix: handle empty 'Retry-After' header from GitLabSrikanth Chelluri2019-01-081-1/+15
| | | | | | | | | When requests are throttled (HTTP response code 429), python-gitlab assumed that 'Retry-After' existed in the response headers. This is not always the case and so the request fails due to a KeyError. The change in this commit adds a rudimentary exponential backoff to the 'http_request' method, which defaults to 10 retries but can be set to -1 to retry without bound.
* [docs] add a warning about https://Gauvain Pocentek2018-09-051-0/+5
| | | | | http to https redirection cause problems. Make notes of this in the docs.
* [docs] fix cut and paste leftoverGauvain Pocentek2018-09-051-1/+1
|
* [docs] Fix the owned/starred usage documentationGauvain Pocentek2018-09-041-1/+1
| | | | Closes #579
* Minor doc updatesGauvain Pocentek2018-08-251-4/+4
|
* Correct session exampleStefan Crain2018-06-131-1/+1
|
* Document the global per_page settingGauvain Pocentek2018-05-261-0/+7
|
* Drop API v3 supportGauvain Pocentek2018-05-191-69/+23
| | | | Drop the code, the tests, and update the documentation.
* api-usage: bit more detail for listing with `all`Gauvain Pocentek2018-05-111-9/+10
|
* docs(api-usage): add rate limit documentationMax Wittig2018-04-181-0/+23
|
* Fix typos in documentationJakub Wilk2018-03-031-2/+2
|
* Default to API v4Gauvain Pocentek2018-02-051-7/+5
|
* Gitlab can be used as context managerGauvain Pocentek2018-02-051-0/+17
| | | | Fixes #371