google calendar api (php) & the GitHub files missing - php

Why google calendar api is not updated properly and the GitHub also not having the proper google-api-php-client (something is missing). They are just changing the code and not upgrade it properly. users struggle to find their apis and that too old versions - they make it complicated.
Is there any place that we can find a proper working example in php and is there a latest version of (without any bugs) GitHub google-api-php-client (no missing folders or files) ?
Waste of time by searching one by one.
Thanks

Related

Where are the full refs for getstream.io REST api?

I've been implementing PHP getstream.io support for our app, found that the official PHP library is lacking compared to Python one.
Checking official api refs on getstream.io site - seems they are not full by any means as well.
For example - we have 'stats/follow/' endpoint, allowing to get following/followers counts easily, quite a common thing to use for user profiles. I found it by reading python lib. But it is not documented at all on the official site, there are no mentions it even exists.
Am I looking for the full api refs in the wrong place (on getstream.io official site)?
Maybe there are a lot of other useful endpoints I am not aware of, as they are not present in the official refs?
stats/follow is a recent addition (beta right now) which isn't added to PHP SDK at the moment. PRs are always welcome (good to imitate Python SDK). Anyway, it will be added though, just a matter of time.
REST docs will be auto generated in near future.

PHP: Upgrade Google drive API from V1 to V2 or newer

I am using Google API client 2.0 and want to upgrade Google drive API from V1 to V2 to newer. I not found any straight forward way to upgrade version. Only the change log from google developer site found. Please tell me upgrade process guideline or step by step process.
Thanks in advance.
I am not sure i understand your question. Are you using the V2 of the Google drive api and now you want to upgrade to Google Drive V3? There are a lot of changes your going to have to make I don't think there are any guides on how to do it. Assuming you are using the Google PHP client library your best option will be to download the library for v3 and start fixing your errors one at a time. Like i said there are a number of changes in the library mainly title vs name. That and the library doesn't by default return all the fields your going to have to start using the field parameter.
When you download the library with composer you will be downloading the latest code for use with the Drive API v3. The Authencation code you have been using probably hasnt changed. All of the methods you use in drive probably have. Drive.php
Again there is no upgrade function for this its a completely different API. There is no way to upgrade it. You download the new class using composer and change your code as needed

Google API PHP client with Composer

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?

Google Moments in google's own php library, are not working

I have struggled with google's php library, the latest version of which is available on their own website. While the simple google plus example they provide works fine (it's a basic login with GET features), there is no way to add a moment activity via app in php - at least not for me.
Their own example isn't working (the example can be retrievd in the library: examples/moments/simple.php)
Someone provides an answer here but the button demo they provide isn't working either if I press (authorization is fine, posting produces no action.
Does anyone have a suggestion on how to change their own php file so to make it work? I tired removing all the code and resetting it to the basic action: at least I am not getting oauth or php errors, but the file produces no action.
I understand that posting moments in php is not currently supported, but I have a web app and android implementation wouldn't work for me I think.
At the moment you need to get the library from the trunk, you can find instructions here.
This gist documents how to request permission and write activities.
The old moments api has been deprecated and those samples are for the old API, I'll remove them from the codebase as soon as possible. Thanks for raising this question!

Integrating iCalendar in Moodle

I am working on a Moodle project and I have downloaded and installed the latest build(1.9) on my system. I'm using this framework for the very first time so presently trying to get familiar with the environment and the documentation.
My need is to embed an iCal kinda calendar on Moodle's front page using the PHP iCalendar API. I downloaded the latest version of PHP iCalendar but kinda needed some help figuring things out further. I am trying to build a plug-in sorta thing which allows you to put a custom-built calendar (in place of the regular Moodle calendar) on your Moodle site.
Has anyone ever worked with something similar before? Any suggestions?
On moodle.org, there is a change request for this feature in the Moodle Tracker that you might want to follow:
Calendar: IMPORT or Subscribe to iCal feed into Moodle calendar
.
You could try looking at the module development text. It could be fairly easy to do, but I haven't really worked with moodle that much. http://moodle.org/
This feature is currently a feature request in Moodle, but may take several version before it comes it becomes a core feature see the feature request here http://tracker.moodle.org/browse/MDL-16660.
The current workaround seems to be to use one of the commonly avaliable web based calendar system to import your ical feed and then inserting a html snippet into moodle to view it.
The obvious example would be to use a public Google calendar to do this but there is also:
http://assignaday.4teachers.org/
http://www.localendar.com/elsie
Reference:
http://moodle.org/mod/forum/discuss.php?d=82855

Categories