1
0
Fork 0
mirror of synced 2024-06-28 11:10:46 +12:00

Updated go examples

This commit is contained in:
Eldad Fux 2020-01-28 15:49:07 +02:00
parent 464ae9ee70
commit 0ac4344d9f
49 changed files with 1187 additions and 1475 deletions

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetBrowser import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getbrowser // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetBrowser method and handle results
var res, err := srv.GetBrowser("aa")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetBrowser method and handle results
var res, err := srv.GetBrowser("aa")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetCreditCard import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcreditcard // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetCreditCard method and handle results
var res, err := srv.GetCreditCard("amex")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCreditCard method and handle results
var res, err := srv.GetCreditCard("amex")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetFavicon import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getfavicon // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetFavicon method and handle results
var res, err := srv.GetFavicon("https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFavicon method and handle results
var res, err := srv.GetFavicon("https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetFlag import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getflag // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetFlag method and handle results
var res, err := srv.GetFlag("af")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFlag method and handle results
var res, err := srv.GetFlag("af")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetImage import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getimage // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetImage method and handle results
var res, err := srv.GetImage("https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetImage method and handle results
var res, err := srv.GetImage("https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Avatars Examples package main
## GetQR import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getqr // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Avatars service passing Client
// Create a Client var srv := appwrite.Avatars{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Avatars service passing Client
var srv := appwrite.Avatars{
client: &clt
}
// Call GetQR method and handle results
var res, err := srv.GetQR("[TEXT]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetQR method and handle results
var res, err := srv.GetQR("[TEXT]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## CreateCollection import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createcollection // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call CreateCollection method and handle results
var res, err := srv.CreateCollection("[NAME]", [], [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateCollection method and handle results
var res, err := srv.CreateCollection("[NAME]", [], [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## CreateDocument import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createdocument // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call CreateDocument method and handle results
var res, err := srv.CreateDocument("[COLLECTION_ID]", "{}", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateDocument method and handle results
var res, err := srv.CreateDocument("[COLLECTION_ID]", "{}", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## DeleteCollection import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deletecollection // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call DeleteCollection method and handle results
var res, err := srv.DeleteCollection("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteCollection method and handle results
var res, err := srv.DeleteCollection("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## DeleteDocument import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deletedocument // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call DeleteDocument method and handle results
var res, err := srv.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteDocument method and handle results
var res, err := srv.DeleteDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## GetCollection import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcollection // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call GetCollection method and handle results
var res, err := srv.GetCollection("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCollection method and handle results
var res, err := srv.GetCollection("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## GetDocument import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getdocument // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call GetDocument method and handle results
var res, err := srv.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetDocument method and handle results
var res, err := srv.GetDocument("[COLLECTION_ID]", "[DOCUMENT_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## ListCollections import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-listcollections // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call ListCollections method and handle results
var res, err := srv.ListCollections()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call ListCollections method and handle results
var res, err := srv.ListCollections()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## ListDocuments import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-listdocuments // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call ListDocuments method and handle results
var res, err := srv.ListDocuments("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call ListDocuments method and handle results
var res, err := srv.ListDocuments("[COLLECTION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## UpdateCollection import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updatecollection // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call UpdateCollection method and handle results
var res, err := srv.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateCollection method and handle results
var res, err := srv.UpdateCollection("[COLLECTION_ID]", "[NAME]", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Database Examples package main
## UpdateDocument import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updatedocument // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Database service passing Client
// Create a Client var srv := appwrite.Database{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Database service passing Client
var srv := appwrite.Database{
client: &clt
}
// Call UpdateDocument method and handle results
var res, err := srv.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", "{}", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateDocument method and handle results
var res, err := srv.UpdateDocument("[COLLECTION_ID]", "[DOCUMENT_ID]", "{}", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetContinents import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcontinents // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetContinents method and handle results
var res, err := srv.GetContinents()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetContinents method and handle results
var res, err := srv.GetContinents()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetCountriesEU import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcountrieseu // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetCountriesEU method and handle results
var res, err := srv.GetCountriesEU()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCountriesEU method and handle results
var res, err := srv.GetCountriesEU()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetCountriesPhones import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcountriesphones // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetCountriesPhones method and handle results
var res, err := srv.GetCountriesPhones()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCountriesPhones method and handle results
var res, err := srv.GetCountriesPhones()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetCountries import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcountries // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetCountries method and handle results
var res, err := srv.GetCountries()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCountries method and handle results
var res, err := srv.GetCountries()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetCurrencies import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getcurrencies // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetCurrencies method and handle results
var res, err := srv.GetCurrencies()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetCurrencies method and handle results
var res, err := srv.GetCurrencies()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Locale Examples package main
## GetLocale import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getlocale // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Locale service passing Client
// Create a Client var srv := appwrite.Locale{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Locale service passing Client
var srv := appwrite.Locale{
client: &clt
}
// Call GetLocale method and handle results
var res, err := srv.GetLocale()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetLocale method and handle results
var res, err := srv.GetLocale()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## CreateFile import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createfile // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call CreateFile method and handle results
var res, err := srv.CreateFile(file, [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateFile method and handle results
var res, err := srv.CreateFile(file, [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## DeleteFile import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deletefile // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call DeleteFile method and handle results
var res, err := srv.DeleteFile("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteFile method and handle results
var res, err := srv.DeleteFile("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## GetFileDownload import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getfiledownload // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call GetFileDownload method and handle results
var res, err := srv.GetFileDownload("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFileDownload method and handle results
var res, err := srv.GetFileDownload("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## GetFilePreview import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getfilepreview // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call GetFilePreview method and handle results
var res, err := srv.GetFilePreview("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFilePreview method and handle results
var res, err := srv.GetFilePreview("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## GetFileView import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getfileview // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call GetFileView method and handle results
var res, err := srv.GetFileView("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFileView method and handle results
var res, err := srv.GetFileView("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## GetFile import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getfile // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call GetFile method and handle results
var res, err := srv.GetFile("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetFile method and handle results
var res, err := srv.GetFile("[FILE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## ListFiles import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-listfiles // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call ListFiles method and handle results
var res, err := srv.ListFiles()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call ListFiles method and handle results
var res, err := srv.ListFiles()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Storage Examples package main
## UpdateFile import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updatefile // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Storage service passing Client
// Create a Client var srv := appwrite.Storage{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Storage service passing Client
var srv := appwrite.Storage{
client: &clt
}
// Call UpdateFile method and handle results
var res, err := srv.UpdateFile("[FILE_ID]", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateFile method and handle results
var res, err := srv.UpdateFile("[FILE_ID]", [], [])
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## CreateTeamMembership import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createteammembership // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call CreateTeamMembership method and handle results
var res, err := srv.CreateTeamMembership("[TEAM_ID]", "email@example.com", [], "https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateTeamMembership method and handle results
var res, err := srv.CreateTeamMembership("[TEAM_ID]", "email@example.com", [], "https://example.com")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## CreateTeam import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createteam // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call CreateTeam method and handle results
var res, err := srv.CreateTeam("[NAME]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateTeam method and handle results
var res, err := srv.CreateTeam("[NAME]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## DeleteTeamMembership import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deleteteammembership // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call DeleteTeamMembership method and handle results
var res, err := srv.DeleteTeamMembership("[TEAM_ID]", "[INVITE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteTeamMembership method and handle results
var res, err := srv.DeleteTeamMembership("[TEAM_ID]", "[INVITE_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## DeleteTeam import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deleteteam // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call DeleteTeam method and handle results
var res, err := srv.DeleteTeam("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteTeam method and handle results
var res, err := srv.DeleteTeam("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## GetTeamMemberships import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getteammemberships // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call GetTeamMemberships method and handle results
var res, err := srv.GetTeamMemberships("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetTeamMemberships method and handle results
var res, err := srv.GetTeamMemberships("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## GetTeam import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getteam // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call GetTeam method and handle results
var res, err := srv.GetTeam("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetTeam method and handle results
var res, err := srv.GetTeam("[TEAM_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## ListTeams import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-listteams // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call ListTeams method and handle results
var res, err := srv.ListTeams()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call ListTeams method and handle results
var res, err := srv.ListTeams()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Teams Examples package main
## UpdateTeam import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updateteam // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Teams service passing Client
// Create a Client var srv := appwrite.Teams{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Teams service passing Client
var srv := appwrite.Teams{
client: &clt
}
// Call UpdateTeam method and handle results
var res, err := srv.UpdateTeam("[TEAM_ID]", "[NAME]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateTeam method and handle results
var res, err := srv.UpdateTeam("[TEAM_ID]", "[NAME]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## CreateUser import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-createuser // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call CreateUser method and handle results
var res, err := srv.CreateUser("email@example.com", "password")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call CreateUser method and handle results
var res, err := srv.CreateUser("email@example.com", "password")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## DeleteUserSession import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deleteusersession // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call DeleteUserSession method and handle results
var res, err := srv.DeleteUserSession("[USER_ID]", "[SESSION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteUserSession method and handle results
var res, err := srv.DeleteUserSession("[USER_ID]", "[SESSION_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## DeleteUserSessions import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-deleteusersessions // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call DeleteUserSessions method and handle results
var res, err := srv.DeleteUserSessions("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call DeleteUserSessions method and handle results
var res, err := srv.DeleteUserSessions("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## GetUserLogs import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getuserlogs // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call GetUserLogs method and handle results
var res, err := srv.GetUserLogs("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetUserLogs method and handle results
var res, err := srv.GetUserLogs("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## GetUserPrefs import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getuserprefs // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call GetUserPrefs method and handle results
var res, err := srv.GetUserPrefs("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetUserPrefs method and handle results
var res, err := srv.GetUserPrefs("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## GetUserSessions import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getusersessions // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call GetUserSessions method and handle results
var res, err := srv.GetUserSessions("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetUserSessions method and handle results
var res, err := srv.GetUserSessions("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## GetUser import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-getuser // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call GetUser method and handle results
var res, err := srv.GetUser("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call GetUser method and handle results
var res, err := srv.GetUser("[USER_ID]")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## ListUsers import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-listusers // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call ListUsers method and handle results
var res, err := srv.ListUsers()
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call ListUsers method and handle results
var res, err := srv.ListUsers()
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## UpdateUserPrefs import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updateuserprefs // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call UpdateUserPrefs method and handle results
var res, err := srv.UpdateUserPrefs("[USER_ID]", "")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateUserPrefs method and handle results
var res, err := srv.UpdateUserPrefs("[USER_ID]", "")
if err != nil {
panic(err)
}
fmt.Println(res)
}

View file

@ -1,35 +1,29 @@
# Users Examples package main
## UpdateUserStatus import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)
```go func main() {
package appwrite-updateuserstatus // Create a Client
var client := appwrite.Client{}
import ( // Set Client required headers
"fmt" client.SetProject("")
"os" client.SetKey("")
"github.com/appwrite/sdk-for-go"
)
func main() { // Create a new Users service passing Client
// Create a Client var srv := appwrite.Users{
var clt := appwrite.Client{} client: &client
// Set Client required headers
clt.SetProject("")
clt.SetKey("")
// Create a new Users service passing Client
var srv := appwrite.Users{
client: &clt
}
// Call UpdateUserStatus method and handle results
var res, err := srv.UpdateUserStatus("[USER_ID]", "1")
if err != nil {
panic(err)
}
fmt.Println(res)
} }
```
// Call UpdateUserStatus method and handle results
var res, err := srv.UpdateUserStatus("[USER_ID]", "1")
if err != nil {
panic(err)
}
fmt.Println(res)
}

70
composer.lock generated
View file

@ -1526,7 +1526,7 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/appwrite/sdk-generator", "url": "https://github.com/appwrite/sdk-generator",
"reference": "16e06a55edd4a7f1336249c03f0612080985a035" "reference": "25dd3295fa5e1fd7877bd71539eadcde42ff55cf"
}, },
"require": { "require": {
"ext-curl": "*", "ext-curl": "*",
@ -1556,7 +1556,7 @@
} }
], ],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2020-01-28T10:11:48+00:00" "time": "2020-01-28T13:46:34+00:00"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -2538,29 +2538,29 @@
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
"version": "dev-master", "version": "3.0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/diff.git", "url": "https://github.com/sebastianbergmann/diff.git",
"reference": "5c3c4d0229c311e88006f42307ad32082865dd31" "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5c3c4d0229c311e88006f42307ad32082865dd31", "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
"reference": "5c3c4d0229c311e88006f42307ad32082865dd31", "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3" "php": "^7.1"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.0", "phpunit/phpunit": "^7.5 || ^8.0",
"symfony/process": "^4 || ^5" "symfony/process": "^2 || ^3.3 || ^4"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.0-dev" "dev-master": "3.0-dev"
} }
}, },
"autoload": { "autoload": {
@ -2573,13 +2573,13 @@
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [ "authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{ {
"name": "Kore Nordmann", "name": "Kore Nordmann",
"email": "mail@kore-nordmann.de" "email": "mail@kore-nordmann.de"
},
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
} }
], ],
"description": "Diff implementation", "description": "Diff implementation",
@ -2590,7 +2590,7 @@
"unidiff", "unidiff",
"unified diff" "unified diff"
], ],
"time": "2020-01-27T04:27:16+00:00" "time": "2019-02-04T06:01:07+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -2812,28 +2812,28 @@
}, },
{ {
"name": "sebastian/object-reflector", "name": "sebastian/object-reflector",
"version": "dev-master", "version": "1.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git", "url": "https://github.com/sebastianbergmann/object-reflector.git",
"reference": "d648d28a5bf69a919486da3b65ac2ae21554161a" "reference": "773f97c67f28de00d397be301821b06708fca0be"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d648d28a5bf69a919486da3b65ac2ae21554161a", "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
"reference": "d648d28a5bf69a919486da3b65ac2ae21554161a", "reference": "773f97c67f28de00d397be301821b06708fca0be",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3" "php": "^7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.0" "phpunit/phpunit": "^6.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0-dev" "dev-master": "1.1-dev"
} }
}, },
"autoload": { "autoload": {
@ -2853,32 +2853,32 @@
], ],
"description": "Allows reflection of object attributes, including inherited and non-public ones", "description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/", "homepage": "https://github.com/sebastianbergmann/object-reflector/",
"time": "2020-01-21T06:14:20+00:00" "time": "2017-03-29T09:07:27+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "dev-master", "version": "3.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "b0995d4de9434e326de38cb2cbcbb7a0f813c5ab" "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b0995d4de9434e326de38cb2cbcbb7a0f813c5ab", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"reference": "b0995d4de9434e326de38cb2cbcbb7a0f813c5ab", "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.3" "php": "^7.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.0" "phpunit/phpunit": "^6.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.0-dev" "dev-master": "3.0.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -2891,14 +2891,14 @@
"BSD-3-Clause" "BSD-3-Clause"
], ],
"authors": [ "authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{ {
"name": "Jeff Welch", "name": "Jeff Welch",
"email": "whatthejeff@gmail.com" "email": "whatthejeff@gmail.com"
}, },
{
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{ {
"name": "Adam Harvey", "name": "Adam Harvey",
"email": "aharvey@php.net" "email": "aharvey@php.net"
@ -2906,7 +2906,7 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2020-01-23T05:29:43+00:00" "time": "2017-03-03T06:23:57+00:00"
}, },
{ {
"name": "sebastian/resource-operations", "name": "sebastian/resource-operations",