Content-Length: 281750 | pFad | http://github.com/nicklaw5/helix/blob/main/docs/user_extensions.md

C0 helix/docs/user_extensions.md at main · nicklaw5/helix · GitHub
Skip to content

Latest commit

 

History

History
94 lines (74 loc) · 1.7 KB

user_extensions.md

File metadata and controls

94 lines (74 loc) · 1.7 KB

User Extensions Documentation

Get User Extensions

This is an example of how to get user extensions

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
    UserAccessToken: "user-access-token",
})
if err != nil {
    // handle error
}

resp, err := client.GetUserExtensions()
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)

Get User Active Extensions

This is an example of how to get active user extensions

Using UserAccessToken:

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
    UserAccessToken: "user-access-token",
})
if err != nil {
    // handle error
}

resp, err := client.GetUserActiveExtensions(nil)
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)

Using user_id query parameter:

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
})
if err != nil {
    // handle error
}

resp, err := client.GetUserActiveExtensions(&helix.UserActiveExtensionsParams{
    UserID: "user-id"
})
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)

Update User Extensions

This is an example of how to update user extensions The response format is the same as GetUserActiveExtensions

client, err := helix.NewClient(&helix.Options{
    ClientID: "your-client-id",
    UserAccessToken: "user-access-token",
})
if err != nil {
    // handle error
}

payload := &helix.UpdateUserExtensionsPayload{
    Panel: map[string]helix.UserActiveExtensionInfo{
        "1": helix.UserActiveExtensionInfo{
            Active: false,
        },
    },
}
resp, err := client.UpdateUserExtensions(payload)
if err != nil {
    // handle error
}

fmt.Printf("%+v\n", resp)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/nicklaw5/helix/blob/main/docs/user_extensions.md

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy