Open TopOneOfTopOne opened 8 years ago
Hey @TopOneOfTopOne appreciate all the work you put into this.
I am not sure exactly what you mean by introspection, are you saying to look back over the library as a whole for ways to improve it, or expanding on a sort of metaprogramming?
For my No.2 point, the reason was to refactor code. Rather then having to add ?oauth_token=#{@access_token}
each time to the path we could add a single line of code in request.rb
e.g. `'Authorization' => "OAuth #{@access_token}" but I don't think there is much point given the code is already written.
I have done some testing for issue #21 and it didn't seem to matter how I passed the access token it always resulted in 500 error in fact even if I did not pass the access token it still resulted in 500 error.
Something like what flickraw is doing https://github.com/hanklords/flickraw obviously my skill is no where near writing that sought of code but I believe I could write something far simpler but still gain the benefits of using introspection. And yes I meant metaprogramming so we do not have to hard code all the requests.
My apologies @dustinlakin if this is not the right way to discuss about this as you can clearly tell I am a new programmer.
request.rb
rather than in the URLusername
e.g.Twitch#follow_channel(username, channel)
becomesTwitch#follow_channel(channel)
. The tests will have to be renamed.Finally, what are your thoughts on using introspection? This would greatly reduce the code but most of the old code would probably not be used if it were implemented.