src/main/java/com/safestream/sdk/api/video/VideoAPI.java
/**
     * Gets an existing video by it's key.
     * @param key If no key was passed in when creating the video then the key will be the source URL of the video
     * @return An existing video {@link Video}
     * @throws VideoAPIException
     */
Gets an existing video by it's key.
@param key If no key was passed in when creating the video then the key will be the source URL of the video
@return An existing video  Video
@throws VideoAPIException
Gets an existing video by it ' s key . @param key If no key was passed in when creating the video then the key will be the source URL of the video @return An existing video Video @throws VideoAPIException
public Video find(String key) throws VideoAPIException {
        if(key == null) {
            throw new VideoAPIException("A key is needed to fnd a video");
        }
        try {
            List<Video> videos = safeStreamHttpClient.get(String.format("%s?key=%s", apiResourcePath, key)).getEntity(new TypeToken<List<Video>>(){}.getType());
            return videos.get(0);
        } catch (SafeStreamHttpClientException e) {
            throw new VideoAPIException(e);
        }
    }
public Video find ( String key ) throws VideoAPIException { if ( key == null ) { throw new VideoAPIException ( "A key is needed to fnd a video" ) ; } try { List < Video > videos = safeStreamHttpClient . get ( String . format ( "%s?key=%s" , apiResourcePath , key ) ) . getEntity ( new TypeToken < List < Video > > ( ) { } . getType ( ) ) ; return videos . get ( 0 ) ; } catch ( SafeStreamHttpClientException e ) { throw new VideoAPIException ( e ) ; } }
Gets an existing video by it's key.
Gets an existing video by it ' s key .
// Request the video from the SafeStream REST API