Skip to content

Latest commit

 

History

History
288 lines (186 loc) · 7.88 KB

GroupUsersApi.md

File metadata and controls

288 lines (186 loc) · 7.88 KB

\GroupUsersApi

All URIs are relative to http://localhost

Method HTTP request Description
GroupUsersAddUserToGroup Put /api/manage/v1/Groups/{id}/Users/{userId} Add user to the group by identifier
GroupUsersGetUsersInGroup Get /api/manage/v1/Groups/{id}/Users Returns users in the group by identifier
GroupUsersLeaveFromGroup Delete /api/manage/v1/Groups/{id}/leave Leave from the group
GroupUsersRemoveFromGroup Delete /api/manage/v1/Groups/{id}/Users/{userId} Remove user from the group by identifier

GroupUsersAddUserToGroup

GroupUsersAddUserToGroup(ctx, id, userId).Execute()

Add user to the group by identifier

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
    id := "id_example" // string | Identifier of group
    userId := "userId_example" // string | Identifier of user

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.GroupUsersApi.GroupUsersAddUserToGroup(context.Background(), id, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GroupUsersApi.GroupUsersAddUserToGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Identifier of group
userId string Identifier of user

Other Parameters

Other parameters are passed through a pointer to a apiGroupUsersAddUserToGroupRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GroupUsersGetUsersInGroup

GroupUsersVM GroupUsersGetUsersInGroup(ctx, id).Skip(skip).Take(take).Execute()

Returns users in the group by identifier

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
    id := "id_example" // string | Identifier of group
    skip := int32(56) // int32 | how many to skip (optional) (default to 0)
    take := int32(56) // int32 | how many to take (optional) (default to 10)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.GroupUsersApi.GroupUsersGetUsersInGroup(context.Background(), id).Skip(skip).Take(take).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GroupUsersApi.GroupUsersGetUsersInGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GroupUsersGetUsersInGroup`: GroupUsersVM
    fmt.Fprintf(os.Stdout, "Response from `GroupUsersApi.GroupUsersGetUsersInGroup`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Identifier of group

Other Parameters

Other parameters are passed through a pointer to a apiGroupUsersGetUsersInGroupRequest struct via the builder pattern

Name Type Description Notes

skip | int32 | how many to skip | [default to 0] take | int32 | how many to take | [default to 10]

Return type

GroupUsersVM

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GroupUsersLeaveFromGroup

GroupUsersLeaveFromGroup(ctx, id).Execute()

Leave from the group

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
    id := "id_example" // string | Identifier of group

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.GroupUsersApi.GroupUsersLeaveFromGroup(context.Background(), id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GroupUsersApi.GroupUsersLeaveFromGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Identifier of group

Other Parameters

Other parameters are passed through a pointer to a apiGroupUsersLeaveFromGroupRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GroupUsersRemoveFromGroup

GroupUsersRemoveFromGroup(ctx, id, userId).Execute()

Remove user from the group by identifier

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/fastreports/gofrcloud"
)

func main() {
    id := "id_example" // string | Identifier of group
    userId := "userId_example" // string | Identifier of user

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.GroupUsersApi.GroupUsersRemoveFromGroup(context.Background(), id, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `GroupUsersApi.GroupUsersRemoveFromGroup``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Identifier of group
userId string Identifier of user

Other Parameters

Other parameters are passed through a pointer to a apiGroupUsersRemoveFromGroupRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey, JWT

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]