Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Yahoo Api Bundle Laravel Package

agupta/yahoo-api-bundle

View on GitHub
Deep Wiki
Context7

A Symfony2 Wrapper for the Yahoo API.

Installation

Add this to your composer.json file:

"require": {
	"agupta/yahoo-api-bundle": "dev-master",
}

or install using composer

composer require agupta/yahoo-api-bundle:dev-master

Register bundle in app/AppKernel.php

$bundles = array(
    // ...
    new Yahoo\ApiBundle\YahooApiBundle(),
);

Configuration

Add this to your config.yml:

imports:
    # ...
    - { resource: "@YahooApiBundle/Resources/config/services.yml" }
yahoo_api:
    application_id: 'app-id'
    consumer_key: 'consumer-key'
    consumer_secret: 'consumer-secret'
    callback_url: 'callback-url'

Add this to your routing.yml:

yahoo_api:
    resource: "@YahooApiBundle/Resources/config/routing.yml"
    prefix:   /

Usage

STEP1:

Call this url for authorization and getting code from the Yahoo api:

http://YOUR_DOMAIN/yahoo_authorization

Above url will auto redirect to your callback_url with additional parameter 'code'

http://CALLBACK_URL?code=[CODE]

STEP2:

Add following code in your callback_url action to get yahoo contacts:

public function CallbackUrlAction(Request $request)
{
    // ...
    $code = $request->get('code',null);	
    if($code) {
        $yahooService = $this->get('AG.Yahoo.OAuth2.Service');	
        $contacts = $yahooService->getContacts($code);
        var_dump($contacts);
    }
    // ...
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
amashukov/lnd-client-php
althinect/enum-permission
andydefer/laravel-actions
aimeos/prisma
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky