phpDocumentor Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: SwiftGoogleImport

Source Location: /classes/SwiftGoogleImport.php

Class SwiftGoogleImport

Class Overview

This class contains functions to automatically import Google API results into a MySQL database.

Located in /classes/SwiftGoogleImport.php [line 42]



		
		
		
		

Methods

[ Top ]
Method Summary
SwiftGoogleImport   __construct()   Creates and initializes a new SwiftGoogleImport object with the given Db object and Google object.
integer   importBlogs()   Imports blog results from Swift Google object into the given database table.
integer   importBooks()   Imports book results from Swift Google object into the given database table.
integer   importImages()   Imports image results from Swift Google object into the given database table.
integer   importNews()   Imports news results from Swift Google object into the given database table.
integer   importVideos()   Imports video results from Swift Google object into the given database table.
integer   importWebs()   Imports web search results from Swift Google object into the given database table.

[ Top ]
Methods
Constructor __construct  [line 54]

  SwiftGoogleImport __construct( Db $db, Google $google  )

Creates and initializes a new SwiftGoogleImport object with the given Db object and Google object.

Parameters:
Db   $db:  A Swift Db object
Google   $google:  A Swift Google object

API Tags:
Return:  The new SwiftGoogleImport object
Access:  public


[ Top ]
importBlogs  [line 260]

  integer importBlogs( string $table, integer $topic_id, string $query, [boolean $sortByDate = false], [string $numResults = "small"]  )

Imports blog results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
boolean   $sortByDate:  True to sort by date or false not to
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]
importBooks  [line 361]

  integer importBooks( string $table, integer $topic_id, string $query, [integer $fullView = false], [string $numResults = "small"]  )

Imports book results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
integer   $fullView:  True for full view only book results or false (default) for any type
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]
importImages  [line 149]

  integer importImages( string $table, integer $topic_id, string $query, [string $fileType = null], [string $numResults = "small"]  )

Imports image results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
string   $fileType:  File types to filter or null for any
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]
importNews  [line 310]

  integer importNews( string $table, integer $topic_id, string $query, [integer $topic = null], [string $edition = "us"], [boolean $sortByDate = false], [string $numResults = "small"]  )

Imports news results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
integer   $topic:  The Google news topic id to filter by
string   $edition:  us or other country code
boolean   $sortByDate:  True to sort by date or false not to
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]
importVideos  [line 204]

  integer importVideos( string $table, integer $topic_id, string $query, [boolean $sortByDate = false], [string $numResults = "small"]  )

Imports video results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
boolean   $sortByDate:  True to sort by date or false not to
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]
importWebs  [line 102]

  integer importWebs( string $table, integer $topic_id, string $query, [string $numResults = "small"]  )

Imports web search results from Swift Google object into the given database table.

Parameters:
string   $table:  The MySQL database table to insert into
integer   $topic_id:  The topic id to give it
string   $query:  The search query to use on Google API
string   $numResults:  Size of results to return (small or large)

API Tags:
Return:  Number of results imported
Access:  public


[ Top ]

Documentation generated on Tue, 08 Oct 2013 05:37:15 +0200 by phpDocumentor 1.4.4