Skip to content

Commit

Permalink
updates podspecs
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleriva committed Jul 18, 2024
1 parent d20695f commit 03fac6d
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 13 deletions.
13 changes: 13 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2024 OramaSearch Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
15 changes: 15 additions & 0 deletions OramaCloudClient.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Pod::Spec.new do |spec|
spec.name = "OramaCloudClient"
spec.module_name = "OramaCloudClient"
spec.version = "0.0.1"
spec.summary = "Orama Cloud API Client written in Swift."
spec.homepage = "https://github.com/askorama/oramacloud-client-swift"
spec.license = { :type => "Apache 2.0", :file => "LICENSE.md" }
spec.author = { 'Orama' => 'info@oramasearch.com' }
spec.documentation_url = "https://docs.orama.com/cloud"
spec.platforms = { :ios => "16.0", :osx => "13.0", :watchos => "9.0", :tvos => "16.0" }
spec.swift_version = "5.1"
spec.source = { :git => "https://github.com/askorama/oramacloud-client-swift.git", :tag => spec.version }
spec.source_files = "Sources/oramacloud-client/**/*.swift"
spec.resource_bundles = { 'OramaCloudClient' => ['PrivacyInfo.xcprivacy']}
end
40 changes: 40 additions & 0 deletions PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeProductPersonalization</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeUserID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,22 @@ struct MyDoc: Encodable & Decodable {
let description: String
}

func performSearch() async throws -> SearchResults<MyDoc> {
let clientParams = OramaClientParams(endpoint: "<ORAMA CLOUD URL>", apiKey: "<ORAMA CLOUD API KEY>")
let orama = OramaClient(params: clientParams)
let clientParams = OramaClientParams(endpoint: "<ORAMA CLOUD URL>", apiKey: "<ORAMA CLOUD API KEY>")
let orama = OramaClient(params: clientParams)

let searchParams = ClientSearchParams.builder(term: "What is Orama?", mode: .fulltext)
.limit(10) // optional
.offset(0) // optional
.returning(["title", "description"]) // optional
.build()
let searchParams = ClientSearchParams.builder(term: "What is Orama?", mode: .fulltext)
.limit(10) // optional
.offset(0) // optional
.returning(["title", "description"]) // optional
.build()

let searchResults: SearchResults<MyDoc> = try await orama.search(query: searchParams)
let searchResults: SearchResults<MyDoc> = try await orama.search(query: searchParams)

print("\(searchResults.count) total results.")
print("\(searchResults.count) total results.")

return searchResults
}
return searchResults
```

## License

```
[Apache 2.0](/LICENSE.md)

0 comments on commit 03fac6d

Please sign in to comment.