mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add logout endpoint
This commit is contained in:
parent
f71846628d
commit
2067c50937
1 changed files with 10 additions and 0 deletions
|
|
@ -250,6 +250,16 @@ type Crunchyroll struct {
|
|||
cache bool
|
||||
}
|
||||
|
||||
// Logout logs the user out which invalidates the current session.
|
||||
// You have to call a login method again and create a new Crunchyroll instance
|
||||
// if you want to perform any further actions since this instance is not usable
|
||||
// anymore after calling this.
|
||||
func (c *Crunchyroll) Logout() error {
|
||||
endpoint := "https://crunchyroll.com/logout"
|
||||
_, err := c.request(endpoint, http.MethodGet)
|
||||
return err
|
||||
}
|
||||
|
||||
// IsCaching returns if data gets cached or not.
|
||||
// See SetCaching for more information.
|
||||
func (c *Crunchyroll) IsCaching() bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue