1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Updated Go SDK

This commit is contained in:
Eldad Fux 2020-01-28 22:24:42 +02:00
parent 64783d9b28
commit 67468b518f
56 changed files with 18 additions and 68 deletions

View file

@ -6,7 +6,7 @@ import (
// Avatars service
type Avatars struct {
client *Client
client Client
}
// GetBrowser you can use this endpoint to show different browser icons to

View file

@ -17,42 +17,40 @@ type Client struct {
}
// SetEndpoint sets the default endpoint to which the Client connects to
func (clt Client) SetEndpoint(endpoint string) {
func (clt *Client) SetEndpoint(endpoint string) {
clt.endpoint = endpoint
}
// SetSelfSigned sets the condition that specify if the Client should allow connections to a server using a self-signed certificate
func (clt Client) SetSelfSigned(status bool) {
func (clt *Client) SetSelfSigned(status bool) {
clt.selfSigned = status
}
// AddHeader add a new custom header that the Client should send on each request
func (clt Client) AddHeader(key string, value string) {
func (clt *Client) AddHeader(key string, value string) {
clt.headers[key] = value
}
// SetProjectHeader add the 'X-Appwrite-Project' header for the Client. Your Appwrite project ID
func (clt Client) SetProjectHeader(value string) {
// Your Appwrite project ID
func (clt *Client) SetProject(value string) {
clt.headers["X-Appwrite-Project"] = value
}
// SetKeyHeader add the 'X-Appwrite-Key' header for the Client. Your Appwrite project secret key
func (clt Client) SetKeyHeader(value string) {
// Your Appwrite project secret key
func (clt *Client) SetKey(value string) {
clt.headers["X-Appwrite-Key"] = value
}
// SetLocaleHeader add the 'X-Appwrite-Locale' header for the Client.
func (clt Client) SetLocaleHeader(value string) {
func (clt *Client) SetLocale(value string) {
clt.headers["X-Appwrite-Locale"] = value
}
// SetModeHeader add the 'X-Appwrite-Mode' header for the Client.
func (clt Client) SetModeHeader(value string) {
func (clt *Client) SetMode(value string) {
clt.headers["X-Appwrite-Mode"] = value
}
// Call an API using Client
func (clt Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (map[string]interface{}, error) {
func (clt *Client) Call(method string, path string, headers map[string]interface{}, params map[string]interface{}) (map[string]interface{}, error) {
if clt.client == nil {
// Create HTTP client
clt.client = &http.Client{}

View file

@ -6,7 +6,7 @@ import (
// Database service
type Database struct {
client *Client
client Client
}
// ListCollections get a list of all the user collections. You can use the

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/appwrite/sdk-for-go"
)

View file

@ -5,7 +5,7 @@ import (
// Locale service
type Locale struct {
client *Client
client Client
}
// GetLocale get the current user location based on IP. Returns an object with

View file

@ -6,7 +6,7 @@ import (
// Storage service
type Storage struct {
client *Client
client Client
}
// ListFiles get a list of all the user files. You can use the query params to

View file

@ -6,7 +6,7 @@ import (
// Teams service
type Teams struct {
client *Client
client Client
}
// ListTeams get a list of all the current user teams. You can use the query

View file

@ -6,7 +6,7 @@ import (
// Users service
type Users struct {
client *Client
client Client
}
// ListUsers get a list of all the project users. You can use the query params

4
composer.lock generated
View file

@ -1526,7 +1526,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
"reference": "3b6b20934658551872ee86bd6207a57ddb0b3200"
"reference": "6dc240f55ef5cfe99563899dadd0d63afe882f00"
},
"require": {
"ext-curl": "*",
@ -1556,7 +1556,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"time": "2020-01-28T19:15:00+00:00"
"time": "2020-01-28T20:20:14+00:00"
},
{
"name": "doctrine/instantiator",