From 4a0882384c7b302167bb641b8cc1fcfcc3364780 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 4 May 2018 12:13:21 +0200 Subject: rscalib/__init__.py: Switch API v4 and API v5 definitions around. --- rscalib/__init__.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'rscalib') diff --git a/rscalib/__init__.py b/rscalib/__init__.py index 7077f96..948b42a 100644 --- a/rscalib/__init__.py +++ b/rscalib/__init__.py @@ -187,17 +187,10 @@ class GetMazaDataAPI1(GetMazaData): return urllib.request.Request(self.get_api_url() + path) -class GetMazaDataAPI5(GetMazaDataAPI4): - """Get the maza data for a given username/email and password via API v5.""" - - # identical for now with API v4 regarding the URL request part. +class GetMazaDataAPI5(GetMazaData): + """Get the maza data for a given email and password via API v5.""" api_version = 5 - -class GetMazaDataAPI4(GetMazaData): - """Get the maza data for a given email and password via API v4.""" - api_version = 4 - def get_url(self): return self.get_api_url() @@ -210,6 +203,13 @@ class GetMazaDataAPI4(GetMazaData): return request +class GetMazaDataAPI4(GetMazaDataAPI5): + """Get the maza data for a given username/email and password via API v4.""" + + # identical for now with API v4 regarding the URL request part. + api_version = 4 + + class GetMazaDataAPI3(GetMazaDataAPI4): """Get the maza data for a given email and password via API v3.""" api_version = 3 -- cgit v1.2.3