mirror of
https://github.com/LukeHagar/plexgo.git
synced 2025-12-06 04:20:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.314.2
This commit is contained in:
13
sessions.go
13
sessions.go
@@ -137,7 +137,7 @@ func (s *Sessions) GetSessions(ctx context.Context) (*operations.GetSessionsResp
|
||||
|
||||
// GetSessionHistory - Get Session History
|
||||
// This will Retrieve a listing of all history views.
|
||||
func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessionHistoryResponse, error) {
|
||||
func (s *Sessions) GetSessionHistory(ctx context.Context, sort *string, accountID *int64, filter *operations.Filter, librarySectionID *int64) (*operations.GetSessionHistoryResponse, error) {
|
||||
hookCtx := hooks.HookContext{
|
||||
Context: ctx,
|
||||
OperationID: "getSessionHistory",
|
||||
@@ -145,6 +145,13 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
|
||||
SecuritySource: s.sdkConfiguration.Security,
|
||||
}
|
||||
|
||||
request := operations.GetSessionHistoryRequest{
|
||||
Sort: sort,
|
||||
AccountID: accountID,
|
||||
Filter: filter,
|
||||
LibrarySectionID: librarySectionID,
|
||||
}
|
||||
|
||||
baseURL := utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails())
|
||||
opURL, err := url.JoinPath(baseURL, "/status/sessions/history/all")
|
||||
if err != nil {
|
||||
@@ -158,6 +165,10 @@ func (s *Sessions) GetSessionHistory(ctx context.Context) (*operations.GetSessio
|
||||
req.Header.Set("Accept", "application/json")
|
||||
req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent)
|
||||
|
||||
if err := utils.PopulateQueryParams(ctx, req, request, nil); err != nil {
|
||||
return nil, fmt.Errorf("error populating query params: %w", err)
|
||||
}
|
||||
|
||||
if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user