-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCredentials.py
61 lines (50 loc) · 1.49 KB
/
Credentials.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import json
class Credentials:
"""
Class that represent credentials
Attributes:
store (dict)
dictionary containing parameters from AWS Systems Manager Parameter Store
"""
def __init__(self, response_parameters):
"""
Constructor for Credentials
Parameters:
response_parameters (list of dict):
list containing parameters from AWS Systems Manager Parameter Store
"""
self.__store = {}
for parameter in response_parameters:
name = parameter['Name']
self.__store[name] = parameter['Value']
def get_store(self):
"""
Returns a dictionary containing key-value pairs that represent the parameters
and their respective values
"""
return self.__store
def get_recipient_email(self):
"""
Returns a string that represents the recipient email address
"""
return self.__store['email_recipient']
def get_sender_email(self):
"""
Returns a string that represents the sender email address
"""
return self.__store['email_sender']
def get_user_agent(self):
"""
Returns a string that represents the user agent
"""
return self.__store['user_agent']
def get_client_id(self):
"""
Returns a string that represents the client application id for the Reddit API
"""
return self.__store['client_id']
def get_client_secret(self):
"""
Returns a string that represents the client application secret for the Reddit API
"""
return self.__store['client_secret']