J7mbo / twitter-api-php

The simplest PHP Wrapper for Twitter API v1.1 calls
MIT License
1.82k stars 800 forks source link

Allow object re-use #150

Closed J7mbo closed 8 years ago

J7mbo commented 9 years ago

There needs to be an automatic way of resetting the fields so the object can be re-used. A reset() method shouldn't have to be called by the end-user.

tostercx commented 9 years ago

We could reset get when setting post and vice-versa. That way the last one set will be the one that's sent. https://github.com/tostercx/twitter-api-php/commit/fcb52410fe6301d50c5f337c9dc259c0df991ae8

Seems to be working.

BugHunter2k commented 9 years ago

IMHO Better: reset the fields directly after sending request https://github.com/BugHunter2k/twitter-api-php/commit/9dda72e374fc3c93de363858f26b80e477d0f812

And we still get errors if trying to use both methods for one request

J7mbo commented 8 years ago

169 was the new one. PRS do need to go onto develop, with their own tests, but once it does perhaps we can get something working for this. Closing for now as it's really old but please feel free to submit a new issue / PR if you like.