Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/creativelittledots/wp-api-brightcove/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A Wordpress Plugin that integrates with WP Rest API 'Create Post' endpoint to push in video file uploads into Brightcove Dynamic Ingest API Currently working on plugin page to manage variables within the Plugin.
How to Use
Simply enter your credentials in the settings page found at /wp-admin/options-general.php?page=brightcove-api
Then make a request to your api:
var form = new FormData();
form.append("content", "Lorem Ipsum");
form.append("title", "Some Title");
form.append("status", "publish");
form.append("brightcove_video_upload", "blank.m4v"); // path to file on device
// 'brightcove_video_upload' is our uplod key as per settings
var key = 'some-api-token-key-if-you-are-using-auth';
var settings = {
"async": true,
"crossDomain": true,
"url": "http://domain.com/api/wp-json/wp/v2/posts",
"method": "POST",
"headers": {
"authorization": "Bearer " + key
},
"processData": false,
"contentType": false,
"mimeType": "multipart/form-data",
"data": form
};
$.ajax(settings).done(function (response) {
console.log(response);
});