Skip to content

Communications

CRMClient

Source code in src/spyre/crm.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
class CRMClient():

    def __init__(self, client: SpireClient):
        self.client = client
        self.endpoint = "crm"

    def get_note(self, id : int) -> "note":
        """
        Retrieve a note by its ID.

        Args:
            id (int): The ID of the note to retrieve.

        Returns:
            note: The retrieved note
        """
        response = self.client._get(f"/{self.endpoint}/notes/{str(id)}")
        return note.from_json(response, self.client)

get_note(id)

Retrieve a note by its ID.

Parameters:

Name Type Description Default
id int

The ID of the note to retrieve.

required

Returns:

Name Type Description
note note

The retrieved note

Source code in src/spyre/crm.py
10
11
12
13
14
15
16
17
18
19
20
21
def get_note(self, id : int) -> "note":
    """
    Retrieve a note by its ID.

    Args:
        id (int): The ID of the note to retrieve.

    Returns:
        note: The retrieved note
    """
    response = self.client._get(f"/{self.endpoint}/notes/{str(id)}")
    return note.from_json(response, self.client)