Pass params to get notifications API (#237)

Pass params to get notifications API (#237)

diff --git a/examples/notifications.rb b/examples/notifications.rb
index 496e7a1..e704df4 100644
--- a/examples/notifications.rb
+++ b/examples/notifications.rb
@@ -13,3 +13,6 @@ client.category_set_user_notification_level(1, notification_level: 3)
 
 # mute a topic
 client.topic_set_user_notification_level(1, notification_level: 0)
+
+# get user notifications
+client.notifications(username: 'discourse')
diff --git a/lib/discourse_api/api/notifications.rb b/lib/discourse_api/api/notifications.rb
index 5a4693b..aa0e447 100644
--- a/lib/discourse_api/api/notifications.rb
+++ b/lib/discourse_api/api/notifications.rb
@@ -2,8 +2,11 @@
 module DiscourseApi
   module API
     module Notifications
-      def notifications
-        response = get('/notifications.json')
+      def notifications(params = {})
+        params = API.params(params)
+          .optional(:username, :recent, :limit, :offset, :filter)
+
+        response = get('/notifications.json', params)
         response[:body]
       end
     end

GitHub sha: 83f3f3e8baac7cce18da75b187a479744e419700

This commit appears in #237 which was approved by blake. It was merged by blake.