-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return corresponding types for API methods #285
Return corresponding types for API methods #285
Conversation
Don't touch `Api#call`, leave it with raw responses, but convert `result` in `method_missing`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few notes from the work process.
I've figured out that CI secret token is empty, that's why tests are failing: #287 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, thanks! Only a few moments to address.
result = nil | ||
client.fetch_updates { |something| result = something } | ||
|
||
expect(result).to be_a Telegram::Bot::Types::Message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already have a new branch, depending on this one because of these (fixed? remade?) specs, about proper bot.stop
. 😅
Now `one | another` works with `.new` without required `type`.
It's not working now, but I don't why. I've wrote to `@BotSupport`, let's wait for responses (although it was not helpful previously).
Previously there were `Update`s with `ChatMemberUpdated`, but empty `ChatMember`s inside. Now we'll pick correct classes and fill it with data.
There was an issue with old `ChatMember`, I've executed Rake task and got a lot of new types and fileds, so I've just updated them.
459d824
to
e5ea5e7
Compare
I had them locally and that's why there were not spec fails. I wanted to add them with new API methods, but the scratched data has them.
I'm waiting your decision about |
5de21db
to
79685d3
Compare
Added VCR changes from |
There is a RuboCop offense, but for cosistency of type names let's do it so.
Don't touch
Api#call
, leave it with raw responses, but convertresult
inmethod_missing
.Resolve #284
Resolve #286 now too.
And #278 too.