com.simpleyql
Class ApiFactory

java.lang.Object
  extended by com.simpleyql.ApiFactory

public class ApiFactory
extends java.lang.Object

Builds the objects used to authorize users and call the Yahoo! API

Author:
chester

Constructor Summary
ApiFactory()
           
 
Method Summary
static Api getApiInstance(java.lang.String consumerKey, java.lang.String consumerSecret, java.lang.String servleturl, boolean resultsAsJson, HttpClient httpclient)
          Retrieves an object that can be used to call the API.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApiFactory

public ApiFactory()
Method Detail

getApiInstance

public static Api getApiInstance(java.lang.String consumerKey,
                                 java.lang.String consumerSecret,
                                 java.lang.String servleturl,
                                 boolean resultsAsJson,
                                 HttpClient httpclient)
Retrieves an object that can be used to call the API.

Parameters:
consumerKey - Information obtained when you register your application on Yahoo
consumerSecret - Information obtained when you register your application on Yahoo
servleturl - URL that the CallBackServlet is mapped to.
resultsAsJson - If true, API calls will return their results as JSON, otherwise they will return XML.
httpclient - Object that will do the back-end communcations with Yahoo. If null, will auto-create a URLConnectionClient, which is fine for most people.
Returns:
object that should be stored by the application and used for the real API work.


Copyright © 2009. All Rights Reserved.