Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 0a98d41

Browse files
committed
Add documentation and use default sort parameters
1 parent efdf32d commit 0a98d41

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

WordPressKit/BlazeServiceRemote.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,15 @@ open class BlazeServiceRemote: ServiceRemoteWordPressComREST {
3636

3737
// MARK: - Campaigns
3838

39+
/// Searches the campaigns for the site with the given ID. The campaigns are returned ordered by the post date.
40+
///
41+
/// - parameters:
42+
/// - siteId: The site ID.
43+
/// - page: The response page. By default, returns the first page.
3944
open func searchCampaigns(forSiteId siteId: Int, page: Int = 1, callback: @escaping (Result<BlazeCampaignsSearchResponse, Error>) -> Void) {
4045
let endpoint = "sites/\(siteId)/wordads/dsp/api/v1/search/campaigns/site/\(siteId)"
4146
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)
4247
wordPressComRestApi.GET(path, parameters: [
43-
"order": "asc" as AnyObject,
44-
"order_by": "post_date" as AnyObject,
4548
"page": "\(page)" as AnyObject,
4649
"site_id": "\(siteId)" as AnyObject
4750
], success: { response, _ in

0 commit comments

Comments
 (0)