- WIP
vineapi / vineapi Goto Github PK
View Code? Open in Web Editor NEWDocumentation about the private VineAPI
Documentation about the private VineAPI
I am a newbie to iOS programming
I am trying to upload to the API endpoints given here. first i tried to login i am successful in it i logined and got key and userid then i tried to upload thumbnail and video to the endpoints given but it is giving me some weird errors like 503, network connection was lost or response: (null)... if i coment some headers the response changes from server i am using AFNetworking framework
Snipplet of CODE:-
AFHTTPClient *httpClient = [[AFHTTPClient alloc]initWithBaseURL:[NSURL URLWithString:@"https://media.vineapp.com"]];
NSLog(@"%@",@"Uploading data");
// Upload Image
NSMutableURLRequest *request = [
httpClient multipartFormRequestWithMethod:@"PUT" path:@"/upload/thumbs/img.jpg" parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData)
{
[formData appendPartWithFileData:imgData name:@"thumb1" fileName:@"img" mimeType:@"image/jpeg"];
NSLog(@"Uploading");
}
];
//[request setValue:@"media.vineapp.com" forHTTPHeaderField:@"Host"];
[request setValue:@"keep-alive" forHTTPHeaderField:@"Proxy-Connection"];
[request setValue:@"image/jpeg" forHTTPHeaderField:@"Content-Type"];
[request setValue:@"ios/1.4.7" forHTTPHeaderField:@"X-Vine-Client"];
//[request setValue:[NSString stringWithFormat:@"%d",[imgData length]] forHTTPHeaderField:@"Content-Length"];
[request setValue:@"en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5" forHTTPHeaderField:@"Accept-Language"];
//[request setValue:@"*/*" forHTTPHeaderField:@"Accept"];
[request setValue:_key forHTTPHeaderField:@"vine-session-id"];
[request setValue:@"gzip, deflate" forHTTPHeaderField:@"Accept-Encoding"];
[request setValue:@"keep-alive" forHTTPHeaderField:@"Connection"];
[request setValue:@"iphone/1.4.7 (iPhone; iOS 7.0.0; Scale/2.00)" forHTTPHeaderField:@"User-Agent"];
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
NSLog(@"Tst1");
[
operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
NSLog(@"Uploaded:Sent %lld of %lld bytes", totalBytesWritten, totalBytesExpectedToWrite);
NSLog(@"Key is : %@",_key);
}
];
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject)
{
NSLog(@"response: %@",[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil]);
}
failure:^(AFHTTPRequestOperation *operation, NSError *error)
{
NSLog(@"Upload Failed");
NSLog(@"error: %@", [operation error]);
}
];
[httpClient enqueueHTTPRequestOperation:operation];
NSLog(@"Operation start");
in this the response is null if i uncomment the subsequent header then it says network connection was lost.
Kindly help me out tell me does this PUT requests work or not. i am struck thanks in advance
The login endpoint is always returning me 400 BAD REQUEST and it says the username or password is incorrect, what am I doing wrong?
{"code": 101, "data": "", "success": false, "error": "That username or password is incorrect."}
I have uploaded thumbnail and video, got links. now i use "POST" request to create my post. I'm not getting any errors, but post just don't appears. P.S. I use PHP, sending my responses with curl. Json i've got from "Create Post":
{"code": "", "data": {"permalinkUrl": "https://vine.co/v/5KdIMF6am77", "postId": 1370448250993295360, "videoUrl": "https://media.vineapp.com/serve/post/ph264high_5KdIMF6am77.mp4", "created": "2016-07-28T14:02:18.000000"}, "success": true, "error": ""}
All other endpoints I've tried are working fine and I am logged in but when user either of the following:
"get_followers": {
"endpoint": "users/%s/followers",
"request_type": "get",
"url_params": ["user_id"],
"required_params": [],
"optional_params": [],
"model": "UserCollection"
},
"get_following": {
"endpoint": "users/%s/following",
"request_type": "get",
"url_params": ["user_id"],
"required_params": [],
"optional_params": [],
"model": "UserCollection"
},
I get this response:
{
"code": 100,
"data": "",
"success": false,
"error": "You must be logged in to perform this action."
}
'{"code": 900, "data": "", "success": false, "error": "That record does not exist."}'
can someone explain this error while using php curl to post video with customrequest put
Hey there
How is it possible to fetch all the Vines from a certain users timeline?
This:
https://api.vineapp.com/timelines/users/1127944909723439104
for example returns just the latest 10.
You must provide the Content-Length HTTP header.
anyone found solution for thiss error ? in php
Please give me any example or perfect document.
Hello ,
I am trying to create a post by first uploading video than thumbnail .
i get an X-Upload-Key in both upload cases like
"https://vines.s3.amazonaws.com/thumbs_trellis/2014/02/13/13DFAFF84C1045726115081207808_1.3.1.mp4.jpg"and
"https://vines.s3.amazonaws.com/videos_trellis/2014/02/13/EC07354F491045726110006292480_1.3.1.mp4"
also i when i create a post it result me with success =1
and give me post id .. but i am unable to see that on my wall .
eg: postId = 1045726126460764160;
Please help .. Please please .
Thanks in advance ..
Saurabh Goyal
I Created a post refered this
and got response without error. but It is not shown in Vine.
I doubt the parameter named 'entities'. what is this? I think it is kind of JSON object.
Perhaps they updated it? I see inside the vineapp (disecting the apk) its now making the calls inside a secure webview with custom cert management so MITM can't intercept any more.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.