BenExile / Dropbox

UNMAINTAINED: PHP 5.3 SDK for the Dropbox REST API
MIT License
521 stars 135 forks source link

You may wish to add support for retrieving long urls in shares(...) because they do not expire like in media(...) and replacing 'www' by 'dl' gives direct access to the file. #64

Closed andremitra closed 11 years ago

andremitra commented 11 years ago
public function shares($path, $short_url = 'true')
{
    $call = 'shares/' . $this->root . '/' .$this->encodePath($path);
    $params = array(
        'short_url' => $short_url
    );
    $response = $this->fetch('POST', self::API_URL, $call, $params);
    return $response;
}
talkingnews commented 11 years ago

Hmmm, this is odd - I did a Github pull request, made this change and pushed it back over 3 months ago. I wonder if it somehow didn't get merged in? Anyway, here's my commit: https://github.com/talkingnews/CodeIgniter-Dropbox-API-Library/commit/c28abe4d7d5f02fbe6d77bffdeac68138a952eb3

BenExile commented 11 years ago

@talkingnews - Not received a pull request for this feature to date. The repository in the commit above is not a fork of this project. Are you sure you sent a pull request to me?

@andremitra - This has been addressed in commit c6aa027a97

talkingnews commented 11 years ago

@BenTheDesigner Ooops! Many apologies - how embarrassing! You're quite right, it was for "the other library". I got confused because I started off with yours as it was more comprehensive, but then had to switch to "the other one" as, at the time, it offered an easier way to store the tokens in a db so users could auth by site login rather than dropbox each time. Going to have another look at your library now though!

BenExile commented 11 years ago

@talkingnews No problem at all. For a while my library only supported session based storage - I guess I was hoping for contributions :D. This didn't happen and so I wrote the PDO handler, and then later a filesystem storage handler was contributed and merged with a few modifications. The library is flexible in that you can write your own custom handlers - I thought this may be required where, for example, there is already an authentication system in place. As long as your handler implements the Dropbox\OAuth\Storage\StorageInterface you're set!

talkingnews commented 11 years ago

Oh, I remember the other reason - I switched to using PyroCMS which was based on Codeigniter, and "the other library" came with a handy Spark. Being a newb back then, I found that easier. Now I know a bit more about CI, I might have another go at yours. I see you've got a Sparks account - could we persuade you to make a Spark of this library? I'd have a go myself, but I'm not up to scratch that much!

BenExile commented 11 years ago

I only got involved with CodeIgniter because a freelance client of mine at the time used it as their chosen framework. I no longer take on private projects and haven't been used CodeIgniter in ~9 months.

What I'd recommend is checking out compatibility between CodeIgniter and Composer and integrating this library that way. At this time I don't think I'll create a spark for it - sorry to disappoint :(