appwrite 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -0
- data/README.md +10 -4
- data/appwrite.gemspec +5 -3
- data/lib/appwrite.rb +1 -0
- data/lib/appwrite/client.rb +1 -7
- data/lib/appwrite/services/database.rb +15 -3
- data/lib/appwrite/services/health.rb +141 -0
- data/lib/appwrite/services/users.rb +2 -2
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff65ad15eb1cf2ca4567493cb39b9bf1e633763259cc314aa99987b51a745e1f
|
4
|
+
data.tar.gz: 877438373c9c376f55c6443c5d0bec9c9533f5fe6d2c7f9b807f962cdfecb431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ef02ec0d182fbc27b8e14cf4a49830f3ca5abc0284cea6861033a64eedfc2109dfb0d4494cee573f72fcf72eb773e5f0eb9b10ceb81ca1ab86f784912570a04
|
7
|
+
data.tar.gz: cacf6d28374fd2d08a24cbfcb7b75d563feac5219e2e75cc04968fa4c77168b1a47a2b697f99eac662570cb0de10f690aa4a929bd25f2aef736861c22b18c42e
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# Change Log
|
data/README.md
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
# Appwrite SDK
|
1
|
+
# Appwrite Ruby SDK
|
2
2
|
|
3
3
|

|
4
|
-

|
5
5
|
|
6
|
-
**This SDK is compatible with Appwrite server version . For older versions, please check previous releases.**
|
6
|
+
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
7
7
|
|
8
|
-
Appwrite backend as a service
|
8
|
+
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.
|
9
|
+
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
10
|
+
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
9
11
|
|
10
12
|
|
11
13
|
|
@@ -19,6 +21,10 @@ To install via [Gem](https://rubygems.org/):
|
|
19
21
|
gem install appwrite --save
|
20
22
|
```
|
21
23
|
|
24
|
+
## Contribution
|
25
|
+
|
26
|
+
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
|
27
|
+
|
22
28
|
## License
|
23
29
|
|
24
30
|
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
|
data/appwrite.gemspec
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'appwrite'
|
4
|
-
s.version = '1.0.
|
5
|
-
s.summary = "Appwrite backend as a service
|
4
|
+
s.version = '1.0.10'
|
5
|
+
s.summary = "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.
|
6
|
+
Use the Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
7
|
+
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)"
|
6
8
|
s.author = 'Appwrite Team'
|
7
9
|
s.homepage = 'https://appwrite.io/support'
|
8
|
-
s.email = 'team@
|
10
|
+
s.email = 'team@localhost.test'
|
9
11
|
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
10
12
|
|
11
13
|
end
|
data/lib/appwrite.rb
CHANGED
@@ -5,6 +5,7 @@ require_relative 'appwrite/client'
|
|
5
5
|
require_relative 'appwrite/service'
|
6
6
|
require_relative 'appwrite/services/avatars'
|
7
7
|
require_relative 'appwrite/services/database'
|
8
|
+
require_relative 'appwrite/services/health'
|
8
9
|
require_relative 'appwrite/services/locale'
|
9
10
|
require_relative 'appwrite/services/storage'
|
10
11
|
require_relative 'appwrite/services/teams'
|
data/lib/appwrite/client.rb
CHANGED
@@ -20,7 +20,7 @@ module Appwrite
|
|
20
20
|
@headers = {
|
21
21
|
'content-type' => '',
|
22
22
|
'user-agent' => RUBY_PLATFORM + ':ruby-' + RUBY_VERSION,
|
23
|
-
'x-sdk-version' => 'appwrite:ruby:1.0.
|
23
|
+
'x-sdk-version' => 'appwrite:ruby:1.0.10'
|
24
24
|
}
|
25
25
|
@endpoint = 'https://appwrite.io/v1';
|
26
26
|
end
|
@@ -43,12 +43,6 @@ module Appwrite
|
|
43
43
|
return self
|
44
44
|
end
|
45
45
|
|
46
|
-
def set_mode(value)
|
47
|
-
add_header('x-appwrite-mode', value)
|
48
|
-
|
49
|
-
return self
|
50
|
-
end
|
51
|
-
|
52
46
|
def set_endpoint(endpoint)
|
53
47
|
@endpoint = endpoint
|
54
48
|
|
@@ -79,9 +79,9 @@ module Appwrite
|
|
79
79
|
'filters': filters,
|
80
80
|
'offset': offset,
|
81
81
|
'limit': limit,
|
82
|
-
'
|
83
|
-
'
|
84
|
-
'
|
82
|
+
'orderField': order_field,
|
83
|
+
'orderType': order_type,
|
84
|
+
'orderCast': order_cast,
|
85
85
|
'search': search,
|
86
86
|
'first': first,
|
87
87
|
'last': last
|
@@ -152,6 +152,18 @@ module Appwrite
|
|
152
152
|
}, params);
|
153
153
|
end
|
154
154
|
|
155
|
+
def get_collection_logs(collection_id:)
|
156
|
+
path = '/database/collections/{collectionId}/logs'
|
157
|
+
.gsub('{collection_id}', collection_id)
|
158
|
+
|
159
|
+
params = {
|
160
|
+
}
|
161
|
+
|
162
|
+
return @client.call('get', path, {
|
163
|
+
'content-type' => 'application/json',
|
164
|
+
}, params);
|
165
|
+
end
|
166
|
+
|
155
167
|
|
156
168
|
protected
|
157
169
|
|
@@ -0,0 +1,141 @@
|
|
1
|
+
module Appwrite
|
2
|
+
class Health < Service
|
3
|
+
|
4
|
+
def get()
|
5
|
+
path = '/health'
|
6
|
+
|
7
|
+
params = {
|
8
|
+
}
|
9
|
+
|
10
|
+
return @client.call('get', path, {
|
11
|
+
'content-type' => 'application/json',
|
12
|
+
}, params);
|
13
|
+
end
|
14
|
+
|
15
|
+
def get_anti_virus()
|
16
|
+
path = '/health/anti-virus'
|
17
|
+
|
18
|
+
params = {
|
19
|
+
}
|
20
|
+
|
21
|
+
return @client.call('get', path, {
|
22
|
+
'content-type' => 'application/json',
|
23
|
+
}, params);
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_cache()
|
27
|
+
path = '/health/cache'
|
28
|
+
|
29
|
+
params = {
|
30
|
+
}
|
31
|
+
|
32
|
+
return @client.call('get', path, {
|
33
|
+
'content-type' => 'application/json',
|
34
|
+
}, params);
|
35
|
+
end
|
36
|
+
|
37
|
+
def get_d_b()
|
38
|
+
path = '/health/db'
|
39
|
+
|
40
|
+
params = {
|
41
|
+
}
|
42
|
+
|
43
|
+
return @client.call('get', path, {
|
44
|
+
'content-type' => 'application/json',
|
45
|
+
}, params);
|
46
|
+
end
|
47
|
+
|
48
|
+
def get_queue_certificates()
|
49
|
+
path = '/health/queue/certificates'
|
50
|
+
|
51
|
+
params = {
|
52
|
+
}
|
53
|
+
|
54
|
+
return @client.call('get', path, {
|
55
|
+
'content-type' => 'application/json',
|
56
|
+
}, params);
|
57
|
+
end
|
58
|
+
|
59
|
+
def get_queue_functions()
|
60
|
+
path = '/health/queue/functions'
|
61
|
+
|
62
|
+
params = {
|
63
|
+
}
|
64
|
+
|
65
|
+
return @client.call('get', path, {
|
66
|
+
'content-type' => 'application/json',
|
67
|
+
}, params);
|
68
|
+
end
|
69
|
+
|
70
|
+
def get_queue_logs()
|
71
|
+
path = '/health/queue/logs'
|
72
|
+
|
73
|
+
params = {
|
74
|
+
}
|
75
|
+
|
76
|
+
return @client.call('get', path, {
|
77
|
+
'content-type' => 'application/json',
|
78
|
+
}, params);
|
79
|
+
end
|
80
|
+
|
81
|
+
def get_queue_tasks()
|
82
|
+
path = '/health/queue/tasks'
|
83
|
+
|
84
|
+
params = {
|
85
|
+
}
|
86
|
+
|
87
|
+
return @client.call('get', path, {
|
88
|
+
'content-type' => 'application/json',
|
89
|
+
}, params);
|
90
|
+
end
|
91
|
+
|
92
|
+
def get_queue_usage()
|
93
|
+
path = '/health/queue/usage'
|
94
|
+
|
95
|
+
params = {
|
96
|
+
}
|
97
|
+
|
98
|
+
return @client.call('get', path, {
|
99
|
+
'content-type' => 'application/json',
|
100
|
+
}, params);
|
101
|
+
end
|
102
|
+
|
103
|
+
def get_queue_webhooks()
|
104
|
+
path = '/health/queue/webhooks'
|
105
|
+
|
106
|
+
params = {
|
107
|
+
}
|
108
|
+
|
109
|
+
return @client.call('get', path, {
|
110
|
+
'content-type' => 'application/json',
|
111
|
+
}, params);
|
112
|
+
end
|
113
|
+
|
114
|
+
def get_storage_local()
|
115
|
+
path = '/health/storage/local'
|
116
|
+
|
117
|
+
params = {
|
118
|
+
}
|
119
|
+
|
120
|
+
return @client.call('get', path, {
|
121
|
+
'content-type' => 'application/json',
|
122
|
+
}, params);
|
123
|
+
end
|
124
|
+
|
125
|
+
def get_time()
|
126
|
+
path = '/health/time'
|
127
|
+
|
128
|
+
params = {
|
129
|
+
}
|
130
|
+
|
131
|
+
return @client.call('get', path, {
|
132
|
+
'content-type' => 'application/json',
|
133
|
+
}, params);
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
protected
|
138
|
+
|
139
|
+
private
|
140
|
+
end
|
141
|
+
end
|
@@ -104,11 +104,11 @@ module Appwrite
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def delete_session(user_id:, session_id:)
|
107
|
-
path = '/users/{userId}/sessions
|
107
|
+
path = '/users/{userId}/sessions/{sessionId}'
|
108
108
|
.gsub('{user_id}', user_id)
|
109
|
+
.gsub('{session_id}', session_id)
|
109
110
|
|
110
111
|
params = {
|
111
|
-
'sessionId': session_id
|
112
112
|
}
|
113
113
|
|
114
114
|
return @client.call('delete', path, {
|
metadata
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appwrite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Appwrite Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
|
-
email: team@
|
14
|
+
email: team@localhost.test
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- CHANGELOG.md
|
19
20
|
- Gemfile
|
20
21
|
- LICENSE
|
21
22
|
- README.md
|
@@ -25,6 +26,7 @@ files:
|
|
25
26
|
- lib/appwrite/service.rb
|
26
27
|
- lib/appwrite/services/avatars.rb
|
27
28
|
- lib/appwrite/services/database.rb
|
29
|
+
- lib/appwrite/services/health.rb
|
28
30
|
- lib/appwrite/services/locale.rb
|
29
31
|
- lib/appwrite/services/storage.rb
|
30
32
|
- lib/appwrite/services/teams.rb
|
@@ -50,8 +52,10 @@ requirements: []
|
|
50
52
|
rubygems_version: 3.0.3
|
51
53
|
signing_key:
|
52
54
|
specification_version: 4
|
53
|
-
summary: Appwrite backend as a service
|
54
|
-
|
55
|
-
|
56
|
-
|
55
|
+
summary: Appwrite is an open-source backend as a service server that abstract and
|
56
|
+
simplify complex and repetitive development tasks behind a very simple to use REST
|
57
|
+
API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
58
|
+
Use the Ruby SDK to integrate your app with the Appwrite server to easily start
|
59
|
+
interacting with all of Appwrite backend APIs and tools. For full API documentation
|
60
|
+
and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
57
61
|
test_files: []
|