Skip to content

[Feature]: Retrieve comments in a gist #2

@KEINOS

Description

@KEINOS

Feature request

Method to get the comments of a specified gist ID.

obj := gisty.NewGisty()

listComments, err := obj.GetComments(gistID)
if err != nil {
    log.Fatal(err)
}

for _, commentObj := range listComments {
    fmt.Println("User ID:", commentObj.User.ID())
    fmt.Println("User Name:", commentObj.User.DisplayName())
    fmt.Println("Date Post:", commentObj.DatePost())
    fmt.Println("Comment ID:", commentObj.CommentID())
    fmt.Println("InReplyTo:", commentObj,InReplyTo())
    fmt.Println("Comment Raw:", commentObj.Raw())   // Usually markdown
    fmt.Println("Comment HTML:", commentObj.HTML()) // Parsed HTML
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions