southbridgeio / tdlib-ruby

Ruby bindings and client for TDLib
MIT License
95 stars 48 forks source link

Constants passes as strings but not objects #40

Closed benone closed 4 years ago

benone commented 4 years ago

When I call

client.get_chats(
  TD::Types::ChatList::Main,
  9223372036854775807,
  0,
  10
).wait

I get

Failed to parse JSON object as TDLib request: Expected Object, got String

Error related to first argument.

client.get_chats(
  nil,
  9223372036854775807,
  0,
  10
).wait

BTW is ok.

vladislav-yashin commented 4 years ago

Please, try

client.get_chats(
  TD::Types::ChatList::Main.new,
  9223372036854775807,
  0,
  10
).wait
benone commented 4 years ago

It works, thanks!