Skip to content

Commit

Permalink
feat(swift): saveObjectsPublicUser
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluf22 committed Jan 22, 2025
1 parent 0e68a05 commit 050684d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions templates/swift/guides/search/saveObjectsPublicUser.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Foundation
#if os(Linux) // For linux interop
import FoundationNetworking
#endif

import Core
{{> snippets/import}}

func saveObjectsPublicUser() async throws {
do {
{{> snippets/init}}

{{#dynamicSnippet}}saveObjectsPlaylistsWithUserIDPublic{{/dynamicSnippet}}
} catch {
print(error)
}
}
12 changes: 12 additions & 0 deletions tests/CTS/guides/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@
"objects": "$var: playlists"
}
},
"saveObjectsPlaylistsWithUserIDPublic": {
"method": "saveObjects",
"parameters": {
"indexName": "indexName",
"objects": "$var: playlists"
},
"requestOptions": {
"headers": {
"X-Algolia-User-ID": "*"
}
}
},
"saveObjectsPlaylistsWithRequestOptions": {
"method": "saveObjects",
"parameters": {
Expand Down

0 comments on commit 050684d

Please sign in to comment.