Skip to content

Commit 0dafc0a

Browse files
authored
Merge pull request #84 from appwrite/dev
Add 1.8.x support
2 parents 6de86ee + 11952bf commit 0dafc0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1358
-40
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
![Swift Package Manager](https://img.shields.io/github/v/release/appwrite/sdk-for-apple.svg?color=green&style=flat-square)
44
![License](https://img.shields.io/github/license/appwrite/sdk-for-apple.svg?style=flat-square)
5-
![Version](https://img.shields.io/badge/api%20version-1.7.4-blue.svg?style=flat-square)
5+
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
66
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
77
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
88
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
99

10-
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-apple/releases).**
10+
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-apple/releases).**
1111

1212
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Apple SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1313

@@ -31,7 +31,7 @@ Add the package to your `Package.swift` dependencies:
3131

3232
```swift
3333
dependencies: [
34-
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "10.2.0"),
34+
.package(url: "[email protected]:appwrite/sdk-for-apple.git", from: "11.0.0"),
3535
],
3636
```
3737

Sources/Appwrite/Client.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ open class Client {
2323
"x-sdk-name": "Apple",
2424
"x-sdk-platform": "client",
2525
"x-sdk-language": "apple",
26-
"x-sdk-version": "10.2.0",
27-
"x-appwrite-response-format": "1.7.0"
26+
"x-sdk-version": "11.0.0",
27+
"x-appwrite-response-format": "1.8.0"
2828
]
2929

3030
internal var config: [String: String] = [:]

Sources/Appwrite/Query.swift

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,90 @@ public struct Query : Codable, CustomStringConvertible {
284284
).description
285285
}
286286

287+
public static func notContains(_ attribute: String, value: Any) -> String {
288+
return Query(
289+
method: "notContains",
290+
attribute: attribute,
291+
values: Query.parseValue(value)
292+
).description
293+
}
294+
295+
public static func notSearch(_ attribute: String, value: String) -> String {
296+
return Query(
297+
method: "notSearch",
298+
attribute: attribute,
299+
values: [value]
300+
).description
301+
}
302+
303+
public static func notBetween(_ attribute: String, start: Int, end: Int) -> String {
304+
return Query(
305+
method: "notBetween",
306+
attribute: attribute,
307+
values: [start, end]
308+
).description
309+
}
310+
311+
public static func notBetween(_ attribute: String, start: Double, end: Double) -> String {
312+
return Query(
313+
method: "notBetween",
314+
attribute: attribute,
315+
values: [start, end]
316+
).description
317+
}
318+
319+
public static func notBetween(_ attribute: String, start: String, end: String) -> String {
320+
return Query(
321+
method: "notBetween",
322+
attribute: attribute,
323+
values: [start, end]
324+
).description
325+
}
326+
327+
public static func notStartsWith(_ attribute: String, value: String) -> String {
328+
return Query(
329+
method: "notStartsWith",
330+
attribute: attribute,
331+
values: [value]
332+
).description
333+
}
334+
335+
public static func notEndsWith(_ attribute: String, value: String) -> String {
336+
return Query(
337+
method: "notEndsWith",
338+
attribute: attribute,
339+
values: [value]
340+
).description
341+
}
342+
343+
public static func createdBefore(_ value: String) -> String {
344+
return Query(
345+
method: "createdBefore",
346+
values: [value]
347+
).description
348+
}
349+
350+
public static func createdAfter(_ value: String) -> String {
351+
return Query(
352+
method: "createdAfter",
353+
values: [value]
354+
).description
355+
}
356+
357+
public static func updatedBefore(_ value: String) -> String {
358+
return Query(
359+
method: "updatedBefore",
360+
values: [value]
361+
).description
362+
}
363+
364+
public static func updatedAfter(_ value: String) -> String {
365+
return Query(
366+
method: "updatedAfter",
367+
values: [value]
368+
).description
369+
}
370+
287371
public static func or(_ queries: [String]) -> String {
288372
let decoder = JSONDecoder()
289373
let decodedQueries = queries.compactMap { queryStr -> Query? in

0 commit comments

Comments
 (0)