Comments (2)
The way of sending media[video][details][location]
using Content-Type": "application/x-www-form-urlencoded
actually works. My bad that I said it doesn't . I have tested it with an old video(ie whose id
I already knew from the web version), it works.
But for new videos there is still some work to be done. It doesn't work if the video is not in their s3 bucket. So I have to figure out how to make a request to first put the video in their s3 bucket(rather than mine) and then get the generated video id
just like how they do via web. I will keep posting my findings. Views welcome
from buffpy.
It's actually 3 step process:
- GET on
https://publish.buffer.com/rpc
to getetag
- POST on
https://buffer-media-uploads.s3.amazonaws.com
to upload the video to s3{s3_bucket_id}/{etag}
with
key: {s3_bucket_id}/uploads/{1567502606048}-my-original-finename.mp4
Content-Type: video/mp4
- POST on
/1/updates/{post_id}/update.json
(here we use the etag asid
and also constructvideo[detail][location]
with it)
with media json like this:
{
"progress":100,
"uploaded":True,
"uploading_type":"video",
"video":{
"title": "some titile",
"id": etag,
"details":{
"location": "https://buffer-media-uploads.s3.amazonaws.com/{s3_bucket_id}/{etag}/doesntmatter.mp4",
"transcoded_location": "https://buffer-media-uploads.s3.amazonaws.com/{s3_bucket_id}/{etag}/doesntmatter.mp4",
"file_size":6767009,
"duration":27,
"duration_millis":26611,
"width":480,
"height":270
},
"thumbnails":[
photo_link,
photo_link2
]
}
}
from buffpy.
Related Issues (14)
- ASCII Problem HOT 2
- How to use BuffPy with token generated by https://bufferapp.com/oauth2/authorize?client_id=XXXXX HOT 6
- Error handling system
- Full unicode support
- managers, models, tests subdirectories seem to be missing from package
- Handle errors
- Problems with some unicode characters? HOT 2
- Publish latest to pypi HOT 2
- Migrate to pytest
- Configure flake8
- ModuleNotFoundError: No module named 'buffpy.models' HOT 1
- AttributeError: 'Profile' object has no attribute 'id' HOT 16
- GeoLocation not supported via API HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buffpy.