diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..6edf807 --- /dev/null +++ b/LICENSE.md @@ -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. \ No newline at end of file diff --git a/OramaCloudClient.podspec b/OramaCloudClient.podspec new file mode 100644 index 0000000..b1c95a0 --- /dev/null +++ b/OramaCloudClient.podspec @@ -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 \ No newline at end of file diff --git a/PrivacyInfo.xcprivacy b/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..fff5c47 --- /dev/null +++ b/PrivacyInfo.xcprivacy @@ -0,0 +1,40 @@ + + + + + NSPrivacyAccessedAPITypes + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeProductInteraction + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeProductPersonalization + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyTrackingDomains + + NSPrivacyTracking + + + \ No newline at end of file diff --git a/README.md b/README.md index a1c9f56..2d15058 100644 --- a/README.md +++ b/README.md @@ -48,21 +48,22 @@ struct MyDoc: Encodable & Decodable { let description: String } -func performSearch() async throws -> SearchResults { - let clientParams = OramaClientParams(endpoint: "", apiKey: "") - let orama = OramaClient(params: clientParams) +let clientParams = OramaClientParams(endpoint: "", apiKey: "") +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 = try await orama.search(query: searchParams) +let searchResults: SearchResults = try await orama.search(query: searchParams) - print("\(searchResults.count) total results.") +print("\(searchResults.count) total results.") - return searchResults -} +return searchResults +``` + +## License -``` \ No newline at end of file +[Apache 2.0](/LICENSE.md) \ No newline at end of file