laceworksdk.api.v2.user_profile

Lacework UserProfile API wrapper.

 1# -*- coding: utf-8 -*-
 2"""
 3Lacework UserProfile API wrapper.
 4"""
 5
 6from laceworksdk.api.base_endpoint import BaseEndpoint
 7
 8
 9class UserProfileAPI(BaseEndpoint):
10
11    def __init__(self, session):
12        """
13        Initializes the UserProfileAPI object.
14
15        :param session: An instance of the HttpSession class
16
17        :return UserProfileAPI object.
18        """
19
20        super().__init__(session, "UserProfile")
21
22    def get(self):
23        """
24        A method to get UserProfile object.
25
26        :return response json
27        """
28
29        response = self._session.get(self.build_url())
30
31        return response.json()
class UserProfileAPI(laceworksdk.api.base_endpoint.BaseEndpoint):
10class UserProfileAPI(BaseEndpoint):
11
12    def __init__(self, session):
13        """
14        Initializes the UserProfileAPI object.
15
16        :param session: An instance of the HttpSession class
17
18        :return UserProfileAPI object.
19        """
20
21        super().__init__(session, "UserProfile")
22
23    def get(self):
24        """
25        A method to get UserProfile object.
26
27        :return response json
28        """
29
30        response = self._session.get(self.build_url())
31
32        return response.json()

A class used to implement base functionality for Lacework API Endpoints

UserProfileAPI(session)
12    def __init__(self, session):
13        """
14        Initializes the UserProfileAPI object.
15
16        :param session: An instance of the HttpSession class
17
18        :return UserProfileAPI object.
19        """
20
21        super().__init__(session, "UserProfile")

Initializes the UserProfileAPI object.

Parameters
  • session: An instance of the HttpSession class

:return UserProfileAPI object.

def get(self):
23    def get(self):
24        """
25        A method to get UserProfile object.
26
27        :return response json
28        """
29
30        response = self._session.get(self.build_url())
31
32        return response.json()

A method to get UserProfile object.

:return response json