liveservices / LiveSDK-for-iOS

LiveSDK library for integrating with Live Connect
MIT License
138 stars 84 forks source link

List Files API #33

Closed iPermanent closed 10 years ago

iPermanent commented 10 years ago

Thanks for the sdk but I did not found the api of list the files at one path, i need to get the file list show, can you please tell me how to do it? Thanks

iPermanent commented 10 years ago

I had found the request url and solve it, however I didn't find the way to get accessToken by the refreshToken, anyone can do something help? The microsoft is really lazy for the developers, just on the contract of apple, even not answer the questions of the developers at a long time ago.

aclev commented 10 years ago

Hey iPermanent,

We love using StackOverflow to offer support to our customers, http://stackoverflow.com/questions/tagged/onedrive .

If you are using LiveConnectClient the refreshing of the access token is handled internally (as long as you provided wl.offline_access scope). See LiveAuthRefreshRequest and LiveConnectClientCore (see line 136 in LiveConnectClientCore.m ). However I'm having a hard time understanding the problem you are experiencing, if this is not the solution could you provide me some additional details about what you are trying to do and what isn't working?

Thanks, Ace

iPermanent commented 10 years ago

Hi Ace,

Thanks for your reply, I just see the documents here:http://msdn.microsoft.com/en-us/library/ff752395.aspx and I tried to use the same way but the url that code request seems not work, I used the wl.offline_access and had the refreshToken, my problem is how can I get the new accessToken when it's expired. It seems the LiveAuthRefreshRequest not work, I had saw it yesterday.

Thanks, Henry

iPermanent commented 10 years ago

Hi Ace,

Thanks for your reply and I solved that problem but now had a new question, I found that the official app of onedrive cannot search file by file name, so does it means that there's no api to get the list by file name? I found dropbox, google drive and box, they all had the function of do search, I just want to confirm about it.

Thanks, Henry

rgregg commented 10 years ago

There is a search query parameter you can use on your Live Connect API call to search for items that have a particular filename. There's more information here: http://msdn.microsoft.com/en-us/library/dn631847.aspx

iPermanent commented 10 years ago

Sorry to disturb you again, but when I use the get request by this url :https://apis.live.net/v5.0/me/skydrive/search?q=expenses&accessToken=mytoken, it still shows me the result with json format :{ "error": { "code": "request_token_missing", "message": "The request doesn't include an access token. Performing this action requires a valid access token." } } I doubt where I do wrong, and if I use post request, it shows me that this host cannot support post. Thanks very much for your patients.

iPermanent commented 10 years ago

Oh sorry, I found that problem, i should change the accessToken to access_token, I got it, Best wishes, and thanks very much for your work and reply.