library yahoo-messenger-api
A PHP client for Yahoo! Messenger API
bogcon/yahoo-messenger-api
A PHP client for Yahoo! Messenger API
- Sunday, January 18, 2015
- by bogcon
- Repository
- 3 Watchers
- 2 Stars
- 65 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 4 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
yahoo-messenger-api v1.0.0
A PHP client for Yahoo! Messenger API
, (*1)
Features
- login
- logout
- avatar retrieval
- groups with contacts list retrieval
- notifications retrieval (messages, buddy requests...)
- messages sending
- authorizing buddies
- checking yahoo session & keeping it alive
Installation
-
Using Composer, (*2)
Add the following to your composer.json
file located in the root directory of your project., (*3)
{
"require": {
"bogcon/yahoo-messenger-api": "dev-master"
}
}
Then you can run the Composer install/update command from the directory containing the composer.json
file, (*4)
# download composer (skip the next command if you already have composer)
$ curl -sS https://getcomposer.org/installer | php
# install dependencies
$ php composer.phar install
$ php composer.phar update
-
Using GIT, (*5)
git clone https://github.com/bogcon/yahoo-messenger-api.git
-
Download the ZIP archive from here, (*6)
Usage example
try {
// initialize client
$objYmClient = new \BogCon\YahooMessengerApi\Client('myYahooUsername', 'myYahooPass', 'app_key', 'app_secret');
// send a message to a friend
$objYmClient->logIn(\BogCon\YahooMessengerApi\Client::USER_IS_OFFLINE) // login as Invisible
->sendMessage('Hello...Just entered to remind you about our meeting from tomorrow. Bye, see ya.', 'myBuddyId')
->logOut();
echo 'Successfully transmitted message to my friend.';
} catch (\BogCon\YahooMessengerApi\Exception $objEx) {
echo 'Something went bad: ' . $objEx->getMessage();
}
A simplistic browser based Yahoo Messenger chat that uses this library can be found here., (*7)
Yahoo API documentation
http://developer.yahoo.com/messenger/guide/ch02.html, (*8)
License
yahoo-messenger-api
is released under the New BSD License
which is the 3-clause BSD license.
You can find a copy of this license in LICENSE.txt., (*9)