diff options
| author | lost+skunk <[email protected]> | 2024-06-04 00:50:30 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-06-04 01:00:34 +0300 |
| commit | 66ab740d7fec430d97f69ab0ed52ba0f01973d46 (patch) | |
| tree | 72a0d5b7696f0402bc15bd37b0a9000b6f96ad9c /examples | |
| parent | 3334c33e04f48ee30a54c514180dece5528d4b72 (diff) | |
| download | devianter-66ab740d7fec430d97f69ab0ed52ba0f01973d46.tar.gz devianter-66ab740d7fec430d97f69ab0ed52ba0f01973d46.tar.bz2 devianter-66ab740d7fec430d97f69ab0ed52ba0f01973d46.zip | |
First Commit!
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/post.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/post.go b/examples/post.go new file mode 100644 index 0000000..2789c46 --- /dev/null +++ b/examples/post.go @@ -0,0 +1,25 @@ +package main + +import ( + "git.macaw.me/skunky/devianter" +) + +func main() { + id := "973578309" + d := devianter.Deviation(id, "Thrumyeye") + + println("Post Name:", d.Deviation.Title, "\nIMG url:", d.IMG) + + c := devianter.Comments(id, "", 0, 1) + println("\n\nPost Comments:", c.Total) + + for _, a := range c.Thread { + if a.User.IsBanned { + a.User.Username += " [v bane]" + } + println(a.User.Username+":", a.Comment) + } + + search := devianter.Search("skunk", "2", 'a') + println(search.Total, search.Pages) +} |
