Repository: ucfopen/canvasapi

Issue:
Brand Configs
**What resource needs additional coverage?**
Brand Configs

**What endpoint needs to be covered?**
https://canvas.instructure.com/doc/api/brand_configs.html

- [ ] Get the brand config variables that should be used for this domain

_New to working on CanvasAPI? Check out our [contributing guide](https://github.com/ucfopen/canvasapi/blob/develop/.github/CONTRIBUTING.md)!_

Discussion:

Patch:
diff --git a/canvasapi/canvas.py b/canvasapi/canvas.py
index a574ccc..04e4fec 100644
--- a/canvasapi/canvas.py
+++ b/canvasapi/canvas.py
@@ -496,6 +496,19 @@ class Canvas(object):
             _kwargs=combine_kwargs(**kwargs),
         )
 
+    def get_brand_variables(self):
+        """
+        Get account brand variables
+
+        :calls: `GET /api/v1/brand_variables \
+        <https://canvas.instructure.com/doc/api/brand_configs.html>`_
+
+        :returns: JSON with brand variables for the account.
+        :rtype: dict
+        """
+        response = self.__requester.request("GET", "brand_variables")
+        return response.json()
+
     def get_calendar_event(self, calendar_event):
         """
         Return single Calendar Event by id


Test patch:
diff --git a/tests/fixtures/account.json b/tests/fixtures/account.json
index 0d05a81..af424bc 100644
--- a/tests/fixtures/account.json
+++ b/tests/fixtures/account.json
@@ -195,6 +195,16 @@
 			"default_time_zone": "America/New_York"
 		}
 	},
+	"get_brand_variables": {
+		"method": "GET",
+		"endpoint": "brand_variables",
+		"data": {
+			"ic-brand-primary-darkened-5": "#343637",
+			"ic-brand-primary-darkened-10": "#313334",
+			"ic-brand-primary-darkened-15": "#2E3031",
+			"ic-brand-primary-lightened-5": "#404142"
+		}
+	},
 	"get_courses": {
 		"method": "GET",
 		"endpoint": "accounts/1/courses",
diff --git a/tests/test_canvas.py b/tests/test_canvas.py
index 5170063..9a15155 100644
--- a/tests/test_canvas.py
+++ b/tests/test_canvas.py
@@ -127,6 +127,13 @@ class TestCanvas(unittest.TestCase):
         account_list = [account for account in accounts]
         self.assertEqual(len(account_list), 2)
 
+    # get_brand_variables()
+    def test_get_brand_variables(self, m):
+        register_uris({"account": ["get_brand_variables"]}, m)
+
+        variables = self.canvas.get_brand_variables()
+        self.assertIsInstance(variables, dict)
+
     # get_course()
     def test_get_course(self, m):
         register_uris({"course": ["get_by_id"]}, m)