include/externalAPI/Google/ExtAPIGoogle.php
\ExtAPIGoogle
ExtAPIGoogle
This class manages the communication to the Google document web services. Currently the Zend_Gdata_Docs class is used in PHP (see http://framework.zend.com/manual/en/zend.gdata.docs.html). The Zend_Gdata_Docs class currently used in this class adheres to the Google Documents List API 1.0 specification (see http://code.google.com/apis/documents/docs/1.0/developers_guide_protocol.html).
There are some known limitations with the documents that may be searched. In particular, we have observed that certain file types that are uploaded to Google Docs do not appear when queried (.png, .tpl, etc.). On the other hand, files that are created within Google Docs will be displayed. So for example, if you were to create a new drawing and insert a PNG file into the drawing, the drawing will appear in the result list and be able to be uploaded to SugarCRM.
- Parent(s)
- \ExternalAPIBase < \ExternalAPIPlugin
Constants
Properties
$_appStringErrorPrefix= 'self::APP_STRING_ERROR_PREFIX'
self::APP_STRING_ERROR_PREFIX
Details- Type
- n/a
- Inherited_from
- \ExternalAPIBase::$$_appStringErrorPrefix
$account_name= ''
- Type
- n/a
- Inherited_from
- \ExternalAPIBase::$$account_name
$account_password= ''
- Type
- n/a
- Inherited_from
- \ExternalAPIBase::$$account_password
$oauthAccess= '"https://www.google.com/accounts/OAuthGetAccessToken"'
"https://www.google.com/accounts/OAuthGetAccessToken"
Details- Type
- n/a
$oauthAuth= '"https://www.google.com/accounts/OAuthAuthorizeToken"'
"https://www.google.com/accounts/OAuthAuthorizeToken"
Details- Type
- n/a
$oauthReq= '"https://www.google.com/accounts/OAuthGetRequestToken"'
"https://www.google.com/accounts/OAuthGetRequestToken"
Details- Type
- n/a
$requireAuth= 'true'
true
Details- Type
- n/a
- Inherited_from
- \ExternalAPIBase::$$requireAuth
$scope= '"https://docs.google.com/feeds/ http://docs.google.com/feeds/"'
"https://docs.google.com/feeds/ http://docs.google.com/feeds/"
Details- Type
- n/a
$supportedModules= 'array('Documents', 'Notes','Import')'
array('Documents', 'Notes','Import')
Details- Type
- n/a
$useAuth= 'true'
true
Details- Type
- n/a
- Inherited_from
- \ExternalAPIBase::$$useAuth
Methods
checkLogin(
\EAPM $eapmBean
=
null
)
:
void
Check login
Name | Type | Description |
---|---|---|
$eapmBean | \EAPM |
downloadDoc(
$documentId, $documentFormat
)
:
void
Name | Type | Description |
---|---|---|
$documentId | ||
$documentFormat |
formatCallbackURL(
\$callback_url $callback_url
)
:
String
This function takes a callback_url and checks the $_REQUEST variable to see if additional parameters should be appended to the callback_url value. The $_REQUEST variables that are being checked deal with handling the behavior of closing/hiding windows/tabs that are displayed when prompting for OAUTH validation
Name | Type | Description |
---|---|---|
$callback_url | \$callback_url | String value of callback URL |
Type | Description |
---|---|
String | value of URL with applicable formatting |
getClient(
String $gdType
=
"docs"
)
:
Retrieve the gdata client.
Name | Type | Description |
---|---|---|
$gdType | String | The Gdata type |
getConnectorParam(
string $name
)
:
mixed
Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
mixed |
getErrorStringFromCode(
\unknown_type $error_numb
)
:
void
Allow API clients to provide translated language strings for a given error code
Inherited from: \ExternalAPIBase::getErrorStringFromCode()Name | Type | Description |
---|---|---|
$error_numb | \unknown_type |
getValue(
$value
)
:
void
Name | Type | Description |
---|---|---|
$value |
isMimeDetectionAvailable(
)
:
bool
Determine if mime detection extensions are available.
Inherited from: \ExternalAPIBase::isMimeDetectionAvailable()Type | Description |
---|---|
bool |
postData(
$url, $postfields, $headers
)
:
void
Name | Type | Description |
---|---|---|
$url | ||
$postfields | ||
$headers |
searchDoc(
$keywords, $flushDocCache
=
false
)
:
void
Name | Type | Description |
---|---|---|
$keywords | ||
$flushDocCache |
setGDataClient(
String $type
)
:
void
Set the Gdata container based upon the type.
Name | Type | Description |
---|---|---|
$type | String |