jdolitsky / AppDotNetPHP

PHP library for the App.net Stream API
34 stars 19 forks source link

Lib changes #28

Closed ghost closed 11 years ago

ghost commented 11 years ago

Hi,

I am right now going to learn how to properly do a pull request so I can do this properly but in case I fail..

I've been trying to get back in line with AppDotNetPHP proper before the Streaming stuff but I've made a couple of small changes since last syncing up.

Mostly I added two functions:

getId, which is an API supported way to get an ID (user object) when you only know the username.

getTokenStream, this is a way to pass in a token other than the authed users to get a different stream.

This was in order to make @teawithcarls "View Accounts" work with Appeio. In order to get this to work I also had to changed httpReq slightly. I realize this is a bit specific but not too bad..

I think that's the only diffs.

Trying out SmartGit and some other softwares.

ghost commented 11 years ago

OK, I think I've figured out what I need to know about Git, yea for new skills. Anyway I guess I don't have the rights to push into the repo (read only). Can I get access to submit potential updates?

Anyway Here is the lastest AppDotNet.php file with my changes incorporated.

CHANGES:

End of File: 2 new functions getId and getTokenStream

At Line 276

FROM:

    if ($this->_accessToken) {
        $headers[] = 'Authorization: Bearer '.$this->_accessToken;
    }

TO:

    if ($params[access_token] && $act != 'post' && $act != 'delete') {
        $headers[] = 'Authorization: Bearer '.$params[access_token];
    }
    else if ($this->_accessToken) {
        $headers[] = 'Authorization: Bearer '.$this->_accessToken;
    }

FILE:

<?php /**

}

class AppDotNetException extends Exception {}

neuroscr commented 11 years ago

You just need to create your own fork. Then you can commit changes to your own repo and send pull requests to jdolitsky.