Comments (14)
do you actually have any banned users? can you dump response differences between sdk and http raw client request
from helix.
@jackmcguire1
i provided example code of a REASON so you didnt run it and guessed i did something wrong
next time i just write "dont work" and cut the efford of providing example code
from helix.
@tarumes no youre not an idiot i can confirm function does not work as expected
from helix.
The request in the code looks fine https://github.com/nicklaw5/helix/blob/main/moderation.go#L34
https://dev.twitch.tv/docs/api/reference/#get-banned-users
although the Ban structure is missing fields like
https://github.com/nicklaw5/helix/blob/main/moderation.go#L6
created_at": "2022-08-07T02:02:55Z",
"reason": "Inappropriate words.",
"moderator_id": "141981764",
"moderator_login": "twitchdev",
"moderator_name": "TwitchDev"
from helix.
11k banned users yes
the first one gives me
&{ResponseCommon:{StatusCode:200 Header:map[Content-Length:[27] Content-Type:[application/json; charset=utf-8] Date:[Wed, 21 Feb 2024 20:39:35 GMT] Ratelimit-Limit:[800] Ratelimit-Remaining:[799] Ratelimit-Reset:[1708547975] Strict-Transport-Security:[max-age=300] Timing-Allow-Origin:[https://www.twitch.tv] Vary:[Accept-Encoding, Origin] X-Cache:[MISS, MISS] X-Cache-Hits:[0, 0] X-Served-By:[cache-bfi-kbfi7400068-BFI, cache-lin2290031-LIN] X-Timer:[S1708547975.838939,VS0,VS0,VE191]] Error: ErrorStatus:0 ErrorMessage:} Data:{Bans:[] Pagination:{Cursor:}}}
my custom http request gives me the correct json with the first 100 banned users and a cursor
from helix.
Happy to accept a PR to fix this issue.
from helix.
Can you remove the UserID
from BannedUsersParams
I tested on my side :
resp, err := client.GetBannedUsers(&helix.BannedUsersParams{
BroadcasterID: "145328278",
})
spew.Dump(resp)
It returned
…
Data: (helix.ManyBans) {
Bans: ([]helix.Ban) (len=3 cap=4) {
(helix.Ban) {
UserID: (string) (len=9) "279339253",
UserLogin: (string) (len=10) "malvo_prod",
UserName: (string) (len=10) "malvo_prod",
ExpiresAt: (helix.Time) 0001-01-01 00:00:00 +0000 UTC
},
(helix.Ban) {
UserID: (string) (len=9) "458673142",
UserLogin: (string) (len=7) "dab__34",
UserName: (string) (len=7) "dab__34",
ExpiresAt: (helix.Time) 0001-01-01 00:00:00 +0000 UTC
},
(helix.Ban) {
UserID: (string) (len=8) "70017539",
UserLogin: (string) (len=15) "benjiistreaming",
UserName: (string) (len=15) "benjiistreaming",
ExpiresAt: (helix.Time) 0001-01-01 00:00:00 +0000 UTC
}
},
Pagination: (helix.Pagination) {
Cursor: (string) ""
}
}
According to me, there is no issue.
from helix.
According to me, there is no issue.
The issue was on twitch's side, looks like it has been fixed now.
from helix.
require github.com/nicklaw5/helix/v2 v2.28.2
still no data from package function so it is not twitchs fault?
i can reproduce it since hours now (running a request loop)
2024/05/08 13:20:14 main.go:59: package: &{ResponseCommon:{StatusCode:200 Header:map[Content-Length:[27] Content-Type:[application/json; charset=utf-8] Date:[Wed, 08 May 2024 11:20:14 GMT] Ratelimit-Limit:[800] Ratelimit-Remaining:[799] Ratelimit-Reset:[1715167215] Strict-Transport-Security:[max-age=300] Timing-Allow-Origin:[https://www.twitch.tv] Vary:[Accept-Encoding, Origin] X-Cache:[MISS, MISS] X-Cache-Hits:[0, 0] X-Served-By:[cache-bfi-kbfi7400068-BFI, cache-mxp6926-MXP] X-Timer:[S1715167214.214906,VS0,VS0,VE189]] Error: ErrorStatus:0 ErrorMessage:} Data:{Bans:[] Pagination:{Cursor:}}}
2024/05/08 13:20:14 main.go:69: custom {"data":[{"user_id":"1037037936","user_login":"mainman1313","user_name":"mainman1313","expires_at":"","created_at":"2024-05-07T13:46:06Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1071296193","user_login":"w3vezsj3pu4","user_name":"w3vezsj3pu4","expires_at":"","created_at":"2024-05-07T13:48:19Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1071321528","user_login":"3gb85v9chwcl","user_name":"3gb85v9chwcl","expires_at":"","created_at":"2024-05-07T13:47:16Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1072741097","user_login":"madily1nkf","user_name":"madily1nkf","expires_at":"","created_at":"2024-05-07T13:51:51Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1072748760","user_login":"dadleyzagd","user_name":"dadleyzagd","expires_at":"","created_at":"2024-05-07T13:48:31Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1072766765","user_login":"juliettapz","user_name":"juliettapz","expires_at":"","created_at":"2024-05-07T13:55:31Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1072769390","user_login":"pdearlmh","user_name":"pdearlmh","expires_at":"","created_at":"2024-05-07T13:54:21Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1073971193","user_login":"talkamaltul","user_name":"talkamaltul","expires_at":"","created_at":"2024-05-07T13:50:32Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"1078500951","user_login":"xoxo7315","user_name":"xoxo7315","expires_at":"","created_at":"2024-05-07T14:39:20Z","reason":"LurkerBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"171398668","user_login":"cubeyyyy_","user_name":"cubeyyyy_","expires_at":"","created_at":"2024-05-07T13:49:42Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"190537928","user_login":"poxzyy","user_name":"poxzyy","expires_at":"","created_at":"2024-05-07T13:53:15Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"195150208","user_login":"joseluissonico","user_name":"Joseluissonico","expires_at":"","created_at":"2024-05-07T13:54:44Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"247725249","user_login":"glcgreedy","user_name":"GLCGreedy","expires_at":"","created_at":"2024-05-07T13:51:10Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"258962156","user_login":"managerbradley","user_name":"managerbradley","expires_at":"","created_at":"2024-05-07T13:53:09Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"266385619","user_login":"wash_me__","user_name":"Wash_Me__","expires_at":"","created_at":"2024-05-07T13:55:02Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"278303943","user_login":"pichy82","user_name":"pichy82","expires_at":"","created_at":"2024-05-07T13:53:44Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"418712524","user_login":"herokina23","user_name":"herokina23","expires_at":"","created_at":"2024-05-07T13:54:02Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"424630100","user_login":"nsqueponerxd","user_name":"nsqueponerxd","expires_at":"","created_at":"2024-05-07T13:49:59Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"43234135","user_login":"thetraoz","user_name":"TheTraoz","expires_at":"","created_at":"2024-05-07T13:50:37Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"458260762","user_login":"margo0333","user_name":"margo0333","expires_at":"","created_at":"2024-05-07T13:54:15Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"458999762","user_login":"nv_kyord","user_name":"nv_kyord","expires_at":"","created_at":"2024-05-07T13:53:50Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"465983569","user_login":"ulosthahaha","user_name":"ULosthahaha","expires_at":"","created_at":"2024-05-07T13:52:27Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"488127613","user_login":"doggod_max","user_name":"doggod_max","expires_at":"","created_at":"2024-05-07T13:51:28Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"491123791","user_login":"vtwezz","user_name":"vtwezz","expires_at":"","created_at":"2024-05-07T13:50:14Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"501640499","user_login":"suhcolegamr","user_name":"suhcolegamr","expires_at":"","created_at":"2024-05-07T13:55:08Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"511509135","user_login":"botdochaat","user_name":"botdochaat","expires_at":"","created_at":"2024-05-07T13:47:22Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"512522772","user_login":"takashi_shinpt","user_name":"takashi_shinpt","expires_at":"","created_at":"2024-05-07T13:48:06Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"573173923","user_login":"clavdax","user_name":"clavdax","expires_at":"","created_at":"2024-05-07T13:54:50Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"581781958","user_login":"ilbardeinerd","user_name":"ilBarDeiNerd","expires_at":"","created_at":"2024-05-07T13:52:09Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"598055357","user_login":"didacnasfarne","user_name":"didacnasfarne","expires_at":"","created_at":"2024-05-07T13:51:34Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"603934437","user_login":"einfachlukas1","user_name":"einfachlukas1","expires_at":"","created_at":"2024-05-07T13:46:35Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"606238691","user_login":"kirstenh14","user_name":"kirstenh14","expires_at":"","created_at":"2024-05-07T13:47:05Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"606709606","user_login":"fr_rens","user_name":"FR_Rens","expires_at":"","created_at":"2024-05-07T13:52:03Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"631162760","user_login":"joyboy_hr","user_name":"JoyBoy_HR","expires_at":"","created_at":"2024-05-07T13:49:05Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"654928357","user_login":"luktcong","user_name":"luktcong","expires_at":"","created_at":"2024-05-07T13:53:56Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"658965931","user_login":"gmr9913","user_name":"gmr9913","expires_at":"","created_at":"2024-05-07T13:48:53Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"660904789","user_login":"lzwarcraft3386","user_name":"lzwarcraft3386","expires_at":"","created_at":"2024-05-07T13:51:45Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"663479353","user_login":"littenoss","user_name":"littenoss","expires_at":"","created_at":"2024-05-07T13:53:33Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"680201685","user_login":"akzenticfn","user_name":"akzenticfn","expires_at":"","created_at":"2024-05-07T13:50:05Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"680291661","user_login":"aleks_377","user_name":"aleks_377","expires_at":"","created_at":"2024-05-07T13:47:45Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"753169329","user_login":"soulchansu","user_name":"soulchansu","expires_at":"","created_at":"2024-05-07T13:50:59Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"805113202","user_login":"metalcieleman","user_name":"metalcieleman","expires_at":"","created_at":"2024-05-07T13:50:20Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"819772812","user_login":"salvottoyt_ets_","user_name":"salvottoyt_ets_","expires_at":"","created_at":"2024-05-07T13:53:21Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"830508848","user_login":"grammanotfake","user_name":"grammanotfake","expires_at":"","created_at":"2024-05-07T13:52:33Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"843075239","user_login":"7mni_88","user_name":"7mni_88","expires_at":"","created_at":"2024-05-07T13:49:48Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"855412249","user_login":"ugopiq","user_name":"ugopiq","expires_at":"","created_at":"2024-05-07T13:52:44Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"865619677","user_login":"tasurisud","user_name":"tasurisud","expires_at":"","created_at":"2024-05-07T13:54:09Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"866152433","user_login":"owen_btww","user_name":"owen_btww","expires_at":"","created_at":"2024-05-07T13:46:59Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"866346099","user_login":"mosarefu","user_name":"mosarefu","expires_at":"","created_at":"2024-05-07T13:51:04Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"866470973","user_login":"lequmab","user_name":"lequmab","expires_at":"","created_at":"2024-05-07T13:52:15Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"898715378","user_login":"hakuna_505","user_name":"hakuna_505","expires_at":"","created_at":"2024-05-07T13:46:24Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"915107182","user_login":"robinhofx01","user_name":"RobinhoFX01","expires_at":"","created_at":"2024-05-07T15:23:54Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"943570177","user_login":"insomniodiego","user_name":"insomniodiego","expires_at":"","created_at":"2024-05-07T13:49:28Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"953985920","user_login":"malignantshovy","user_name":"malignantshovy","expires_at":"","created_at":"2024-05-07T13:48:36Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"953989505","user_login":"adorablesten0","user_name":"adorablesten0","expires_at":"","created_at":"2024-05-07T13:50:26Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"954010687","user_login":"complicatedhars","user_name":"complicatedhars","expires_at":"","created_at":"2024-05-07T13:54:56Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"954552690","user_login":"perplexih","user_name":"perplexih","expires_at":"","created_at":"2024-05-07T13:51:22Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"954775454","user_login":"greyappoig","user_name":"greyappoig","expires_at":"","created_at":"2024-05-07T13:53:03Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"954848555","user_login":"tolerablefurj","user_name":"tolerablefurj","expires_at":"","created_at":"2024-05-07T13:55:25Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"955330484","user_login":"garbledcra8","user_name":"garbledcra8","expires_at":"","created_at":"2024-05-07T13:50:43Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"955514894","user_login":"oralbeatingx","user_name":"oralbeatingx","expires_at":"","created_at":"2024-05-07T13:55:19Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"955864352","user_login":"tidalsittinn","user_name":"tidalsittinn","expires_at":"","created_at":"2024-05-07T13:51:57Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"955952641","user_login":"ensconced2","user_name":"ensconced2","expires_at":"","created_at":"2024-05-07T13:52:21Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956355386","user_login":"productiveabatemer","user_name":"productiveabatemer","expires_at":"","created_at":"2024-05-07T13:54:33Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956363747","user_login":"stuffedpanek","user_name":"stuffedpanek","expires_at":"","created_at":"2024-05-07T13:48:59Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956593144","user_login":"linkedabbreviatiox","user_name":"linkedabbreviatiox","expires_at":"","created_at":"2024-05-07T13:53:38Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956621197","user_login":"trailingaltercc","user_name":"trailingaltercc","expires_at":"","created_at":"2024-05-07T13:51:39Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956756924","user_login":"secondfloorprovn","user_name":"secondfloorprovn","expires_at":"","created_at":"2024-05-07T13:46:29Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"956978517","user_login":"heartfeltjavelk","user_name":"heartfeltjavelk","expires_at":"","created_at":"2024-05-07T13:47:10Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"957029123","user_login":"timelessbookf","user_name":"timelessbookf","expires_at":"","created_at":"2024-05-07T13:47:28Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"957082190","user_login":"goryhammerinl","user_name":"goryhammerinl","expires_at":"","created_at":"2024-05-07T13:48:42Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"957175308","user_login":"uptightslou","user_name":"uptightslou","expires_at":"","created_at":"2024-05-07T13:48:48Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"957181388","user_login":"grittywhirlpoos","user_name":"grittywhirlpoos","expires_at":"","created_at":"2024-05-07T13:49:11Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"958112223","user_login":"gratefulknz","user_name":"gratefulknz","expires_at":"","created_at":"2024-05-07T13:52:58Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"958162187","user_login":"capitalistdownv","user_name":"capitalistdownv","expires_at":"","created_at":"2024-05-07T13:54:38Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"958440294","user_login":"telescopicde3","user_name":"telescopicde3","expires_at":"","created_at":"2024-05-07T13:47:53Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"958609154","user_login":"bilateralpx","user_name":"bilateralpx","expires_at":"","created_at":"2024-05-07T13:48:00Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"961535791","user_login":"innerbougainvillee","user_name":"innerbougainvillee","expires_at":"","created_at":"2024-05-07T13:46:01Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"963003373","user_login":"ascorbiccm","user_name":"ascorbiccm","expires_at":"","created_at":"2024-05-07T13:55:42Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"96333104","user_login":"valistek","user_name":"Valistek","expires_at":"","created_at":"2024-05-07T13:46:47Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"963692285","user_login":"unseenlemon2","user_name":"unseenlemon2","expires_at":"","created_at":"2024-05-07T13:52:39Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"965640506","user_login":"scholarlycod","user_name":"scholarlycod","expires_at":"","created_at":"2024-05-07T13:46:18Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"965860990","user_login":"fastmovingellx","user_name":"fastmovingellx","expires_at":"","created_at":"2024-05-07T13:47:40Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"967467034","user_login":"aimlessmysk","user_name":"aimlessmysk","expires_at":"","created_at":"2024-05-07T13:48:14Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"967664286","user_login":"paintedmf","user_name":"paintedmf","expires_at":"","created_at":"2024-05-07T13:50:49Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"969774056","user_login":"venerablesurveilll","user_name":"venerablesurveilll","expires_at":"","created_at":"2024-05-07T13:53:27Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"969788916","user_login":"newsmudged","user_name":"newsmudged","expires_at":"","created_at":"2024-05-07T13:48:25Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"970580224","user_login":"likablefootfallt","user_name":"likablefootfallt","expires_at":"","created_at":"2024-05-07T13:46:12Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"972069689","user_login":"recurringfriendlyb","user_name":"recurringfriendlyb","expires_at":"","created_at":"2024-05-07T13:49:53Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"974324472","user_login":"halfwaycheo","user_name":"halfwaycheo","expires_at":"","created_at":"2024-05-07T13:49:23Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"975283178","user_login":"geometricdirecv","user_name":"geometricdirecv","expires_at":"","created_at":"2024-05-07T13:54:27Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"975988470","user_login":"goingslicep","user_name":"goingslicep","expires_at":"","created_at":"2024-05-07T13:55:14Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"976616192","user_login":"abominablecreatc","user_name":"abominablecreatc","expires_at":"","created_at":"2024-05-07T13:47:33Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"977872227","user_login":"misshapenove9","user_name":"misshapenove9","expires_at":"","created_at":"2024-05-07T13:52:50Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"98159179","user_login":"triganasd","user_name":"triganasd","expires_at":"","created_at":"2024-05-07T13:51:16Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"981956902","user_login":"usableduplio","user_name":"usableduplio","expires_at":"","created_at":"2024-05-07T13:55:37Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"982249416","user_login":"secretfainp","user_name":"secretfainp","expires_at":"","created_at":"2024-05-07T13:46:41Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"983376532","user_login":"mossystation4","user_name":"mossystation4","expires_at":"","created_at":"2024-05-07T13:49:17Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"991760201","user_login":"astonishedcoveg","user_name":"astonishedcoveg","expires_at":"","created_at":"2024-05-07T13:49:34Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"},{"user_id":"993371854","user_login":"shabbystolen","user_name":"shabbystolen","expires_at":"","created_at":"2024-05-07T13:46:52Z","reason":"SpamBot","moderator_id":"70006546","moderator_login":"tarumes","moderator_name":"Tarumes"}],"pagination":{"cursor":"eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6ImV5SmlZVzVmZEhsd1pWOWZZbUZ1Ym1Wa1gyRjBJanA3SWtJaU9tNTFiR3dzSWtKUFQwd2lPbTUxYkd3c0lrSlRJanB1ZFd4c0xDSk1JanB1ZFd4c0xDSk5JanB1ZFd4c0xDSk9JanB1ZFd4c0xDSk9VeUk2Ym5Wc2JDd2lUbFZNVENJNmJuVnNiQ3dpVXlJNklsQkZVazFCVGtWT1ZGOWZNakF5TkMwd05TMHdOMVF4TXpvME5qb3dNUzR4TkRjM05UZ3pNek5hSWl3aVUxTWlPbTUxYkd4OUxDSmphR0Z1Ym1Wc1gybGtJanA3SWtJaU9tNTFiR3dzSWtKUFQwd2lPbTUxYkd3c0lrSlRJanB1ZFd4c0xDSk1JanB1ZFd4c0xDSk5JanB1ZFd4c0xDSk9JanB1ZFd4c0xDSk9VeUk2Ym5Wc2JDd2lUbFZNVENJNmJuVnNiQ3dpVXlJNklqY3dNREEyTlRRMklpd2lVMU1pT201MWJHeDlMQ0pqYUdGdWJtVnNYMmxrWDE5MWMyVnlYMmxrSWpwN0lrSWlPbTUxYkd3c0lrSlBUMHdpT201MWJHd3NJa0pUSWpwdWRXeHNMQ0pNSWpwdWRXeHNMQ0pOSWpwdWRXeHNMQ0pPSWpwdWRXeHNMQ0pPVXlJNmJuVnNiQ3dpVGxWTVRDSTZiblZzYkN3aVV5STZJamN3TURBMk5UUTJYMTg1TmpFMU16VTNPVEVpTENKVFV5STZiblZzYkgxOSJ9fQ"}}
from helix.
same for me still does not work
custom function returns correct data
package function returns empty data
from helix.
@tarumes / @liadala did you remove UserID
from BannedUsersParams
?
Do you have an example of code up to date ?
It works on my side.
from helix.
if you execute the code above it still gives the results as stated
and
the UserID is a slice of strings to filter the results and not as in the package a single string
as seen here Reference
my proposal to change to this
// ExpiresAt must be parsed manually since an empty string means perma ban
type Ban struct {
UserID string `json:"user_id"`
UserLogin string `json:"user_login"`
UserName string `json:"user_name"`
ExpiresAt Time `json:"expires_at"`
CreatedAt Time `json:"created_at"`
Reason string `json:"reason"`
ModeratorID string `json:"moderator_id"`
ModeratorLogin string `json:"moderator_login"`
ModeratorName string `json:"moderator_name"`
}
// BroadcasterID must match the auth tokens user_id
type BannedUsersParams struct {
BroadcasterID string `query:"broadcaster_id"`
// Filter by provided UserIDs
UserID []string `query:"user_id"`
First int `query:"first,20"` // Limit 100
After string `query:"after"`
Before string `query:"before"`
}
from helix.
@liadala the code above return the an empty result because the UserID
is setted but it should not be setted.
I tested it, I have the same behavior (empty list). Then I removed the UserID
and the list is OK as expected.
Following your suggestion I created a PR ( #220 ) to set UserID as array of string.
I tested it without setting it / setting it with 1 ID, setting it with many ID and it works ;)
from helix.
#220 has been merged and released. See https://github.com/nicklaw5/helix/releases/tag/v2.28.3
from helix.
Related Issues (20)
- Allow querying multiple channels with `GetChannelInformation`
- Proposal: Add option to pass in state for each API request HOT 5
- Proposal: Add default rate limit function HOT 2
- Client does not use AppAccessToken on calls that must use AppAccessToken HOT 4
- missing api endpoints
- Need to add VodOffset. HOT 2
- Latest Release is 12.13.0 not 2.13.0 HOT 1
- Endpoint errors but returned error is nil
- Support `tags` for the stream resource HOT 1
- Implement Schedule endpoints
- Auto Refreshing Access Tokens
- Update follows endpoint to new version HOT 1
- When scope for endpoint is missing in the access token, it gets locked in a loop refreshing the access token
- Proposal: Context for methods, not for struct itself
- GetBlockedTerms() does not use provided data HOT 2
- AddBlockedTerm() does not use provided data HOT 2
- Add send message endpoint request
- event EventSubChannelPredictionEndEvent json ended_at typo HOT 1
- Most recent patch release broke "API" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helix.