Skip to content
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

How to create/draft posts from the mega editor? #74

Open
blackjackkent opened this issue Feb 2, 2022 · 4 comments
Open

How to create/draft posts from the mega editor? #74

blackjackkent opened this issue Feb 2, 2022 · 4 comments

Comments

@blackjackkent
Copy link

Hello!

I've been asked to try my hand at cleaning up an old abandoned extension which allowed users to create or draft posts from an interface that extended the mega-editor/mass posts editor. (It stopped working after some of the Tumblr updates that have come down the pike.)

The issue I'm running into is that whatever strategy the original author was using to submit posts is no longer working, but it doesn't appear that the mega editor (yet, at least) supports the tumblr.apiFetch functionality described at https://github.com/tumblr/docs/blob/master/web-platform.md#apifetch.

Is there a recommended solution for extension developers wanting to interact with the API from the mega editor? I would prefer not to throw out the extension's code wholesale and would appreciate any advice! :)

(Happy to provide further info if it would help!)

@nightpool
Copy link

apiFetch is part of the new React codebase, while as I understand it the mega editor is still on the old Backbone codebase, no? so any of the old XKit SVC techniques should still work, but apiFetch won't.

@cyle
Copy link
Member

cyle commented Feb 2, 2022

@nightpool is correct that the web platform docs are referencing pages that are a part of the "new web experience" which is our way of saying that they're powered by React instead of our older web frontend. The Mass Post Editor / mega editor is not powered by React yet, so those helper functions won't work there, and we don't support a public interface in the legacy web frontend.

My suggestion would be to write an extension with its own application credentials that leverages the API directly instead of going "through" apiFetch, if possible.

@AprilSylph
Copy link
Member

@cyle Is there even a way to mass-edit posts via the v2 API? The Mass Post Editor uses its own endpoints which I don't see any equivalent for. Naturally, everything the mega editor does can be achieved per post with individual v2 API calls, but the mega editor can reduce what would be 100 requests down to just 1.

@cyle
Copy link
Member

cyle commented Mar 10, 2022

Is there even a way to mass-edit posts via the v2 API?

There isn't right now, no. We'd have to build out these new API endpoints when we tackle migrating the Mass Post Editor to React. I don't have an ETA for that work, unfortunately.

cyle added a commit that referenced this issue May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants