Created
December 27, 2023 17:55
-
-
Save mohemohe/81ab81ac58473859b784cc6b732fe0c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"os" | |
"github.com/mohemohe/go-tissue" | |
) | |
func main() { | |
links := []string{ | |
"https://komiflo.com/comics/20888", | |
"https://komiflo.com/comics/20889", | |
"https://komiflo.com/comics/20890", | |
"https://komiflo.com/comics/20891", | |
"https://komiflo.com/comics/20892", | |
"https://komiflo.com/comics/20893", | |
"https://komiflo.com/comics/20894", | |
"https://komiflo.com/comics/20895", | |
"https://komiflo.com/comics/20897", | |
"https://komiflo.com/comics/20900", | |
"https://komiflo.com/comics/20901", | |
"https://komiflo.com/comics/20902", | |
} | |
client, err := go_tissue.NewClient(&go_tissue.ClientOption{ | |
Email: os.Getenv("TISSUE_EMAIL"), | |
Password: os.Getenv("TISSUE_PASSWORD"), | |
}) | |
if err != nil { | |
panic(err) | |
} | |
collection, err := client.CreateCollection(&go_tissue.CreateCollectionOption{ | |
Title: "test collection", | |
Private: true, | |
}) | |
if err != nil { | |
panic(err) | |
} | |
for _, link := range links { | |
err := client.CreateCollectionItem(&go_tissue.CreateCollectionItemOption{ | |
CollectionID: collection.ID, | |
Link: link, | |
}) | |
if err != nil { | |
panic(err) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment