Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Created December 27, 2023 17:55
Show Gist options
  • Save mohemohe/81ab81ac58473859b784cc6b732fe0c3 to your computer and use it in GitHub Desktop.
Save mohemohe/81ab81ac58473859b784cc6b732fe0c3 to your computer and use it in GitHub Desktop.
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