Go to file
Philippe-Adrien Nousse 98922c8d9a Add user update/enable/disable/welcome-mail 2018-07-05 15:01:25 +02:00
client Add user update/enable/disable/welcome-mail 2018-07-05 15:01:25 +02:00
vendor Nextcloud API Client, Uers/Response types, User list/search/get/create/delete 2018-07-05 12:50:56 +02:00
.gitignore Nextcloud API Client, Uers/Response types, User list/search/get/create/delete 2018-07-05 12:50:56 +02:00
README.md Add user update/enable/disable/welcome-mail 2018-07-05 15:01:25 +02:00
gonextcloud.iml Nextcloud API Client, Uers/Response types, User list/search/get/create/delete 2018-07-05 12:50:56 +02:00

README.md

[WIP] Nextcloud Go API Client

A simple Client for Nextcloud's API in Go.

TODO

  • Auth
    • login
    • logout
  • Users
    • search
    • list
    • get infos
    • create
    • update
    • delete
    • enable
    • disable
    • get groups
    • add to group
    • remove from group
    • get subadmin group
    • promote subadmin
    • demote subadmin
    • send welcome mail
  • Groups
    • create
    • delete
    • get members
    • get subadmins
  • Apps
    • list
    • get infos
    • enable
    • disable

Getting started

Authentication

package main

import (
	"fmt"
	"github.com/partitio/gonextcloud/client"
)

func main() {
	url := "https://www.mynextcloud.com"
	username := "admin"
	password := "password"
	c, err := client.NewClient(url)
	if err != nil {
		panic(err)
	}
	if err := c.Login(username, password); err != nil {
		panic(err)
	}
	defer c.Logout()
}

Users

List :

func (c *Client) UserList() ([]string, error)

Search

func (c *Client) UserSearch(search string) ([]string, error)

Get

func (c *Client) User(name string) (*types.User, error)

Create

func (c *Client) UserCreate(username string, password string) error

Delete

func (c *Client) UserDelete(name string) error 

Enable

func (c *Client) UserEnable(name string) error 

Disable

func (c *Client) UserDisable(name string) error 

Update

func (c *Client) UserUpdateEmail(name string, email string) error

func (c *Client) UserUpdateDisplayName(name string, displayName string) error

func (c *Client) UserUpdatePhone(name string, phone string) error

func (c *Client) UserUpdateAddress(name string, address string) error

func (c *Client) UserUpdateWebSite(name string, website string) error

func (c *Client) UserUpdateTwitter(name string, twitter string) error

func (c *Client) UserUpdatePassword(name string, password string) error

func (c *Client) UserUpdateQuota(name string, quota string) error

Groups

TODO

Apps

TODO