userlists

package
v2.2.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePatchUserListRequest

type CreatePatchUserListRequest struct {
	Name         string                             `json:"name"`
	IsPublic     bool                               `json:"is_public"`
	Contributors []CreateUserListRequestContributor `json:"contributors"`
}

type CreateUserListRequestContributor

type CreateUserListRequestContributor struct {
	Login string `json:"login"`
}

type CreateUserListResponse

type CreateUserListResponse struct {
	ID          string `json:"id"`
	UserListID  string `json:"user_list_id"`
	WorkspaceID string `json:"workspace_id"`
}

type DbUserList

type DbUserList struct {
	ID           string                  `json:"id"`
	UserID       int                     `json:"user_id"`
	Name         string                  `json:"name"`
	IsPublic     bool                    `json:"is_public"`
	IsFeatured   bool                    `json:"is_featured"`
	CreatedAt    time.Time               `json:"created_at"`
	UpdatedAt    time.Time               `json:"updated_at"`
	DeletedAt    *time.Time              `json:"deleted_at"`
	Contributors []DbUserListContributor `json:"contributors"`
}

type DbUserListContributor

type DbUserListContributor struct {
	ID        string    `json:"id"`
	UserID    int       `json:"user_id"`
	ListID    string    `json:"list_id"`
	Username  string    `json:"username"`
	CreatedAt time.Time `json:"created_at"`
}

type GetUserListsResponse

type GetUserListsResponse struct {
	Data []DbUserList      `json:"data"`
	Meta services.MetaData `json:"meta"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is used to access the "v2/workspaces/:workspaceId/userLists" endpoints and services

func NewService

func NewService(httpClient *http.Client, endpoint string) *Service

NewService returns a new UserListsService

func (*Service) CreateUserListForUser

func (s *Service) CreateUserListForUser(token string, workspaceID string, name string, logins []string) (*CreateUserListResponse, *http.Response, error)

CreateUserListForUser calls the "POST v2/workspaces/:workspaceId/userLists" endpoint for the authenticated user

func (*Service) GetUserList

func (s *Service) GetUserList(token string, workspaceID string, userlistID string) (*DbUserList, *http.Response, error)

GetUserList calls the "GET v2/workspaces/:workspaceId/userLists" endpoint for the authenticated user

func (*Service) GetUserLists

func (s *Service) GetUserLists(token string, workspaceID string, page, limit int) (*GetUserListsResponse, *http.Response, error)

GetUserLists calls the "GET v2/workspaces/:workspaceId/userLists" endpoint for the authenticated user

func (*Service) PatchUserListForUser

func (s *Service) PatchUserListForUser(token string, workspaceID string, userlistID string, name string, logins []string) (*DbUserList, *http.Response, error)

CreateUserListForUser calls the "PATCH v2/lists/:listId" endpoint for the authenticated user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL