1.0 Proposal - Please read & comment!
See original GitHub issue1.0 Proposal
Twitter Lite is gaining traction and after learning how folks have been using it, here are changes I would make:
Breaking Changes
Turn all request arguments into keyword arguments:
before:
async get (resource, parameters)
async post (resource, body, parameters)
after:
async get({ resource, params })
async post({ resource, body, params })
There won’t be any confusion in argument ordering.
Return results
, response
, error
from requests
Currently we return just the results
but there are rate limiting errors that are 200-level and don’t crash.
New API would look similar to:
return {
results, // tweets, etc.
response, // raw response object. You'd have to do your own `response.json()` here
error // error object (if any)
}
Error handling
Right now twitter-lite forces the consumer to handle errors. We can take care of the errors ourselves. ** Would love to hear what folks think of this one **
Enhancements
Create makeRequest
function that handles all requests under the hood. This will reduce code size.
- create a
makeRequest
function that handles:- get
- post
- stream
This will reduce bundle size and make handling errors / responses easier.
- add
flowtype
support Easier to debug errors
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:24 (15 by maintainers)
Top Results From Across the Web
Employee or Independent Contractor Classification under the ...
The Department believes that this proposal, if finalized, will provide more consistent guidance to employers as they determine whether workers ...
Read more >A Proposal to Fill the Gap Between Regulation and ... - SEC.gov
Running on Empty: A Proposal to Fill the Gap Between Regulation and Decentralization Remarks at Blockress Commissioner Hester M. Peirce ...
Read more >REQUEST FOR PUBLIC COMMENT: NEW CASELOAD ...
NEW CASELOAD STANDARDS & COMPENSATION PROPOSALS ... below do not account for any compensation changes and only refer to the impact the.
Read more >Details re: Our 8/26 Economic Proposal - AFSCME Local 328
Please read our commenting guidelines (linked at the bottom of this post) ... If we settle by 9/5/22: $1,000 for employees at 0.5...
Read more >Verifiable Credentials Data Model v1.1 - W3C
Comments regarding this specification are welcome at any time, ... For details, see the test suite and implementation report.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How do ya’ll feel about making this a server-side only module for the time being? After reading a bunch about this, it seems like its a safer alternative than allowing requests to take place on the client
Although it will create an extra hurdle for contributors, having Typescript and Flow support will greatly increase the attraction from consumers of this library who use those technologies and it will have no negative effect for those who do not.
Since we are developing a library here I think valuing the consumers above the contributors (within reason) is always a smart move.