@@ -17,9 +17,9 @@ credential creation and requests signing.
17
17
.. image :: https://img.shields.io/pypi/wheel/ovh.svg
18
18
:alt: PyPi Wheel status
19
19
: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
21
21
:alt: Build Status
22
- :target: https://travis-ci.org /ovh/python-ovh
22
+ :target: https://github.com /ovh/python-ovh/actions/workflows/test.yaml
23
23
.. image :: https://coveralls.io/repos/github/ovh/python-ovh/badge.svg
24
24
:alt: Coverage Status
25
25
:target: https://coveralls.io/github/ovh/python-ovh
@@ -150,7 +150,6 @@ customer's information:
150
150
print (" Welcome" , client.get(' /me' )[' firstname' ])
151
151
print (" Btw, your 'consumerKey' is '%s '" % validation[' consumerKey' ])
152
152
153
-
154
153
Returned ``consumerKey `` should then be kept to avoid re-authenticating your
155
154
end-user on each use.
156
155
@@ -414,6 +413,31 @@ Example usage:
414
413
415
414
client = ovh.Client()
416
415
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
+
417
441
Custom configuration file
418
442
-------------------------
419
443
@@ -425,7 +449,6 @@ Example usage:
425
449
426
450
client = ovh.Client(config_file = ' /my/config.conf' )
427
451
428
-
429
452
Passing parameters
430
453
==================
431
454
@@ -495,21 +518,20 @@ Get the sources
495
518
cd python-ovh
496
519
python setup.py develop
497
520
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!
500
523
501
524
Run the tests
502
525
-------------
503
526
504
- Simply run ``nosetests ``. It will automatically load its configuration from
527
+ Simply run ``pytest ``. It will automatically load its configuration from
505
528
``setup.cfg `` and output full coverage status. Since we all love quality, please
506
529
note that we do not accept contributions with test coverage under 100%.
507
530
508
531
.. code :: bash
509
532
510
533
pip install -e .[dev]
511
- nosetests # 100% coverage is a hard minimum
512
-
534
+ pytest
513
535
514
536
Build the documentation
515
537
-----------------------
0 commit comments