All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
CreateGroup | Post /v1.0/groups | Add new entity to groups |
ListGroups | Get /v1.0/groups | Get entities from groups |
Group CreateGroup(ctx).Group(group).Execute()
Add new entity to groups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
group := *openapiclient.NewGroup() // Group | New entity
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsApi.CreateGroup(context.Background()).Group(group).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.CreateGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateGroup`: Group
fmt.Fprintf(os.Stdout, "Response from `GroupsApi.CreateGroup`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateGroupRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
group | Group | New entity |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionOfGroup ListGroups(ctx).Search(search).Orderby(orderby).Select_(select_).Expand(expand).Execute()
Get entities from groups
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
search := "search_example" // string | Search items by search phrases (optional)
orderby := []string{"Orderby_example"} // []string | Order items by property values (optional)
select_ := []string{"Select_example"} // []string | Select properties to be returned (optional)
expand := []string{"Expand_example"} // []string | Expand related entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GroupsApi.ListGroups(context.Background()).Search(search).Orderby(orderby).Select_(select_).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GroupsApi.ListGroups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListGroups`: CollectionOfGroup
fmt.Fprintf(os.Stdout, "Response from `GroupsApi.ListGroups`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListGroupsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
search | string | Search items by search phrases | |
orderby | []string | Order items by property values | |
select_ | []string | Select properties to be returned | |
expand | []string | Expand related entities |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]