Skip to content

bogcon/yahoo-messenger-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yahoo-messenger-api v1.0.0

###A PHP client for Yahoo! Messenger API
Build Status Coverage Status Latest Stable Version

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

  1. Using Composer

Add the following to your composer.json file located in the root directory of your project.

{
       "require": {
           "bogcon/yahoo-messenger-api": "dev-master"
       }
}

Then you can run the Composer install/update command from the directory containing the composer.json file

# 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
  1. Using GIT
git clone https://github.com/bogcon/yahoo-messenger-api.git
  1. Download the ZIP archive from here

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.

Yahoo API documentation

http://developer.yahoo.com/messenger/guide/ch02.html

License 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.

About

A PHP client for Yahoo! Messenger API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages