Creates a facade through which all Brightcove Media APIs may be invoked. More...
#import <BCMediaAPI.h>
Public Member Functions | |
(id) | - initWithReadToken: |
Convenience initialization method. | |
(NSString *) | - getErrorsAsString: |
Convenience error logging method. | |
(BCItemCollection *) | - findAllVideos: |
A convenience method which invokes findAllVideos using default arguments for all parameters. | |
(BCItemCollection *) | - findAllVideos:pageNumber:sortBy:sortOrder:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_all_videos API request and returns a BCItemCollection containing the results. | |
(BCVideo *) | - findVideoById:error: |
A convenience method which invokes findVideoById using the specified id and default arguments for optional parameters. | |
(BCVideo *) | - findVideoById:videoFields:customFields:error: |
This method wraps the remote find_video_by_id API request and returns a BCVideo instance containing the results. | |
(BCItemCollection *) | - findRelatedVideos:error: |
A convenience method which invokes findRelatedVideos using the specified id and default arguments for optional parameters. | |
(BCItemCollection *) | - findRelatedVideos:referenceId:pageSize:pageNumber:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_related_videos API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findVideosByIds:error: |
A convenience method which invokes findVideosByIds using the specified NSArray of ids and default arguments for optional parameters. | |
(BCItemCollection *) | - findVideosByIds:videoFields:customFields:error: |
This method wraps the remote find_videos_by_ids API request and returns a BCItemCollection containing the results. | |
(BCVideo *) | - findVideoByReferenceId:error: |
A convenience method which invokes findVideoByReferenceId using the specified reference id and default arguments for optional parameters. | |
(BCVideo *) | - findVideoByReferenceId:videoFields:customFields:error: |
This method wraps the remote find_video_by_reference_id API request and returns a BCVideo instance containing the results. | |
(BCItemCollection *) | - findVideosByReferenceIds:error: |
A convenience method which invokes findVideosByReferenceIds using the specified reference id and default arguments for optional parameters. | |
(BCItemCollection *) | - findVideosByReferenceIds:videoFields:customFields:error: |
This method wraps the remote find_videos_by_reference_ids API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findVideosByUserId:error: |
A convenience method which invokes findVideoByUserId using the specified user id and default arguments for optional parameters. | |
(BCItemCollection *) | - findVideosByUserId:pageSize:pageNumber:sortBy:sortOrder:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_videos_by_user_id API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findModifiedVideos:error: |
A convenience method which invokes findModifiedVideos using the specified NSDate as a start date and default arguments for optional parameters. | |
(BCItemCollection *) | - findModifiedVideos:filters:pageSize:pageNumber:sortBy:sortOrder:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_modified_videos API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findVideosByText:error: |
A convenience method which invokes findVideosByText using the specified text and default arguments for optional parameters. | |
(BCItemCollection *) | - findVideosByText:pageSize:pageNumber:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_videos_by_text API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findVideosByTags:orTags:error: |
A convenience method which invokes findVideosByTags using the specified NSArray of andTag and orTags and default arguments for optional parameters. | |
(BCItemCollection *) | - findVideosByTags:orTags:pageSize:pageNumber:sortBy:sortOrder:getItemCount:videoFields:customFields:error: |
This method wraps the remote find_videos_by_tags API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findAllPlaylists: |
Playlist Read APIs. | |
(BCItemCollection *) | - findAllPlaylists:pageNumber:sortBy:sortOrder:getItemCount:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_all_playlists API request and returns a BCItemCollection containing the results. | |
(BCPlaylist *) | - findPlaylistById:error: |
A convenience method which invokes findPlaylistById using the specified playlist id and default arguments for optional parameters. | |
(BCPlaylist *) | - findPlaylistById:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_playlist_by_id API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findPlaylistsByIds:error: |
A convenience method which invokes findAllPlaylistsByIds using the specified NSArray of playlist ids and default arguments for optional parameters. | |
(BCItemCollection *) | - findPlaylistsByIds:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_playlists_by_ids API request and returns a BCItemCollection containing the results. | |
(BCPlaylist *) | - findPlaylistByReferenceId:error: |
A convenience method which invokes findPlaylistByReferenceId using the specified reference id and default arguments for optional parameters. | |
(BCPlaylist *) | - findPlaylistByReferenceId:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_playlist_by_reference_id API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findPlaylistsByReferenceIds:error: |
A convenience method which invokes findAllPlaylistsByReferenceIds using the specified NSArray of reference ids and default arguments for optional parameters. | |
(BCItemCollection *) | - findPlaylistsByReferenceIds:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_playlists_by_ids API request and returns a BCItemCollection containing the results. | |
(BCItemCollection *) | - findPlaylistsForPlayerId:error: |
A convenience method which invokes findPlaylistsForPlayerId using the specified player id and default arguments for optional parameters. | |
(BCItemCollection *) | - findPlaylistsForPlayerId:pageSize:pageNumber:getItemCount:videoFields:playlistFields:customFields:error: |
This method wraps the remote find_playlist_for_player_id API request and returns a BCItemCollection containing the results. | |
(NSString *) | - getStringForSortOrderType: |
(NSString *) | - getStringForSortByType: |
Properties | |
NSString * | readToken |
Your Developer Read Token. | |
BCMediaDeliveryType | mediaDeliveryType |
Used to set the media delivery type for your API calls. |
Creates a facade through which all Brightcove Media APIs may be invoked.
Instantiate this class once and subsequently invoke its methods to interact with the remote Brightcove servers:
BCMediaAPI *bc = [[BCMediaAPI alloc] initWithReadToken:@"MyApiKey"];
Remember to release it when no longer needed.
- (BCItemCollection *) findAllPlaylists: | (NSError **) | error |
Playlist Read APIs.
A convenience method which invokes findAllPlaylists using default arguments for all parameters
- (BCItemCollection *) findAllPlaylists: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
sortBy: | (BCSortByType) | sortByType | ||
sortOrder: | (BCSortOrderType) | sortOrderType | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_all_playlists API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findAllVideos: | (NSError **) | error |
A convenience method which invokes findAllVideos using default arguments for all parameters.
- (BCItemCollection *) findAllVideos: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
sortBy: | (BCSortByType) | sortByType | ||
sortOrder: | (BCSortOrderType) | sortOrderType | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_all_videos API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findModifiedVideos: | (NSDate *) | fromDate | ||
error: | (NSError **) | error | ||
A convenience method which invokes findModifiedVideos using the specified NSDate as a start date and default arguments for optional parameters.
- (BCItemCollection *) findModifiedVideos: | (NSDate *) | fromDate | ||
filters: | (NSArray *) | filters | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
sortBy: | (BCSortByType) | sortByType | ||
sortOrder: | (BCSortOrderType) | sortOrderType | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_modified_videos API request and returns a BCItemCollection containing the results.
- (BCPlaylist *) findPlaylistById: | (long long) | playlistId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findPlaylistById using the specified playlist id and default arguments for optional parameters.
- (BCPlaylist *) findPlaylistById: | (long long) | playlistId | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_playlist_by_id API request and returns a BCItemCollection containing the results.
- (BCPlaylist *) findPlaylistByReferenceId: | (NSString *) | referenceId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findPlaylistByReferenceId using the specified reference id and default arguments for optional parameters.
- (BCPlaylist *) findPlaylistByReferenceId: | (NSString *) | referenceId | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_playlist_by_reference_id API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findPlaylistsByIds: | (NSArray *) | playlistIds | ||
error: | (NSError **) | error | ||
A convenience method which invokes findAllPlaylistsByIds using the specified NSArray of playlist ids and default arguments for optional parameters.
- (BCItemCollection *) findPlaylistsByIds: | (NSArray *) | playlistIds | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_playlists_by_ids API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findPlaylistsByReferenceIds: | (NSArray *) | referenceIds | ||
error: | (NSError **) | error | ||
A convenience method which invokes findAllPlaylistsByReferenceIds using the specified NSArray of reference ids and default arguments for optional parameters.
- (BCItemCollection *) findPlaylistsByReferenceIds: | (NSArray *) | referenceIds | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_playlists_by_ids API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findPlaylistsForPlayerId: | (long long) | playerId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findPlaylistsForPlayerId using the specified player id and default arguments for optional parameters.
- (BCItemCollection *) findPlaylistsForPlayerId: | (long long) | playerId | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
playlistFields: | (NSArray *) | playlistFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_playlist_for_player_id API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findRelatedVideos: | (long long) | videoId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findRelatedVideos using the specified id and default arguments for optional parameters.
- (BCItemCollection *) findRelatedVideos: | (long long) | videoId | ||
referenceId: | (NSString *) | referenceId | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_related_videos API request and returns a BCItemCollection containing the results.
- (BCVideo *) findVideoById: | (long long) | videoId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideoById using the specified id and default arguments for optional parameters.
- (BCVideo *) findVideoById: | (long long) | videoId | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_video_by_id API request and returns a BCVideo instance containing the results.
- (BCVideo *) findVideoByReferenceId: | (NSString *) | referenceId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideoByReferenceId using the specified reference id and default arguments for optional parameters.
- (BCVideo *) findVideoByReferenceId: | (NSString *) | referenceId | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_video_by_reference_id API request and returns a BCVideo instance containing the results.
- (BCItemCollection *) findVideosByIds: | (NSArray *) | videoIds | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideosByIds using the specified NSArray of ids and default arguments for optional parameters.
- (BCItemCollection *) findVideosByIds: | (NSArray *) | videoIds | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_videos_by_ids API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findVideosByReferenceIds: | (NSArray *) | referenceIds | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideosByReferenceIds using the specified reference id and default arguments for optional parameters.
- (BCItemCollection *) findVideosByReferenceIds: | (NSArray *) | referenceIds | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_videos_by_reference_ids API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findVideosByTags: | (NSArray *) | andTags | ||
orTags: | (NSArray *) | orTags | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideosByTags using the specified NSArray of andTag and orTags and default arguments for optional parameters.
- (BCItemCollection *) findVideosByTags: | (NSArray *) | andTags | ||
orTags: | (NSArray *) | orTags | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
sortBy: | (BCSortByType) | sortByType | ||
sortOrder: | (BCSortOrderType) | sortOrderType | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_videos_by_tags API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findVideosByText: | (NSString *) | text | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideosByText using the specified text and default arguments for optional parameters.
- (BCItemCollection *) findVideosByText: | (NSString *) | text | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_videos_by_text API request and returns a BCItemCollection containing the results.
- (BCItemCollection *) findVideosByUserId: | (NSString *) | userId | ||
error: | (NSError **) | error | ||
A convenience method which invokes findVideoByUserId using the specified user id and default arguments for optional parameters.
- (BCItemCollection *) findVideosByUserId: | (NSString *) | userId | ||
pageSize: | (int) | pageSize | ||
pageNumber: | (int) | pageNumber | ||
sortBy: | (BCSortByType) | sortByType | ||
sortOrder: | (BCSortOrderType) | sortOrderType | ||
getItemCount: | (BOOL) | getItemCount | ||
videoFields: | (NSArray *) | videoFields | ||
customFields: | (NSArray *) | customFields | ||
error: | (NSError **) | error | ||
This method wraps the remote find_videos_by_user_id API request and returns a BCItemCollection containing the results.
- (NSString *) getErrorsAsString: | (NSError *) | error |
Convenience error logging method.
Errors logged by the remote Brightcove servers are stored in a standard NSError object, and underlying nested errors are passed in the NSError userInfo property. This method merely flattens that object's information into a single NSString for logging or other pruposes.
- (id) initWithReadToken: | (NSString *) | rt |
Convenience initialization method.
Use this method to instantiate a BCMediaAPI object that will subsequently employ the parameterized read token for all interactions with the remote Brightcove servers.
- (BCMediaDeliveryType) mediaDeliveryType [read, write, assign] |
Used to set the media delivery type for your API calls.
If your Account supports UDS you can turn this on to force http urls returned for your media urls. Playback on all iOS devices requires http access. The default value is BCMediaDeliveryTypeDefault.
- (NSString *) readToken [read, write, retain] |
Your Developer Read Token.
You must supply a valid Brightove developer read token either through this property or by using the initWithReadToken: convenience method.