GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( e3a209...bb2a36 )
by Juan Jose
01:39
created

SetGPS.set_gps_track()   A

Complexity

Conditions 2

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
from route4me.base import Base
2
from route4me.exceptions import ParamValueException
3
from route4me.api_endpoints import SET_GPS_HOST
4
5
6
class SetGPS(Base):
7
    """
8
        Set GPS position of the device
9
    """
10
11
    requirements = ('api_key',
12
                    'format',
13
                    'member_id',
14
                    'route_id',
15
                    'course',
16
                    'speed',
17
                    'lat',
18
                    'lng',
19
                    'device_type',
20
                    'device_guid',
21
                    )
22
23
    def __init__(self, api):
24
        self.response = None
25
        self.params = {'api_key': api.key, }
26
        Base.__init__(self, api)
27
28
    def set_gps_track(self, **kwargs):
29
        """
30
        Set GPS position of device using GET request
31
        :return: Response status
32
        :raise: ParamValueException if any required param is not set
33
        """
34
        kwargs.update({'api_key': self.params['api_key'], })
35
        if self.check_required_params(kwargs, self.requirements):
36
            self.response = self.api._request_get(SET_GPS_HOST,
37
                                                  self.params)
38
            response = self.response.json()
39
            return response.get('status')
40
        else:
41
            raise ParamValueException('params', 'Params are not complete')
42