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

[TASK] Integrate X API for content upload #782

Closed
9 tasks
Mario-SO opened this issue Jul 22, 2024 · 0 comments · Fixed by #823
Closed
9 tasks

[TASK] Integrate X API for content upload #782

Mario-SO opened this issue Jul 22, 2024 · 0 comments · Fixed by #823
Assignees
Labels
task Tasks related to User Stories

Comments

@Mario-SO
Copy link
Member

Description

Integrate X (Twitter) API to enable automatic uploading of video content from our platform to users' X accounts.

Related User Story

#703

Objectives

  • Research X API documentation for content upload
  • Implement API calls for video upload
  • Handle API responses and error cases
  • Implement retry mechanism for failed uploads
  • Ensure the /publish endpoint triggers the refresh token mechanism for X

Acceptance Criteria

  • Videos can be successfully uploaded to X using the API
  • API responses are properly handled and logged
  • Failed uploads are retried automatically
  • The /publish endpoint correctly triggers the refresh token mechanism

Additional Information

Refer to X's API documentation for specific endpoints and requirements for video uploads.

@Mario-SO Mario-SO added the task Tasks related to User Stories label Jul 22, 2024
@Mario-SO Mario-SO changed the title [TASK] - Integrate X API for content upload [TASK] Integrate X API for content upload Jul 22, 2024
@Mario-SO Mario-SO moved this to Backlog in 🚀 Sprint plan Jul 22, 2024
@Mario-SO Mario-SO moved this from Backlog to Ready in 🚀 Sprint plan Jul 22, 2024
@pblvrt pblvrt moved this to In Progress in 🚀 Sprint planning [OLD] Jul 23, 2024
@Mario-SO Mario-SO removed the status in 🚀 Sprint plan Jul 23, 2024
@Mario-SO Mario-SO moved this to 🔖 Ready in 🚀 Sprint plan Jul 23, 2024
@Mario-SO Mario-SO moved this from 🔖 To-Do to 🏗️ In progress in 🚀 Sprint plan Jul 24, 2024
@pblvrt pblvrt moved this from 🏗️ In progress to 👀 In review in 🚀 Sprint plan Aug 1, 2024
@Mario-SO Mario-SO linked a pull request Aug 1, 2024 that will close this issue
10 tasks
@Mario-SO Mario-SO moved this from 👀 In review to 🗂 Backlog in 🚀 Sprint plan Aug 5, 2024
@Mario-SO Mario-SO moved this from 🗂 Backlog to 👀 In review in 🚀 Sprint plan Aug 5, 2024
@Mario-SO Mario-SO moved this from 👀 In review to 🗂 Backlog in 🚀 Sprint plan Aug 5, 2024
greatsamist added a commit that referenced this issue Aug 6, 2024
# Pull Request Info

## Description
This pull request integrates the Twitter Media Upload API and Tweet API,
enabling users to publish videos from the studio page to Twitter. The
media upload process is divided into three phases:

- Initialize: Send media type, command, and byte size to receive a
media_id.
- Append Phase: Split the video file into base64 chunks (≤ 5MB each) and
send them to Twitter.
- Finalize: Complete the media upload and process the video.

Closes (#782 )

## Type of change
- [x] New feature (non-breaking change which adds functionality)
- [x] This change requires a documentation update

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Screenshots (if appropriate):

## Additional context:
Twitter's media upload limits apply:

- Video duration: 0.5 seconds to 140 seconds
(https://developer.x.com/en/docs/twitter-api/v1/media/upload-media/uploading-media/media-best-practices)
- Refer to [Twitter Media Upload API
documentation](https://developer.x.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload-init)
for more details.

---------

Co-authored-by: greatsamist <[email protected]>
@github-project-automation github-project-automation bot moved this from 🗂 Backlog to ✅ Done in 🚀 Sprint plan Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Tasks related to User Stories
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants