How to upload video using vimeo SDK com.vimeo.networking:vimeo-networking
?
In the documentation and example project there is no example how to upload video. Also methods VimeoClient.getInstance().putContent
and VimeoClient.getInstance().postContent
are not documented. I've implemented method:
VimeoClient.getInstance().postContent(videoUri, CacheControl.FORCE_CACHE, null, new ModelCallback<Video>(Video.class) {
@Override
public void success(Video video) {
toast("Staff Picks Success! " + video);
}
@Override
public void failure(VimeoError error) {
toast("Staff Picks Failure :( " + error);
}
});
but I'm receiving error when try to upload video. Here is stack trace
W/System.err: java.lang.IllegalArgumentException: url == null W/System.err: at okhttp3.Request$Builder.url(Request.java:121) W/System.err: at retrofit2.RequestBuilder.build(RequestBuilder.java:204) W/System.err: at retrofit2.RequestFactory.create(RequestFactory.java:67) W/System.err: at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:122) W/System.err: at retrofit2.OkHttpCall.enqueue(OkHttpCall.java:58) W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.enqueue(ExecutorCallAdapterFactory.java:57) W/System.err: at com.vimeo.networking.VimeoClient.POST(VimeoClient.java:1167) W/System.err: at com.vimeo.networking.VimeoClient.postContent(VimeoClient.java:1061)