Skip to content

Latest commit

 

History

History
135 lines (85 loc) · 3.08 KB

AuthenticationAPI.md

File metadata and controls

135 lines (85 loc) · 3.08 KB

\AuthenticationAPI

All URIs are relative to http://localhost:8989

Method HTTP request Description
CreateLogin Post /login
GetLogout Get /logout

CreateLogin

CreateLogin(ctx).ReturnUrl(returnUrl).Username(username).Password(password).RememberMe(rememberMe).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {
	returnUrl := "returnUrl_example" // string |  (optional)
	username := "username_example" // string |  (optional)
	password := "password_example" // string |  (optional)
	rememberMe := "rememberMe_example" // string |  (optional)

	configuration := sonarrClient.NewConfiguration()
	apiClient := sonarrClient.NewAPIClient(configuration)
	r, err := apiClient.AuthenticationAPI.CreateLogin(context.Background()).ReturnUrl(returnUrl).Username(username).Password(password).RememberMe(rememberMe).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.CreateLogin``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Other Parameters

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

Name Type Description Notes
returnUrl string
username string
password string
rememberMe string

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined

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

GetLogout

GetLogout(ctx).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	sonarrClient "github.com/devopsarr/sonarr-go/sonarr"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apikey, X-Api-Key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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