Vzaar Class Reference
Class for interacting with the Vzaar API.
More...
#import <Vzaar.h>
List of all members.
Detailed Description
Class for interacting with the Vzaar API.
The Vzaar class provides methods to interact with the Vzaar API, including video upload.
Member Function Documentation
| - (NSDictionary *) accountDetailsForAccountWithId: |
|
(NSUInteger) |
accountId |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Get information about a given account.
- Parameters:
-
| accountId | The account ID you'd like to get information for. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- An NSDictionary containing details of the given account. This method will return an NSDictionary containing the following keys. See VzaarConstants.h for definitions. VZAPIVersionKey, VZVideoCountKey, VZAccountTitleKey, VZAccountBandwidthKey, VZAccountMonthlyCostKey, VZAccountBillingCurrencyKey, VZAccountAllowsBorderlessPlayerKey, VZAccountAllowsSearchEnhancerKey
| - (id< VZVideoUploader >) beginUploadOfVideoWithTitle: |
|
(NSString *) |
title |
| description: |
|
(NSString *) |
videoDescription |
| profile: |
|
(VzaarVideoProfile) |
videoProfile |
| filePath: |
|
(NSString *) |
location |
| replacingVideoWithId: |
|
(NSUInteger) |
existingVideoId |
| delegate: |
|
(id <VZVideoUploadDelegate>) |
delegate | |
|
|
| | |
Start the upload of a video.
- Parameters:
-
| title | The title of the video. |
| videoDescription | The description of the video, if any. |
| videoProfile | The VzaarVideoProfile that Zvaar should encode the video to - see VzaarConstants.h for definitions. |
| location | The path to the file to upload. |
| existingVideoId | If this video is replacing an existing one, pass the old video ID here. Pass kDoNotReplaceId to create a new video. |
| delegate | An object conforming to the VZVideoUploadDelegate protocol to receive progress and success/failure notifications. Can be nil. |
- Returns:
- An object conforming to the VZVideoUploader protocol allowing cancellation of the upload. This method will begin uploading the given video to Vzaar, notifying the given delegate of progress, success and failure.
| - (BOOL) deleteVideoWithId: |
|
(NSUInteger) |
videoId |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Delete a video from your Vzaar account.
- Parameters:
-
| videoId | The ID of the video to delete. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- A BOOL signifying if the call was successful.
| - (NSDictionary *) detailsOfVideoWithId: |
|
(NSUInteger) |
videoId |
| options: |
|
(VzaarVideoDetailOptions) |
options |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Get details for a specific video.
- Parameters:
-
| videoId | The ID of the video to get details for. |
| options | Bit-wise ORed options from VzaarVideoDetailOptions - see VzaarConstants.h for definitions. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- An NSDictionary containing details of the given video. This method will return an NSDictionary object containing the following keys. See VzaarConstants.h for definitions. VZVideoTypeKey, VZVideoEmbedVersionKey, VZVideoTitleKey, VZVideoDescriptionKey, VZUserNameKey, VZUserDashboardURLKey, VZAccountIdKey, VZVideoProviderNameKey, VZVideoProviderURLKey, VZVideoThumbnailURLKey, VZVideoThumbnailWidthKey, VZVideoThumbnailHeightKey, VZVideoFrameGrabURLKey, VZVideoFrameGrabWidthKey, VZVideoFrameGrabHeightKey, VZVideoEmbedCodeKey, VZVideoPlayerWidthKey, VZVideoPlayerHeightKey, VZVideoPlayerIsBorderless, VZVideoDurationKey, VZVideoStatusKey
| + (BOOL) fileIsAccepted: |
|
(NSString *) |
filePath |
|
|
Determine if a file is accepted by the Vzaar API.
- Returns:
- A BOOL value determining if the given file is accepted by the Vzaar API..
| + (BOOL) fileIsTrusted: |
|
(NSString *) |
filePath |
|
|
Determine if a file is trusted by the Vzaar API.
- Returns:
- A BOOL value determining if the given file is trusted by the Vzaar API..
Create a Vzaar API object with the default endpoint URL and no authentication.
- Returns:
- The created Vzaar API object. This method will create a Vzaar API object with the default endpoint URL (the live API endpoint) and no authentication details.
| - (id) initWithoAuthSecret: |
|
(NSString *) |
secret |
| oAuthToken: |
|
(NSString *) |
token | |
|
|
| | |
Create a Vzaar API object authenticated with the given credentials.
- Parameters:
-
| secret | Your Vzaar authentication secret - typically your user name. |
| token | You Vzaar authentication token. |
- Returns:
- The created Vzaar API object. This method will create a Vzaar API object with the default endpoint URL (the live API endpoint) and the given authentication details.
| - (id) initWithURL: |
|
(NSURL *) |
apiEndpoint |
|
|
Create a Vzaar API object with the given endpoint URL and no authentication.
- Parameters:
-
| apiEndpoint | An NSURL pointing to the required endpoint. |
- Returns:
- The created Vzaar API object. This method will create a Vzaar API object with the given endpoint URL and no authentication details.
| - (id) initWithURL: |
|
(NSURL *) |
apiEndpoint |
| oAuthSecret: |
|
(NSString *) |
secret |
| oAuthToken: |
|
(NSString *) |
token | |
|
|
| | |
Create a Vzaar API object with the given endpoint URL authenticated with the given credentials.
- Parameters:
-
| apiEndpoint | An NSURL pointing to the required endpoint. |
| secret | Your Vzaar authentication secret - typically your user name. |
| token | You Vzaar authentication token. |
- Returns:
- The created Vzaar API object. This method will create a Vzaar API object with the given endpoint URL and the given authentication details.
| - (id) initWithURL: |
|
(NSURL *) |
apiEndpoint |
| oAuthSecret: |
|
(NSString *) |
secret |
| oAuthToken: |
|
(NSString *) |
token |
| APIVersion: |
|
(VzaarAPIVersion) |
version | |
|
|
| | |
Create a Vzaar API object with the given endpoint URL authenticated with the given credentials and using the given API version.
- Parameters:
-
| apiEndpoint | An NSURL pointing to the required endpoint. |
| secret | Your Vzaar authentication secret - typically your user name. |
| token | You Vzaar authentication token. |
| version | The API version to use. |
- Returns:
- The created Vzaar API object. This method will create a Vzaar API object with the given endpoint URL and the given authentication details, and will use the given API version. This is the designated initializer for this class.
| - (BOOL) updateVideoWithId: |
|
(NSUInteger) |
videoId |
| withTitle: |
|
(NSString *) |
title |
| description: |
|
(NSString *) |
videoDescription |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Change the title and/or description of a video.
- Parameters:
-
| videoId | The ID of the video to edit. |
| title | The new title - pass nil to leave untouched. |
| videoDescription | The new description - pass nil to leave untouched. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- A BOOL signifying if the call was successful.
| - (NSDictionary *) userDetailsForUsername: |
|
(NSString *) |
username |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Get information about a given user.
- Parameters:
-
| username | The user you'd like to get information for. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- An NSDictionary containing details of the given user. This method will return an NSDictionary containing the following keys. See VzaarConstants.h for definitions. VZAPIVersionKey, VZUserNameKey, VZUserIdKey, VZUserDashboardURLKey, VZAccountIdKey, VZPlayCountKey, VZVideoCountKey, VZDateCreatedKey
| - (NSString *) userName: |
|
(NSError **) |
error |
|
|
Get the current username as returned by the Vzaar API.
- Parameters:
-
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- The username of the user currently authenticated as returned by the Vzaar API. This method is primarily used to test that you're successfully authenticated with the Vzaar API.
| - (NSArray *) videosForUser: |
|
(NSString *) |
userName |
| withTitleFilter: |
|
(NSString *) |
titleFilter |
| page: |
|
(NSUInteger) |
page |
| ofPagesOfLength: |
|
(NSUInteger) |
pageLength |
| reverseSortOrder: |
|
(BOOL) |
reverseSort |
| error: |
|
(NSError **) |
error | |
|
|
| | |
Get a list of videos based on the given criteria.
- Parameters:
-
| userName | The user you'd like to get the video list for. |
| titleFilter | A text filter to apply - only videos containing this string int heir title will be returned. Pass nil for no filter. |
| page | The page number to return. |
| pageLength | The number of videos on each page. |
| reverseSort | If YES, the sort order will be reversed from newest first to oldest first. |
| error | An NSError pointer, which will be filled with an NSError object should an error occur. Can be nil. |
- Returns:
- An NSArray containing a list of videos. Can be nil if no videos were returned. This method will return an NSArray of NSDictionary objects, each containing the following keys. See VzaarConstants.h for definitions. VZAPIVersionKey, VZVideoIdKey, VZVideoTitleKey, VZDateCreatedKey, VZVideoURLKey, VZVideoThumbnailURLKey, VZPlayCountKey, VZVideoDurationKey, VZVideoWidthKey, VZVideoHeightKey, VZUserNameKey, VZUserDashboardURLKey, VZAccountIdKey, VZVideoCountKey
The documentation for this class was generated from the following files:
- Vzaar Framework/src/Vzaar.h
- Vzaar Framework/src/Vzaar.m