Notifications
Gets the given number (maximum 20) of archived Notification Builder notifications
based on the given “before” or “after” date.
Parameters
- API version (string)
- Batch size (integer)
- Date before (date, optional)
- Date after (date, optional)
iOS
In iOS, use the FetchNotificationsRequestBuilder object or the Objective-C SFSDKFetchNotificationsRequestBuilder to create GET requests for notifications.
- Swift
-
1let builder = FetchNotificationsRequestBuilder.init() 2builder.setSize(10) 3builder.setBefore(Date.init()) 4let request = builder.buildFetchNotificationsRequest(SFRestDefaultAPIVersion) - Objective-C
-
1#import <SalesforceSDKCore/SFRestAPI+Notifications.h> 2... 3 4SFSDKFetchNotificationsRequestBuilder *builder = 5 [[SFSDKFetchNotificationsRequestBuilder alloc] init]; 6[builder setBefore: [NSDate date]]; 7[builder setSize:10]; 8SFRestRequest *fetchRequest = 9 [builder buildFetchNotificationsRequest:kSFRestDefaultAPIVersion];
Android
- Kotlin
-
1fun getRequestForNotifications(apiVersion: String?, size: Int?, 2 before: Date?, after: Date?): RestRequest - Java
-
1public static RestRequest getRequestForNotifications(String apiVersion, 2 Integer size, Date before, Date after)