@@ -17,9 +17,9 @@ credential creation and requests signing.
1717.. image :: https://img.shields.io/pypi/wheel/ovh.svg
1818 :alt: PyPi Wheel status
1919 :target: https://pypi.python.org/pypi/ovh
20- .. image :: https://travis-ci.org /ovh/python-ovh.svg?branch=master
20+ .. image :: https://github.com /ovh/python-ovh/actions/workflows/test.yaml/badge .svg?branch=master
2121 :alt: Build Status
22- :target: https://travis-ci.org /ovh/python-ovh
22+ :target: https://github.com /ovh/python-ovh/actions/workflows/test.yaml
2323.. image :: https://coveralls.io/repos/github/ovh/python-ovh/badge.svg
2424 :alt: Coverage Status
2525 :target: https://coveralls.io/github/ovh/python-ovh
@@ -150,7 +150,6 @@ customer's information:
150150 print (" Welcome" , client.get(' /me' )[' firstname' ])
151151 print (" Btw, your 'consumerKey' is '%s '" % validation[' consumerKey' ])
152152
153-
154153 Returned ``consumerKey `` should then be kept to avoid re-authenticating your
155154end-user on each use.
156155
@@ -414,6 +413,31 @@ Example usage:
414413
415414 client = ovh.Client()
416415
416+ Use v1 and v2 API versions
417+ --------------------------
418+
419+ When using OVHcloud APIs (not So you Start or Kimsufi ones), you are given the
420+ opportunity to aim for two API versions. For the European API, for example:
421+
422+ - the v1 is reachable through https://eu.api.ovh.com/v1
423+ - the v2 is reachable through https://eu.api.ovh.com/v2
424+ - the legacy URL is https://eu.api.ovh.com/1.0
425+
426+ Calling ``client.get ``, you can target the API version you want:
427+
428+ .. code :: python
429+
430+ client = ovh.Client(endpoint = " ovh-eu" )
431+
432+ # Call to https://eu.api.ovh.com/v1/xdsl/xdsl-yourservice
433+ client.get(" /v1/xdsl/xdsl-yourservice" )
434+
435+ # Call to https://eu.api.ovh.com/v2/xdsl/xdsl-yourservice
436+ client.get(" /v2/xdsl/xdsl-yourservice" )
437+
438+ # Legacy call to https://eu.api.ovh.com/1.0/xdsl/xdsl-yourservice
439+ client.get(" /xdsl/xdsl-yourservice" )
440+
417441 Custom configuration file
418442-------------------------
419443
@@ -425,7 +449,6 @@ Example usage:
425449
426450 client = ovh.Client(config_file = ' /my/config.conf' )
427451
428-
429452 Passing parameters
430453==================
431454
@@ -495,21 +518,20 @@ Get the sources
495518 cd python-ovh
496519 python setup.py develop
497520
498- You've developed a new cool feature ? Fixed an annoying bug ? We'd be happy
499- to hear from you !
521+ You've developed a new cool feature? Fixed an annoying bug? We'd be happy
522+ to hear from you!
500523
501524Run the tests
502525-------------
503526
504- Simply run ``nosetests ``. It will automatically load its configuration from
527+ Simply run ``pytest ``. It will automatically load its configuration from
505528``setup.cfg `` and output full coverage status. Since we all love quality, please
506529note that we do not accept contributions with test coverage under 100%.
507530
508531.. code :: bash
509532
510533 pip install -e .[dev]
511- nosetests # 100% coverage is a hard minimum
512-
534+ pytest
513535
514536 Build the documentation
515537-----------------------
0 commit comments