Good day, I am currently a noob in Google Drive SDK and I am planning to integrate it in my webapp. I checked out google-api-php-client from their svn and I noticed it's a bit large to include it all in my project (it's 5.6 mb). Excluding all but the src folder, it's still large for me (3.9 mb). I want to include only the files needed for the Google Drive integration to work. But I do not know what files do these two (Google_Client.php and Google_DriveService.php as in Google Developers' sample) depend on.
Can you guys pinpoint what files (that are not related to Drive) I can safely delete? I really want the total file size to be as small as possible 'cause I believe that it can affect the project's loading time.
Thanks(and pardon my English)! :)
Only checkout the library source code and remove all services other than Drive and Oauth2:
svn checkout http://google-api-php-client.googlecode.com/svn/trunk/src
Remove all files under src/contrib but preserve the following:
src/contrib/Google_DriveService.php
src/contrib/Google_Oauth2Service.php
Related
I am trying to create a plugin for WordPress using the Google Analytics Reporting API v4 https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php
We need to load the Google API PHP Client Library
require_once __DIR__ . '/vendor/autoload.php';
I have downloaded the latest release of Google API https://github.com/google/google-api-php-client/releases but the vendor folder contains more than 7000 files!
My question is if I am doing something wrong here or I am missing something? Inside the vendor folder I can see all the Google services. How I can use the Google API with less files in a WordPress plugin? I will appreciate any help to the right direction.
By default the Google/Service directory contains all the code needed to access every Google Discovery services API. You don't technically need all of the files. You can safely delete everything under Google/Service that you don't need.
Dont delete files from any of the other directories. Just remove the unneeded APIs.
I made a WP plugin which depends on the Youtube API. So, to do it well, I use Google API PHP client.
My issue is quite simple: the Google API PHP client is huge (more than 12 000 files), including clients for all Google services, when I just need to use Youtube service. So I'm not confortable committing all those files to the WP plugins repo when most of them are useless in my case.
So, right now, my composer.json looks like this:
{
"require": {
"google/apiclient": "^2.0"
}
}
Any way to use only the Youtube API client (using composer if it's possible)?
This is not for the feign of heart but it is doable.
Go to this branch of the repo https://github.com/google/google-api-php-client/tree/v1-master
Grab the full src/Google directory you will need all of that.
In the src/Google/Service directory is the stuff for all the different APIs. Remove everything except for YouTube.
cross your fingers it should work.
This wont remove all 12000 files but it should give you just what you absolutely need. I used to do this but its been a few years.
Unfortunately, I don't think this is possible without manually including the relevant files in your project (which is a really bad idea).
The reason why its impossible, is because Google places all service APIs for the PHP library in a single GitHub repository found here:
https://github.com/google/google-api-php-client-services
If Google does split them into multiple repositories, then it could be possible to include a single repo.
For now, though, all services are under one composer project and one repo. Maybe its worth making a GitHub issue to ask Google about this?
So I’ve just finished developing my Laravel 5.2 web application that uses AdminLTE. It is an Asset Management System with some budget and invoice functionality, which will assist me in making my full-time job as a Systems Manager easier.
It’s not the most complicated app, but I’m proud of it, so I want to share it on GitHub, so others might be able to make use of it, as well as having my code available for future when I start applying for development jobs.
Now I’ve tried my best Google skills, but I just cannot figure out how to go about sharing my code on GitHub. I've used Bitbucket during my development phases, as I wanted to keep it private.
If anyone can please direct in the right direction about what steps I should be taking now to actually share my app out there. Should I be looking at something like Packagist instead, as I’m sure I’m not supposed share Laravel along with my web app. Any help will be greatly appreciated.
This question is not about how to upload my project to GitHub, but specifically about what the correct procedure is for Laravel projects and how to share them for others to easily use.
You just need to create a project repo and upload all your project code there.
If you didn't modify any core file in vendor directory, then upload the all code except vendor directory.
once uploaded, add up some readme.md file to tell some guideline/instruction for installation the project.
make your repo public so other can access it
I'm currently working on a project which involves:
Downloading a zip file from an API (bing ads, to be specific).
Unzipping the file (to get a csv), editing it and making database queries.
Re-zipping the file and uploading it back to the API using a service similar to the one used to download the zip file in the first place.
I'm restricted by the client libraries of the API to write the project in PHP. I've already written the project to run locally, and hence store the files on my hard disk.
However, I want to have the whole process running on-line. I've tried to use the Google App Engine, but the zip archive class doesn't seem to be working (although it does work locally).
I don't have much experience with putting apps on-line and I was wondering if anyone can point me in the right direction.
Thanks!
I am looking for a really simple PHP image gallery system that allows file uploads and provides easy integration into any existing PHP script. I only found full galleries with database backend and templating systems for integration and the too simple ones that just take a folder with (FTP uploaded) images and show it but don't provide the possibilities for file uploads.
I'm quite close on writing my own, cause I didn't find anything yet, but I first wanted to ask if you have any suggestions.
Ok so I have a very early version of it on Github, it is under development (and not really nice yet, I just needed the admin interface up and running) but contributions and comments are welcome.