Download the PHP package pixelstudio/wp-google-api without Composer
On this page you can find all versions of the php package pixelstudio/wp-google-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pixelstudio/wp-google-api
More information about pixelstudio/wp-google-api
Files in pixelstudio/wp-google-api
Package wp-google-api
Short Description [Require Coding] WordPress plugins that provide Google API Client
License MIT
Homepage https://github.com/hrsetyono/wp-google-api/
Informations about the package wp-google-api
WP Google Calendar API
This WordPress plugin just provide you with the API Client. It doesn't do anything without coding in your Theme.
For documentation reads: https://github.com/google/google-api-php-client
Requirement
- PHP version 5.6 or higher
- WordPress version 4.9.6
Local Testing
You need SSL to make the API works.
If you're in Windows, you can add certificate to your WAMP or XAMPP installation by following these steps:
-
Download latest certificate from https://curl.haxx.se/docs/caextract.html
-
Put it in PHP folder like
C:\xampp\php\extras\ssl\orC:\wamp64\bin\php\php7.0.0\extras\ssl -
In php.ini file, uncomment "curl.cainfo" and put in the path to your SSL file like
curl.cainfo = "C:\xampp\php\extras\ssl\cacert-2018-06-02.pem". - Done your API should now work even without changing your Virtual Host to HTTPS.
For details, read this StackOveflow thread
Displaying Own Calendar
You can skip the OAuth process if only for displaying own calendar. Follow these steps:
-
I assume you have created API Console with permission to get Calendar API. If not do it here https://console.developers.google.com
-
Go to
Menu > IAM & Admin > Service Accounts. Create a new account, name it anything, and set the role to Project > Viewer. Tick "Furnish new Private key". -
You will automatically download a JSON file. Keep this safe because you can't redownload it.
-
Open your Calendar and grant permission to view for the Service Account's email. If you want to see the Color, you need to grant Read & Write access.
- Setup is done. You can find sample code here: https://gist.github.com/hrsetyono/5d8623bd8f28da3e282441ce1314f022