mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Updated SDKs
This commit is contained in:
parent
23af2769f8
commit
c76dcd9c7a
36 changed files with 504 additions and 220 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Appwrite SDK for JavaScript
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
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 JS SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.health.getAntiVirus();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
let sdk = new Appwrite();
|
||||
|
||||
sdk
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = sdk.health.getQueueFunctions();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response); // Success
|
||||
}, function (error) {
|
||||
console.log(error); // Failure
|
||||
});
|
||||
|
|
@ -748,7 +748,7 @@
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createOAuth2Session: function(provider, success = 'https://localhost:2444/auth/oauth2/success', failure = 'https://localhost:2444/auth/oauth2/failure') {
|
||||
createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure') {
|
||||
if(provider === undefined) {
|
||||
throw new Error('Missing required parameter: "provider"');
|
||||
}
|
||||
|
|
@ -1609,7 +1609,7 @@
|
|||
let health = {
|
||||
|
||||
/**
|
||||
* Check API HTTP Health
|
||||
* Get HTTP
|
||||
*
|
||||
* Check the Appwrite HTTP server is up and responsive.
|
||||
*
|
||||
|
|
@ -1628,7 +1628,26 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check Cache Health
|
||||
* Get Anti virus
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getAntiVirus: function() {
|
||||
let path = '/health/anti-virus';
|
||||
|
||||
let payload = {};
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
}, payload);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get Cache
|
||||
*
|
||||
* Check the Appwrite in-memory cache server is up and connection is
|
||||
* successful.
|
||||
|
|
@ -1648,7 +1667,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check DB Health
|
||||
* Get DB
|
||||
*
|
||||
* Check the Appwrite database server is up and connection is successful.
|
||||
*
|
||||
|
|
@ -1667,7 +1686,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check the number of pending certificate messages
|
||||
* Get Certificate Queue
|
||||
*
|
||||
* Get the number of certificates that are waiting to be issued against
|
||||
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
||||
|
|
@ -1688,7 +1707,25 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check the number of pending log messages
|
||||
* Get Functions Queue
|
||||
*
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getQueueFunctions: function() {
|
||||
let path = '/health/queue/functions';
|
||||
|
||||
let payload = {};
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
}, payload);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get Logs Queue
|
||||
*
|
||||
* Get the number of logs that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -1708,7 +1745,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check the number of pending task messages
|
||||
* Get Tasks Queue
|
||||
*
|
||||
* Get the number of tasks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -1728,7 +1765,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check the number of pending usage messages
|
||||
* Get Usage Queue
|
||||
*
|
||||
* Get the number of usage stats that are waiting to be processed in the
|
||||
* Appwrite internal queue server.
|
||||
|
|
@ -1748,7 +1785,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check number of pending webhook messages
|
||||
* Get Webhooks Queue
|
||||
*
|
||||
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -1768,26 +1805,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check Anti virus Health
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getStorageAntiVirus: function() {
|
||||
let path = '/health/storage/anti-virus';
|
||||
|
||||
let payload = {};
|
||||
|
||||
return http
|
||||
.get(path, {
|
||||
'content-type': 'application/json',
|
||||
}, payload);
|
||||
},
|
||||
|
||||
/**
|
||||
* Check File System Health
|
||||
* Get Local Storage
|
||||
*
|
||||
* Check the Appwrite local storage device is up and connection is successful.
|
||||
*
|
||||
|
|
@ -1806,7 +1824,7 @@
|
|||
},
|
||||
|
||||
/**
|
||||
* Check Time Health
|
||||
* Get Time
|
||||
*
|
||||
* Check the Appwrite server time is synced with Google remote NTP server. We
|
||||
* use this technology to smoothly handle leap seconds with no disruptive
|
||||
|
|
|
|||
4
app/sdks/console-javascript/src/sdk.min.js
vendored
4
app/sdks/console-javascript/src/sdk.min.js
vendored
|
|
@ -45,7 +45,7 @@ return http.put(path,{'content-type':'application/json',},payload)},getSessions:
|
|||
if(password===undefined){throw new Error('Missing required parameter: "password"')}
|
||||
let path='/account/sessions';let payload={};if(email){payload.email=email}
|
||||
if(password){payload.password=password}
|
||||
return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://localhost:2444/auth/oauth2/success',failure='https://localhost:2444/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')}
|
||||
return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')}
|
||||
let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success}
|
||||
if(failure){payload.failure=failure}
|
||||
payload.project=config.project;payload.key=config.key;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');window.location=config.endpoint+path+((query)?'?'+query:'')},deleteSession:function(sessionId){if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"')}
|
||||
|
|
@ -133,7 +133,7 @@ if(write){payload.write=write}
|
|||
return http.patch(path,{'content-type':'application/json',},payload)},deleteDocument:function(collectionId,documentId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
if(documentId===undefined){throw new Error('Missing required parameter: "documentId"')}
|
||||
let path='/database/collections/{collectionId}/documents/{documentId}'.replace(new RegExp('{collectionId}','g'),collectionId).replace(new RegExp('{documentId}','g'),documentId);let payload={};return http.delete(path,{'content-type':'application/json',},payload)},getCollectionLogs:function(collectionId){if(collectionId===undefined){throw new Error('Missing required parameter: "collectionId"')}
|
||||
let path='/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let health={get:function(){let path='/health';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCache:function(){let path='/health/cache';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getDB:function(){let path='/health/db';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueCertificates:function(){let path='/health/queue/certificates';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueLogs:function(){let path='/health/queue/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueTasks:function(){let path='/health/queue/tasks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueUsage:function(){let path='/health/queue/usage';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueWebhooks:function(){let path='/health/queue/webhooks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getStorageAntiVirus:function(){let path='/health/storage/anti-virus';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getStorageLocal:function(){let path='/health/storage/local';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getTime:function(){let path='/health/time';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let locale={get:function(){let path='/locale';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getContinents:function(){let path='/locale/continents';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountries:function(){let path='/locale/countries';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountriesEU:function(){let path='/locale/countries/eu';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountriesPhones:function(){let path='/locale/countries/phones';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCurrencies:function(){let path='/locale/currencies';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let projects={list:function(){let path='/projects';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(name,teamId,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
|
||||
let path='/database/collections/{collectionId}/logs'.replace(new RegExp('{collectionId}','g'),collectionId);let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let health={get:function(){let path='/health';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getAntiVirus:function(){let path='/health/anti-virus';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCache:function(){let path='/health/cache';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getDB:function(){let path='/health/db';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueCertificates:function(){let path='/health/queue/certificates';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueFunctions:function(){let path='/health/queue/functions';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueLogs:function(){let path='/health/queue/logs';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueTasks:function(){let path='/health/queue/tasks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueUsage:function(){let path='/health/queue/usage';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getQueueWebhooks:function(){let path='/health/queue/webhooks';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getStorageLocal:function(){let path='/health/storage/local';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getTime:function(){let path='/health/time';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let locale={get:function(){let path='/locale';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getContinents:function(){let path='/locale/continents';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountries:function(){let path='/locale/countries';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountriesEU:function(){let path='/locale/countries/eu';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCountriesPhones:function(){let path='/locale/countries/phones';let payload={};return http.get(path,{'content-type':'application/json',},payload)},getCurrencies:function(){let path='/locale/currencies';let payload={};return http.get(path,{'content-type':'application/json',},payload)}};let projects={list:function(){let path='/projects';let payload={};return http.get(path,{'content-type':'application/json',},payload)},create:function(name,teamId,description='',logo='',url='',legalName='',legalCountry='',legalState='',legalCity='',legalAddress='',legalTaxId=''){if(name===undefined){throw new Error('Missing required parameter: "name"')}
|
||||
if(teamId===undefined){throw new Error('Missing required parameter: "teamId"')}
|
||||
let path='/projects';let payload={};if(name){payload.name=name}
|
||||
if(teamId){payload.teamId=teamId}
|
||||
|
|
|
|||
49
app/sdks/console-javascript/types/index.d.ts
vendored
49
app/sdks/console-javascript/types/index.d.ts
vendored
|
|
@ -592,7 +592,7 @@ declare namespace Appwrite {
|
|||
export interface Health {
|
||||
|
||||
/**
|
||||
* Check API HTTP Health
|
||||
* Get HTTP
|
||||
*
|
||||
* Check the Appwrite HTTP server is up and responsive.
|
||||
*
|
||||
|
|
@ -602,7 +602,17 @@ declare namespace Appwrite {
|
|||
get(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check Cache Health
|
||||
* Get Anti virus
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getAntiVirus(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Cache
|
||||
*
|
||||
* Check the Appwrite in-memory cache server is up and connection is
|
||||
* successful.
|
||||
|
|
@ -613,7 +623,7 @@ declare namespace Appwrite {
|
|||
getCache(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check DB Health
|
||||
* Get DB
|
||||
*
|
||||
* Check the Appwrite database server is up and connection is successful.
|
||||
*
|
||||
|
|
@ -623,7 +633,7 @@ declare namespace Appwrite {
|
|||
getDB(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check the number of pending certificate messages
|
||||
* Get Certificate Queue
|
||||
*
|
||||
* Get the number of certificates that are waiting to be issued against
|
||||
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
||||
|
|
@ -635,7 +645,16 @@ declare namespace Appwrite {
|
|||
getQueueCertificates(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check the number of pending log messages
|
||||
* Get Functions Queue
|
||||
*
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getQueueFunctions(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Get Logs Queue
|
||||
*
|
||||
* Get the number of logs that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -646,7 +665,7 @@ declare namespace Appwrite {
|
|||
getQueueLogs(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check the number of pending task messages
|
||||
* Get Tasks Queue
|
||||
*
|
||||
* Get the number of tasks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -657,7 +676,7 @@ declare namespace Appwrite {
|
|||
getQueueTasks(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check the number of pending usage messages
|
||||
* Get Usage Queue
|
||||
*
|
||||
* Get the number of usage stats that are waiting to be processed in the
|
||||
* Appwrite internal queue server.
|
||||
|
|
@ -668,7 +687,7 @@ declare namespace Appwrite {
|
|||
getQueueUsage(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check number of pending webhook messages
|
||||
* Get Webhooks Queue
|
||||
*
|
||||
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -679,17 +698,7 @@ declare namespace Appwrite {
|
|||
getQueueWebhooks(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check Anti virus Health
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
getStorageAntiVirus(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check File System Health
|
||||
* Get Local Storage
|
||||
*
|
||||
* Check the Appwrite local storage device is up and connection is successful.
|
||||
*
|
||||
|
|
@ -699,7 +708,7 @@ declare namespace Appwrite {
|
|||
getStorageLocal(): Promise<object>;
|
||||
|
||||
/**
|
||||
* Check Time Health
|
||||
* Get Time
|
||||
*
|
||||
* Check the Appwrite server time is synced with Google remote NTP server. We
|
||||
* use this technology to smoothly handle leap seconds with no disruptive
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
[](https://pub.dartlang.org/packages/appwrite)
|
||||

|
||||

|
||||

|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
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 Dart SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ class Account extends Service {
|
|||
/// first. Use the success and failure arguments to provide a redirect URL's
|
||||
/// back to your app when login is completed.
|
||||
///
|
||||
Future createOAuth2Session({@required String provider, String success = 'https://localhost:2444/auth/oauth2/success', String failure = 'https://localhost:2444/auth/oauth2/failure'}) {
|
||||
Future createOAuth2Session({@required String provider, String success = 'https://appwrite.io/auth/oauth2/success', String failure = 'https://appwrite.io/auth/oauth2/failure'}) {
|
||||
final String path = '/account/sessions/oauth2/{provider}'.replaceAll(RegExp('{provider}'), provider);
|
||||
|
||||
final Map<String, dynamic> params = {
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit f7e122b5a4153b5a2249ce0375db9555644450da
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# Appwrite SDK for Go
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
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 Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
25
app/sdks/server-go/docs/examples/health/get-anti-virus.md
Normal file
25
app/sdks/server-go/docs/examples/health/get-anti-virus.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/appwrite/sdk-for-go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var client := appwrite.Client{}
|
||||
|
||||
client.SetProject("5df5acd0d48c2") // Your project ID
|
||||
client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
var service := appwrite.Health{
|
||||
client: &client
|
||||
}
|
||||
|
||||
var response, error := service.GetAntiVirus()
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/appwrite/sdk-for-go"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var client := appwrite.Client{}
|
||||
|
||||
client.SetProject("5df5acd0d48c2") // Your project ID
|
||||
client.SetKey("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
|
||||
var service := appwrite.Health{
|
||||
client: &client
|
||||
}
|
||||
|
||||
var response, error := service.GetQueueFunctions()
|
||||
|
||||
if error != nil {
|
||||
panic(error)
|
||||
}
|
||||
|
||||
fmt.Println(response)
|
||||
}
|
||||
|
|
@ -26,6 +26,17 @@ func (srv *Health) Get() (map[string]interface{}, error) {
|
|||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetAntiVirus check the Appwrite Anti Virus server is up and connection is
|
||||
// successful.
|
||||
func (srv *Health) GetAntiVirus() (map[string]interface{}, error) {
|
||||
path := "/health/anti-virus"
|
||||
|
||||
params := map[string]interface{}{
|
||||
}
|
||||
|
||||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetCache check the Appwrite in-memory cache server is up and connection is
|
||||
// successful.
|
||||
func (srv *Health) GetCache() (map[string]interface{}, error) {
|
||||
|
|
@ -60,6 +71,16 @@ func (srv *Health) GetQueueCertificates() (map[string]interface{}, error) {
|
|||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetQueueFunctions
|
||||
func (srv *Health) GetQueueFunctions() (map[string]interface{}, error) {
|
||||
path := "/health/queue/functions"
|
||||
|
||||
params := map[string]interface{}{
|
||||
}
|
||||
|
||||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetQueueLogs get the number of logs that are waiting to be processed in the
|
||||
// Appwrite internal queue server.
|
||||
func (srv *Health) GetQueueLogs() (map[string]interface{}, error) {
|
||||
|
|
@ -104,17 +125,6 @@ func (srv *Health) GetQueueWebhooks() (map[string]interface{}, error) {
|
|||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetStorageAntiVirus check the Appwrite Anti Virus server is up and
|
||||
// connection is successful.
|
||||
func (srv *Health) GetStorageAntiVirus() (map[string]interface{}, error) {
|
||||
path := "/health/storage/anti-virus"
|
||||
|
||||
params := map[string]interface{}{
|
||||
}
|
||||
|
||||
return srv.client.Call("GET", path, nil, params)
|
||||
}
|
||||
|
||||
// GetStorageLocal check the Appwrite local storage device is up and
|
||||
// connection is successful.
|
||||
func (srv *Health) GetStorageLocal() (map[string]interface{}, error) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Appwrite SDK for Java
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
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 Java SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class Health extends Service {
|
|||
super(client);
|
||||
}
|
||||
|
||||
/// Check API HTTP Health
|
||||
/// Get HTTP
|
||||
/*
|
||||
* Check the Appwrite HTTP server is up and responsive.
|
||||
*/
|
||||
|
|
@ -37,7 +37,26 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check Cache Health
|
||||
/// Get Anti virus
|
||||
/*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*/
|
||||
public Call getAntiVirus() {
|
||||
final String path = "/health/anti-virus";
|
||||
|
||||
final Map<String, Object> params = Map.ofEntries(
|
||||
);
|
||||
|
||||
|
||||
|
||||
final Map<String, String> headers = Map.ofEntries(
|
||||
entry("content-type", "application/json")
|
||||
);
|
||||
|
||||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Get Cache
|
||||
/*
|
||||
* Check the Appwrite in-memory cache server is up and connection is
|
||||
* successful.
|
||||
|
|
@ -57,7 +76,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check DB Health
|
||||
/// Get DB
|
||||
/*
|
||||
* Check the Appwrite database server is up and connection is successful.
|
||||
*/
|
||||
|
|
@ -76,7 +95,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check the number of pending certificate messages
|
||||
/// Get Certificate Queue
|
||||
/*
|
||||
* Get the number of certificates that are waiting to be issued against
|
||||
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
||||
|
|
@ -97,7 +116,23 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check the number of pending log messages
|
||||
/// Get Functions Queue
|
||||
public Call getQueueFunctions() {
|
||||
final String path = "/health/queue/functions";
|
||||
|
||||
final Map<String, Object> params = Map.ofEntries(
|
||||
);
|
||||
|
||||
|
||||
|
||||
final Map<String, String> headers = Map.ofEntries(
|
||||
entry("content-type", "application/json")
|
||||
);
|
||||
|
||||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Get Logs Queue
|
||||
/*
|
||||
* Get the number of logs that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -117,7 +152,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check the number of pending task messages
|
||||
/// Get Tasks Queue
|
||||
/*
|
||||
* Get the number of tasks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -137,7 +172,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check the number of pending usage messages
|
||||
/// Get Usage Queue
|
||||
/*
|
||||
* Get the number of usage stats that are waiting to be processed in the
|
||||
* Appwrite internal queue server.
|
||||
|
|
@ -157,7 +192,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check number of pending webhook messages
|
||||
/// Get Webhooks Queue
|
||||
/*
|
||||
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -177,26 +212,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check Anti virus Health
|
||||
/*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*/
|
||||
public Call getStorageAntiVirus() {
|
||||
final String path = "/health/storage/anti-virus";
|
||||
|
||||
final Map<String, Object> params = Map.ofEntries(
|
||||
);
|
||||
|
||||
|
||||
|
||||
final Map<String, String> headers = Map.ofEntries(
|
||||
entry("content-type", "application/json")
|
||||
);
|
||||
|
||||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check File System Health
|
||||
/// Get Local Storage
|
||||
/*
|
||||
* Check the Appwrite local storage device is up and connection is successful.
|
||||
*/
|
||||
|
|
@ -215,7 +231,7 @@ public class Health extends Service {
|
|||
return client.call("GET", path, headers, params);
|
||||
}
|
||||
|
||||
/// Check Time Health
|
||||
/// Get Time
|
||||
/*
|
||||
* Check the Appwrite server time is synced with Google remote NTP server. We
|
||||
* use this technology to smoothly handle leap seconds with no disruptive
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Appwrite SDK for NodeJS
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
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 Node.js SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
const sdk = require('node-appwrite');
|
||||
|
||||
// Init SDK
|
||||
let client = new sdk.Client();
|
||||
|
||||
let health = new sdk.Health(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = health.getAntiVirus();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response);
|
||||
}, function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
const sdk = require('node-appwrite');
|
||||
|
||||
// Init SDK
|
||||
let client = new sdk.Client();
|
||||
|
||||
let health = new sdk.Health(client);
|
||||
|
||||
client
|
||||
.setProject('5df5acd0d48c2') // Your project ID
|
||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
let promise = health.getQueueFunctions();
|
||||
|
||||
promise.then(function (response) {
|
||||
console.log(response);
|
||||
}, function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
|
@ -3,7 +3,7 @@ const Service = require('../service.js');
|
|||
class Health extends Service {
|
||||
|
||||
/**
|
||||
* Check API HTTP Health
|
||||
* Get HTTP
|
||||
*
|
||||
* Check the Appwrite HTTP server is up and responsive.
|
||||
*
|
||||
|
|
@ -21,7 +21,25 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Cache Health
|
||||
* Get Anti virus
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws Exception
|
||||
* @return {}
|
||||
*/
|
||||
async getAntiVirus() {
|
||||
let path = '/health/anti-virus';
|
||||
|
||||
return await this.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
},
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cache
|
||||
*
|
||||
* Check the Appwrite in-memory cache server is up and connection is
|
||||
* successful.
|
||||
|
|
@ -40,7 +58,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check DB Health
|
||||
* Get DB
|
||||
*
|
||||
* Check the Appwrite database server is up and connection is successful.
|
||||
*
|
||||
|
|
@ -58,7 +76,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending certificate messages
|
||||
* Get Certificate Queue
|
||||
*
|
||||
* Get the number of certificates that are waiting to be issued against
|
||||
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
||||
|
|
@ -78,7 +96,23 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending log messages
|
||||
* Get Functions Queue
|
||||
*
|
||||
* @throws Exception
|
||||
* @return {}
|
||||
*/
|
||||
async getQueueFunctions() {
|
||||
let path = '/health/queue/functions';
|
||||
|
||||
return await this.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
},
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Logs Queue
|
||||
*
|
||||
* Get the number of logs that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -97,7 +131,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending task messages
|
||||
* Get Tasks Queue
|
||||
*
|
||||
* Get the number of tasks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -116,7 +150,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending usage messages
|
||||
* Get Usage Queue
|
||||
*
|
||||
* Get the number of usage stats that are waiting to be processed in the
|
||||
* Appwrite internal queue server.
|
||||
|
|
@ -135,7 +169,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check number of pending webhook messages
|
||||
* Get Webhooks Queue
|
||||
*
|
||||
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -154,25 +188,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Anti virus Health
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws Exception
|
||||
* @return {}
|
||||
*/
|
||||
async getStorageAntiVirus() {
|
||||
let path = '/health/storage/anti-virus';
|
||||
|
||||
return await this.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
},
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check File System Health
|
||||
* Get Local Storage
|
||||
*
|
||||
* Check the Appwrite local storage device is up and connection is successful.
|
||||
*
|
||||
|
|
@ -190,7 +206,7 @@ class Health extends Service {
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Time Health
|
||||
* Get Time
|
||||
*
|
||||
* Check the Appwrite server time is synced with Google remote NTP server. We
|
||||
* use this technology to smoothly handle leap seconds with no disruptive
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Appwrite SDK for PHP
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
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 PHP SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"license": "BSD-3-Clause",
|
||||
"support": {
|
||||
"url": "https://appwrite.io/support",
|
||||
"email": "team@appwrite.io"
|
||||
"email": "team@localhost.test"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
15
app/sdks/server-php/docs/examples/health/get-anti-virus.md
Normal file
15
app/sdks/server-php/docs/examples/health/get-anti-virus.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
use Appwrite\Client;
|
||||
use Appwrite\Services\Health;
|
||||
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setProject('5df5acd0d48c2') // Your project ID
|
||||
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
$health = new Health($client);
|
||||
|
||||
$result = $health->getAntiVirus();
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
use Appwrite\Client;
|
||||
use Appwrite\Services\Health;
|
||||
|
||||
$client = new Client();
|
||||
|
||||
$client
|
||||
->setProject('5df5acd0d48c2') // Your project ID
|
||||
->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||
;
|
||||
|
||||
$health = new Health($client);
|
||||
|
||||
$result = $health->getQueueFunctions();
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Health Service
|
||||
|
||||
## Check API HTTP Health
|
||||
## Get HTTP
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health
|
||||
|
|
@ -8,7 +8,15 @@ GET https://appwrite.io/v1/health
|
|||
|
||||
** Check the Appwrite HTTP server is up and responsive. **
|
||||
|
||||
## Check Cache Health
|
||||
## Get Anti virus
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/anti-virus
|
||||
```
|
||||
|
||||
** Check the Appwrite Anti Virus server is up and connection is successful. **
|
||||
|
||||
## Get Cache
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/cache
|
||||
|
|
@ -16,7 +24,7 @@ GET https://appwrite.io/v1/health/cache
|
|||
|
||||
** Check the Appwrite in-memory cache server is up and connection is successful. **
|
||||
|
||||
## Check DB Health
|
||||
## Get DB
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/db
|
||||
|
|
@ -24,7 +32,7 @@ GET https://appwrite.io/v1/health/db
|
|||
|
||||
** Check the Appwrite database server is up and connection is successful. **
|
||||
|
||||
## Check the number of pending certificate messages
|
||||
## Get Certificate Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/certificates
|
||||
|
|
@ -32,7 +40,13 @@ GET https://appwrite.io/v1/health/queue/certificates
|
|||
|
||||
** Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. **
|
||||
|
||||
## Check the number of pending log messages
|
||||
## Get Functions Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/functions
|
||||
```
|
||||
|
||||
## Get Logs Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/logs
|
||||
|
|
@ -40,7 +54,7 @@ GET https://appwrite.io/v1/health/queue/logs
|
|||
|
||||
** Get the number of logs that are waiting to be processed in the Appwrite internal queue server. **
|
||||
|
||||
## Check the number of pending task messages
|
||||
## Get Tasks Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/tasks
|
||||
|
|
@ -48,7 +62,7 @@ GET https://appwrite.io/v1/health/queue/tasks
|
|||
|
||||
** Get the number of tasks that are waiting to be processed in the Appwrite internal queue server. **
|
||||
|
||||
## Check the number of pending usage messages
|
||||
## Get Usage Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/usage
|
||||
|
|
@ -56,7 +70,7 @@ GET https://appwrite.io/v1/health/queue/usage
|
|||
|
||||
** Get the number of usage stats that are waiting to be processed in the Appwrite internal queue server. **
|
||||
|
||||
## Check number of pending webhook messages
|
||||
## Get Webhooks Queue
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/queue/webhooks
|
||||
|
|
@ -64,15 +78,7 @@ GET https://appwrite.io/v1/health/queue/webhooks
|
|||
|
||||
** Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. **
|
||||
|
||||
## Check Anti virus Health
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/storage/anti-virus
|
||||
```
|
||||
|
||||
** Check the Appwrite Anti Virus server is up and connection is successful. **
|
||||
|
||||
## Check File System Health
|
||||
## Get Local Storage
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/storage/local
|
||||
|
|
@ -80,7 +86,7 @@ GET https://appwrite.io/v1/health/storage/local
|
|||
|
||||
** Check the Appwrite local storage device is up and connection is successful. **
|
||||
|
||||
## Check Time Health
|
||||
## Get Time
|
||||
|
||||
```http request
|
||||
GET https://appwrite.io/v1/health/time
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Appwrite\Service;
|
|||
class Health extends Service
|
||||
{
|
||||
/**
|
||||
* Check API HTTP Health
|
||||
* Get HTTP
|
||||
*
|
||||
* Check the Appwrite HTTP server is up and responsive.
|
||||
*
|
||||
|
|
@ -28,7 +28,26 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Cache Health
|
||||
* Get Anti virus
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function getAntiVirus():array
|
||||
{
|
||||
$path = str_replace([], [], '/health/anti-virus');
|
||||
$params = [];
|
||||
|
||||
|
||||
return $this->client->call(Client::METHOD_GET, $path, [
|
||||
'content-type' => 'application/json',
|
||||
], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cache
|
||||
*
|
||||
* Check the Appwrite in-memory cache server is up and connection is
|
||||
* successful.
|
||||
|
|
@ -48,7 +67,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check DB Health
|
||||
* Get DB
|
||||
*
|
||||
* Check the Appwrite database server is up and connection is successful.
|
||||
*
|
||||
|
|
@ -67,7 +86,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending certificate messages
|
||||
* Get Certificate Queue
|
||||
*
|
||||
* Get the number of certificates that are waiting to be issued against
|
||||
* [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
|
||||
|
|
@ -88,7 +107,24 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending log messages
|
||||
* Get Functions Queue
|
||||
*
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function getQueueFunctions():array
|
||||
{
|
||||
$path = str_replace([], [], '/health/queue/functions');
|
||||
$params = [];
|
||||
|
||||
|
||||
return $this->client->call(Client::METHOD_GET, $path, [
|
||||
'content-type' => 'application/json',
|
||||
], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Logs Queue
|
||||
*
|
||||
* Get the number of logs that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -108,7 +144,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending task messages
|
||||
* Get Tasks Queue
|
||||
*
|
||||
* Get the number of tasks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -128,7 +164,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check the number of pending usage messages
|
||||
* Get Usage Queue
|
||||
*
|
||||
* Get the number of usage stats that are waiting to be processed in the
|
||||
* Appwrite internal queue server.
|
||||
|
|
@ -148,7 +184,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check number of pending webhook messages
|
||||
* Get Webhooks Queue
|
||||
*
|
||||
* Get the number of webhooks that are waiting to be processed in the Appwrite
|
||||
* internal queue server.
|
||||
|
|
@ -168,26 +204,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Anti virus Health
|
||||
*
|
||||
* Check the Appwrite Anti Virus server is up and connection is successful.
|
||||
*
|
||||
* @throws Exception
|
||||
* @return array
|
||||
*/
|
||||
public function getStorageAntiVirus():array
|
||||
{
|
||||
$path = str_replace([], [], '/health/storage/anti-virus');
|
||||
$params = [];
|
||||
|
||||
|
||||
return $this->client->call(Client::METHOD_GET, $path, [
|
||||
'content-type' => 'application/json',
|
||||
], $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check File System Health
|
||||
* Get Local Storage
|
||||
*
|
||||
* Check the Appwrite local storage device is up and connection is successful.
|
||||
*
|
||||
|
|
@ -206,7 +223,7 @@ class Health extends Service
|
|||
}
|
||||
|
||||
/**
|
||||
* Check Time Health
|
||||
* Get Time
|
||||
*
|
||||
* Check the Appwrite server time is synced with Google remote NTP server. We
|
||||
* use this technology to smoothly handle leap seconds with no disruptive
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Appwrite SDK for Python
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
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 Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class Health(Service):
|
|||
super(Health, self).__init__(client)
|
||||
|
||||
def get(self):
|
||||
"""Check API HTTP Health"""
|
||||
"""Get HTTP"""
|
||||
|
||||
params = {}
|
||||
path = '/health'
|
||||
|
|
@ -16,8 +16,18 @@ class Health(Service):
|
|||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_anti_virus(self):
|
||||
"""Get Anti virus"""
|
||||
|
||||
params = {}
|
||||
path = '/health/anti-virus'
|
||||
|
||||
return self.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_cache(self):
|
||||
"""Check Cache Health"""
|
||||
"""Get Cache"""
|
||||
|
||||
params = {}
|
||||
path = '/health/cache'
|
||||
|
|
@ -27,7 +37,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_d_b(self):
|
||||
"""Check DB Health"""
|
||||
"""Get DB"""
|
||||
|
||||
params = {}
|
||||
path = '/health/db'
|
||||
|
|
@ -37,7 +47,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_queue_certificates(self):
|
||||
"""Check the number of pending certificate messages"""
|
||||
"""Get Certificate Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/certificates'
|
||||
|
|
@ -46,8 +56,18 @@ class Health(Service):
|
|||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_queue_functions(self):
|
||||
"""Get Functions Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/functions'
|
||||
|
||||
return self.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_queue_logs(self):
|
||||
"""Check the number of pending log messages"""
|
||||
"""Get Logs Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/logs'
|
||||
|
|
@ -57,7 +77,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_queue_tasks(self):
|
||||
"""Check the number of pending task messages"""
|
||||
"""Get Tasks Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/tasks'
|
||||
|
|
@ -67,7 +87,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_queue_usage(self):
|
||||
"""Check the number of pending usage messages"""
|
||||
"""Get Usage Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/usage'
|
||||
|
|
@ -77,7 +97,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_queue_webhooks(self):
|
||||
"""Check number of pending webhook messages"""
|
||||
"""Get Webhooks Queue"""
|
||||
|
||||
params = {}
|
||||
path = '/health/queue/webhooks'
|
||||
|
|
@ -86,18 +106,8 @@ class Health(Service):
|
|||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_storage_anti_virus(self):
|
||||
"""Check Anti virus Health"""
|
||||
|
||||
params = {}
|
||||
path = '/health/storage/anti-virus'
|
||||
|
||||
return self.client.call('get', path, {
|
||||
'content-type': 'application/json',
|
||||
}, params)
|
||||
|
||||
def get_storage_local(self):
|
||||
"""Check File System Health"""
|
||||
"""Get Local Storage"""
|
||||
|
||||
params = {}
|
||||
path = '/health/storage/local'
|
||||
|
|
@ -107,7 +117,7 @@ class Health(Service):
|
|||
}, params)
|
||||
|
||||
def get_time(self):
|
||||
"""Check Time Health"""
|
||||
"""Get Time"""
|
||||
|
||||
params = {}
|
||||
path = '/health/time'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
from appwrite.client import Client
|
||||
from appwrite.services.health import Health
|
||||
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_project('5df5acd0d48c2') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
)
|
||||
|
||||
health = Health(client)
|
||||
|
||||
result = health.get_anti_virus()
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
from appwrite.client import Client
|
||||
from appwrite.services.health import Health
|
||||
|
||||
client = Client()
|
||||
|
||||
(client
|
||||
.set_project('5df5acd0d48c2') # Your project ID
|
||||
.set_key('919c2d18fb5d4...a2ae413da83346ad2') # Your secret API key
|
||||
)
|
||||
|
||||
health = Health(client)
|
||||
|
||||
result = health.get_queue_functions()
|
||||
|
|
@ -7,9 +7,9 @@ setuptools.setup(
|
|||
license='BSD-3-Clause',
|
||||
description = 'Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API',
|
||||
author = 'Appwrite Team',
|
||||
author_email = 'team@appwrite.io',
|
||||
author_email = 'team@localhost.test',
|
||||
maintainer = 'Appwrite Team',
|
||||
maintainer_email = 'team@appwrite.io',
|
||||
maintainer_email = 'team@localhost.test',
|
||||
url = 'https://appwrite.io/support',
|
||||
download_url='https://github.com/appwrite/sdk-for-python/archive/0.0.4.tar.gz',
|
||||
# keywords = ['SOME', 'MEANINGFULL', 'KEYWORDS'],
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Appwrite SDK for Ruby
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**This SDK is compatible with Appwrite server version 0.5.3. For older versions, please check previous releases.**
|
||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
||||
|
||||
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 Ruby SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|||
For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)"
|
||||
s.author = 'Appwrite Team'
|
||||
s.homepage = 'https://appwrite.io/support'
|
||||
s.email = 'team@appwrite.io'
|
||||
s.email = 'team@localhost.test'
|
||||
s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
||||
|
||||
end
|
||||
|
|
@ -12,6 +12,17 @@ module Appwrite
|
|||
}, params);
|
||||
end
|
||||
|
||||
def get_anti_virus()
|
||||
path = '/health/anti-virus'
|
||||
|
||||
params = {
|
||||
}
|
||||
|
||||
return @client.call('get', path, {
|
||||
'content-type' => 'application/json',
|
||||
}, params);
|
||||
end
|
||||
|
||||
def get_cache()
|
||||
path = '/health/cache'
|
||||
|
||||
|
|
@ -45,6 +56,17 @@ module Appwrite
|
|||
}, params);
|
||||
end
|
||||
|
||||
def get_queue_functions()
|
||||
path = '/health/queue/functions'
|
||||
|
||||
params = {
|
||||
}
|
||||
|
||||
return @client.call('get', path, {
|
||||
'content-type' => 'application/json',
|
||||
}, params);
|
||||
end
|
||||
|
||||
def get_queue_logs()
|
||||
path = '/health/queue/logs'
|
||||
|
||||
|
|
@ -89,17 +111,6 @@ module Appwrite
|
|||
}, params);
|
||||
end
|
||||
|
||||
def get_storage_anti_virus()
|
||||
path = '/health/storage/anti-virus'
|
||||
|
||||
params = {
|
||||
}
|
||||
|
||||
return @client.call('get', path, {
|
||||
'content-type' => 'application/json',
|
||||
}, params);
|
||||
end
|
||||
|
||||
def get_storage_local()
|
||||
path = '/health/storage/local'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Appwrite SDK for JavaScript
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
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 JavaScript SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||
|
|
|
|||
|
|
@ -712,7 +712,7 @@
|
|||
* @throws {Error}
|
||||
* @return {Promise}
|
||||
*/
|
||||
createOAuth2Session: function(provider, success = 'https://localhost:2444/auth/oauth2/success', failure = 'https://localhost:2444/auth/oauth2/failure') {
|
||||
createOAuth2Session: function(provider, success = 'https://appwrite.io/auth/oauth2/success', failure = 'https://appwrite.io/auth/oauth2/failure') {
|
||||
if(provider === undefined) {
|
||||
throw new Error('Missing required parameter: "provider"');
|
||||
}
|
||||
|
|
|
|||
2
app/sdks/web-javascript/src/sdk.min.js
vendored
2
app/sdks/web-javascript/src/sdk.min.js
vendored
|
|
@ -45,7 +45,7 @@ return http.put(path,{'content-type':'application/json',},payload)},getSessions:
|
|||
if(password===undefined){throw new Error('Missing required parameter: "password"')}
|
||||
let path='/account/sessions';let payload={};if(email){payload.email=email}
|
||||
if(password){payload.password=password}
|
||||
return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://localhost:2444/auth/oauth2/success',failure='https://localhost:2444/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')}
|
||||
return http.post(path,{'content-type':'application/json',},payload)},deleteSessions:function(){let path='/account/sessions';let payload={};return http.delete(path,{'content-type':'application/json',},payload)},createOAuth2Session:function(provider,success='https://appwrite.io/auth/oauth2/success',failure='https://appwrite.io/auth/oauth2/failure'){if(provider===undefined){throw new Error('Missing required parameter: "provider"')}
|
||||
let path='/account/sessions/oauth2/{provider}'.replace(new RegExp('{provider}','g'),provider);let payload={};if(success){payload.success=success}
|
||||
if(failure){payload.failure=failure}
|
||||
payload.project=config.project;let query=Object.keys(payload).map(key=>key+'='+encodeURIComponent(payload[key])).join('&');window.location=config.endpoint+path+((query)?'?'+query:'')},deleteSession:function(sessionId){if(sessionId===undefined){throw new Error('Missing required parameter: "sessionId"')}
|
||||
|
|
|
|||
Loading…
Reference in a new issue