YoutubeAPI: next: user merge() instead of merge!()

This commit is contained in:
Samantaz Fox 2021-07-28 14:25:40 +02:00
parent 8ac6063776
commit 68d69df6d3
No known key found for this signature in database
GPG Key ID: F42821059186176E

View File

@ -253,11 +253,11 @@ module YoutubeAPI
# :ditto:
def next(data : Hash, *, client_config : ClientConfig | Nil = nil)
# JSON Request data, required by the API
data.merge!({
data2 = data.merge({
"context" => self.make_context(client_config),
})
return self._post_json("/youtubei/v1/next", data, client_config)
return self._post_json("/youtubei/v1/next", data2, client_config)
end
# Allow a NamedTuple to be passed, too.