Replies: 6 comments 17 replies
-
Wow, amazing research and insights into the forks. I think there is definitely some things we can pull back into this package. I definitely want to restructure the project, use ES6 classes, break things out into their own modules for testability and maintainability, etc., and adopt things like TypeScript. One mistake I made in the past was trying to make too many, big breaking changes at once and not planning to release it until it was done™. I think that contributed to losing steam/motivation. I'd like to take a more iterative approach, i.e. starting a It'd be great to spell out the ideas in a dedicated place (maybe this is it), and once in agreement, we can make a project/issues list and start picking them off. TL;DR --
Made possible with https://docs.npmjs.com/cli/v7/commands/npm-dist-tag e.g., |
Beta Was this translation helpful? Give feedback.
-
@kaimallea I do think that this is the place to spell out the ideas and come to an agreement. From here we can create issues and assign them to whichever project. I like the idea of maintaining two CD versions with I would like to see organization and code coverage + supporting all Imgur endpoints prioritized over larger projects like moving to TypeScript, but that's just a preference. I'm happy to be involved and hope to see this package help more people as time goes on. |
Beta Was this translation helpful? Give feedback.
-
Also worth pointing out that the Might just require some dusting and tweaking (i.e., updating dependencies, tests). Imgur API hasn't really changed in years. |
Beta Was this translation helpful? Give feedback.
-
Alrighty, I tried to write out the goals, problems and proposals, just for future reference and transparency for potential contributors: Goals
Blockers/Hurdles in the Way of Goals:
The lack of modularity has made the development experience cumbersome. Difficult to maintain, extend, and write tests for. Proposals:To achieve the aforementioned goals, the following is proposed, not in any particular order: Modularize
Breaking Refactor
Build/Dev Infra
Stretch
|
Beta Was this translation helpful? Give feedback.
-
@KenEucker Sorry for being MIA. Lots of personal/family stuff has gotten in the way of being active here. Would you be interested in transfer of ownership of this project? You have been the most active contributor and have more time and care than I do these days. LMK |
Beta Was this translation helpful? Give feedback.
-
@cacheflow, see the thread above? I am ready to publish v2.0.0, the new (unofficial) imgur API, by the end of 2021. Wanna come help me out on that project? Before I launch I would like to be able to write the CLI project so that users have a migration path to v2 that doesn't force them to write After 2.0.0, I would like to target a 2.1.0 release that covers all of the API endpoints as we previously discussed and I think that's a pretty achievable goal for end of 2022. |
Beta Was this translation helpful? Give feedback.
-
@kaimallea,
Last night I went through and looked at all 44 forks of the repository to see what people had been doing with their versions of the repo over the last 10 years or so. I've compiled a small list of notable changes that were found in other versions of this imgur code that we might consider implementing as well.
This user added a method for the
/account/me/albums
endpoint, and named itgetAlbums
:This user added a method for the
/gallery/r
endpoint, and named itsearchReddit
:This user included a fix that we may not have addressed before. I did see an issue covering this but it was from many years back:
This user added the
setAccessToken
method that I added recently. They also include agetAccessToken
method which we might consider adding as well.@cacheflow was helping you with the TS rewrite, from what I understand. They've got the most work going on in their fork but this was something I felt was worth including here. This code implements an LRU cache, which I might personally disable as I handle my own caching (and I want my requests to Imgur to always be fresh), but I could see this being a useful feature:
https://www.npmjs.com/package/imgur-v2
This is a fork of the repo, created by user @Crecket, that had made its way to npm. I've considered reaching out to them and encouraging their return to origin now that the package is up to date and supports what they need.
Anywho, I just wanted to put this information out there and see if we might include some of this in a sort of roadmap. One thing that has been on my mind, given the new testing abstraction of creating individual handler files for each function of the API. I feel that it would be good to break down the lib into each of the Imgur-specific endpoint bases. This would turn
lib/imgur.js
from being one large file into a file that includes the functionality from other files and wraps it all into a single API. We would then end up with:Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions