aboutsummaryrefslogtreecommitdiff
path: root/content/docs/mal2go/v4/user/anime/set-rewatching-status.md
blob: 3c4a7674788d8f859fb038215027c2fc4e1e1eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: "Set Rewatching Status"
description: "Set Rewatching to true or false"
weight: 7
---

Use the `SetIsRewatching` method to set the rewatching status.
This method takes these arguments:

- `id int` ID of the anime
- `isRewatching bool` Self explanatory

Example:

``` go
package main

import (
  "github.com/MikunoNaka/MAL2Go/v4/user/anime"
  "log"
  "fmt"
  "strconv"
)

func main() {
  authToken := "YOUR_TOKEN_HERE"
  myClient := anime.Client {
    AuthToken: "Bearer " + authToken,
  }

  res, err := myClient.SetIsRewatching(47194, true)
  if err != nil {
    log.Fatal(err)
  }

  fmt.Println("Rewatching status has been set to ", strconv.FormatBool(res.IsRewatching))
}
```

The above example sets the rewatching status of "Summertime Render" to true.

The [response](/docs/mal2go/v4/user/anime/types/#mal2gouseranimeupdateresponse) from the API can be used to show the information of the anime after being updated.