Hey thanks man ! but right now I am getting the status "processing"
in
- (void)uploadTicket:(GDataServiceTicket *)ticket
finishedWithEntry:(GDataEntryYouTubeVideo *)videoEntry
error:(NSError *)error
I have some task which should begin only after the video get
published , so I need to keep the track of when does this uploaded
video get published or rejected ?
right now I am sending the following request
-(void) getVideoStatus
{
// NSString *devKey = @"My dev key";
GDataServiceGoogleYouTube *service = [self youTubeService];
[service setUserCredentialsWithUsername:@"
XXXX...@gmail.com"
password:@"XXXX"];
//[service setYouTubeDeveloperKey:devKey];
NSURL *url = [GDataServiceGoogleYouTube
youTubeGetVideoStatus:@"0hlGP_olENM"]; //[[NSUserDefaults
standardUserDefaults] objectForKey:@"Video"]];
[service fetchPublicEntryWithURL:url entryClass:
[GDataYouTubePublicationState class] delegate:self
didFinishSelector:@selector(serviceTicket:finishedWithObject:error:)];
}
- (void)serviceTicket:(GDataServiceTicketBase *)ticket
finishedWithObject:(GDataYouTubePublicationState *)object error:
(NSError *)error
{
NSLog(@"rsponse %@",[object description]);
}
in call back function when I print the description , it prints :
log : {content:
unparsed:<app:control>,<author>,<category>,<gd:comments>,<id>,<link>,<media:group>,<published>,<title>,<updated>,<yt:accessControl>
unparsedAttr:gd:etag}
And as per as google's documents
<entry gd:etag='W/"Ak4ER347eCp7ImA9WxRRF0k."'>
<id>tag:youtube,2008:video:b5bbb2beb5a7d9ca</id>
<app:control>
<app:draft>yes</app:draft>
<yt:state name='rejected'
reasonCode='tooLong'
helpUrl='
http://www.youtube.com/t/community_guidelines'>
Video is too long.
</yt:state>
</app:control>
<yt:private/>
</entry>
You can check the status of a user's unpublished videos by retrieving
the user's uploaded videos feed. Entries in that feed that have not
been published will contain the <app:control> tag. Please note that
unpublished videos include videos that are still being processed, that
failed to upload or that were rejected after being uploaded.
so getting "<app:control>" in the response means video is in still in
processing or rejected
Here My concern is "HOW DO I PARSE THE RESPONSE COMING IN
serviceTicket:finishedWithObject:error TO GET THE VIDEO'S UPLOAD
STATUS "
please help