Use Pinterest API to upload video - java

Can we use Pinterest API to upload Video ? , because the official documentation show only Post media of type Image .
Thanks .

You can't. But there is a workaround:
First, upload the video to youtube. Copy the thumbnail URL of this newly uploaded youtube video and pin it to Pinterest using the Pinterest API.
For example, if the youtube URL is:
https://www.youtube.com/watch?v=1sqXRQhtqI8
then you can access the thumbnail by the following URL:
http://img.youtube.com/vi/1sqXRQhtqI8/0.jpg
To pin your video on Pinterest, pin the above URL with the Pinterest API.
Following pin is the result of pinning above video.
https://www.pinterest.com/pin/369084131956139919/

There is also a workaround to use animated Gifs - those are supported by using straight image_url parameter :) You can simply convert your video to a gif and post it.

Pinterest has now added support for uploading videos through their api.
Noteworthy is that only business accounts can use this feature.
https://developers.pinterest.com/docs/redoc/martech/#tag/Quick-Start:-Publish-Video

Related

How to upload and receive an image to an API in Android Studio

I'm trying to implement an Android app that uploads an image taken by the user to an API which removes the image's background, and sends it back to the Users device.
Here is the API for more info. I'm trying to send a jpeg image and receive the image as a jpeg aswell.
The API docs state that the POST request has to be multipart/form. I don't have any experience on making API calls using Volley and was wondering if any one could help me figure out how to do it. Thanks in advance.

Has somebody tried to programmatically send faxes using Twilio Fax API and Java?

this is my issue; I want to send fax dynamically, the content of the fax is a PDF
In order to make this PDF available for Twilio Fax API I have upload the PDF as an asset to Twilio, but I do not see any way to achieve this, I have programmatically created assets, but there is no way (at least I can not see one) to attach a PDF as the 'content' of the asset, maybe I'm wrong and there is other way to make those PDF's available for Twilio Fax API
Any help is appreciated
Thanks!
Twilio developer evangelist here.
The Twilio Functions and Assets API is not the best avenue for just uploading a static file to be used as media in a fax. It's built for the creation of application bundles, which is why it comes with the concepts of builds and environments. To upload the actual file, you also need to create an Asset Version.
You could use the Assets section of the Twilio console to upload your PDF, then use the URL in the request.
Alternatively, if you want to do it programmatically, I'd recommend uploading your PDF to something like AWS S3, and then using the resulting URL as the mediaUrl for the fax API.
Let me know if that helps at all.

Google Photos API - a permanent url to an uploaded item for static content

I'm trying to refactor a Java application using the Picasa Web Albums API
to using the new Google Photos api.
In Picasa API you had the PhotoEntry object, which represented the uploaded entity
and one could access the URL to the uploaded image as follows:
photoEntry.getMediaThumbnails().get(0).getUrl();
This url could be used in a website as static content.
Currently I'm at a loss how to get a permanent url to an uploaded image
with Google Photos API.
There is the MediaItem object, which represents an uploaded image,
but I can't figure out how to get a permanent url from it.
I find 2 types of url in the MediaItem API:
mediaItem.getBaseUrl()
This url expires after 60 minutes and
mediaItem.getProductUrl()
cannot be used for static content, since it requires to be logged in.
Anybody can tell me what I overlooked ?
Thanks
Regards
The Google Photos Library API is not designed for image hosting. If you'd like to embed images in another site, you may need to look at other hosting solutions, like Google Cloud Storage, Firebase Cloud Storage or similar.
You are correct, base URLs expire after 60 minutes and need to be refreshed. However, if you need a permanent URL to a media item that points to Google Photos, you can create a new album, share it and use the shareableURL that's returned as part of the shareInfo property. This URL is accessible without sign in and opens the shared album in Google Photos. You can find out more in the share media developer guide.

VideoView Uri redirection

I'm displaying video from an IP camera, with videoviews. I have an API wich redirects my HTTP link to a RTSP link. When I was using the RTSP link, no problem, I could display the video.
But now that I tried to use the HTTP link (that works in Chrome or Safari), my application can't display the video. I think it comes from the Uri.parse(url), because I don't parse the URL that comes after my HTTP link.
Do anyone has an idea about that problem?

Google App Engine + AWS S3 file protection!

I have an application running on GAE/J that streams video from AWS S3.
I need a solution for protecting the video from being stolen and I found that pre-signed URLs might be it (??).
How can I create pre-signed URLs from GAE/J or there's a better solution to secure the videos?
thanks
I need a solution for protecting the
video from being stolen and I found
that pre-signed URLs might be it (??).
What you're asking for is impossible. Pre-signed URLs will limit the availability of the file to a certain window of time, after which the link will stop working, but there's no way to allow someone to download something with a video player, but not store it to their computer.
Nick, that is not quite right. You can securely stream video with Amazons protected Flash rtmp video streaming service, using Cloudfront. Nobody will be able to download your files. There are tutorials about how to do it on the net. For instance here. You can also go straight to the cloudfront documentation. (Can't post the link here as I'm new to SO and can only post one link).

Categories