scottybo / laravel-google-my-business Goto Github PK
View Code? Open in Web Editor NEWA Laravel package for the Google My Business API
License: Apache License 2.0
A Laravel package for the Google My Business API
License: Apache License 2.0
Hi,
I installed your script using composer on my Laravel application, do you have Controller or something to tell me?
At the moment, i don't know how to use it.
Thank's
Forgive me for my basic understanding, but wouldn't this be similar to socialite in terms of authentication? Does it work off the same token? So if we have Google+ login for Socialite, can we use that token with this for authenticating requests?
It's a bit of a never ending story isn't it haha.
Able to get this working for Laravel 8. I wish I knew how to help you do that.
Suddenly today I'm getting class not found.
composer file
"scottybo/laravel-google-my-business": "^2.2",
Discovered Package: scottybo/laravel-google-my-business
in my controller
top
use Scottybo\LaravelGoogleMyBusiness\Google_Service_MyBusiness_MediaItem;
in my method.
$mediaItem = (new Google_Service_MyBusiness_MediaItem);
if I trace the class it brings me to the correct class so it seems like its finding it.
but calling my method I'm getting
Class 'Scottybo\LaravelGoogleMyBusiness\Google_Service_MyBusiness_MediaItem' not found
the
GoogleMyBusiness class works fine from the same file.
I'm so confused what to look at.
Thanks in advanced.
So I pulled our locations from one of our accounts in postman and it shows 3184 but when I pull the same account thru your script the totalSize is showing as null.
I need this number so I know how many times to loop.
Can you point me in the right direction to fix this?
from Laravel-Google-My-Business
#collection_key: "locations" #internal_gapi_mappings: [] #locationsType: "Google_Service_MyBusiness_Location" #locationsDataType: "array" +nextPageToken: "ABHRLXUDB1wDgrcE037Jc9-kyS-x1ue8OPv29TBhsiuQCtErQNYvkjI" +totalSize: null #modelData: array:1 [
from post man
"nextPageToken": "ABHRLXUNHXz3S-9BU_0f0JDjCJWzZpFPei9Ut8KvIe1aXixRVjyf0majhuENWjNW6hN4URkmz263xSdCHviy9GwPJ2-bhJRhVQcBq-5GmhPfxC20Wr0iADICXKvKThCyUgCqbJksp9z6Xiu-nb2fXsyAeezMgUZ2cjXFWqbuFJWOJtxSqGu2ReCURkzkaC8W7GuT6Bk55ieC", "totalSize": 3184
here is how I'm calling it
$gmb = new GoogleMyBusiness($client);
$oLocations = $gmb->accounts_locations->listAccountsLocations($name,['orderBy' => 'locationName']);
Hi! I am actively using your product for which I am very grateful. However, when the reply is updated, there is an error with the argument Google_Service_MyBusiness_ReviewReply $postBody
public function updateReply($name, Google_Service_MyBusiness_ReviewReply $postBody, $optParams = array())
the fact is that it is not possible to get an instance of the class - Google_Service_MyBusiness_ReviewReply
public function getReviewReply() - return is array.
My example:
```
public function updateReply($name, $postBody): \Scottybo\LaravelGoogleMyBusiness\Google_Service_MyBusiness_ReviewReply
{
$review = $this->googleMyBusiness->accounts_locations_reviews->get($name);
$reply = $review->getReviewReply();
$reply['comment'] = $postBody;
return $this->googleMyBusiness->accounts_locations_reviews->updateReply($name, $reply);
}
to avoid the problem I had to change the 2 attribute to array - array $postBody
I will be grateful for any information. Thank you!
Hi, thanks for your work,
Authenticate with PulkitJalan \ Google, but how do I get that client? and be able to use your package
I was wondering will this package be upgraded for the new Endpoints v1 before the old endpoints are depreciated at the end of April?
Hi,
I can't install the package
I using Laravel v9.33.0 (PHP v8.0.3)
I trying to install using these two options
Run composer require scottybo/laravel-google-my-business
Or to install via composer - edit your composer.json to require the package.
"require": { "scottbo/laravel-google-my-business": "1.*" }
Then run composer update in your terminal to pull it in.
I got this error:
Problem 1
- Root composer.json requires scottybo/laravel-google-my-business ^2.2 -> satisfiable by scottybo/laravel-google-my-business[2.2.0].
- scottybo/laravel-google-my-business 2.2.0 requires illuminate/support 6.* || 7.* || 8.* -> found illuminate/support[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require scottybo/laravel-google-my-business:*" to figure out if any version is installable, or "composer require scottybo/laravel-google-my-business:^2.1" if you know which you need.
I know this is somewhat irrelevant but I'd appreciate any assistance that you may have.
Any tips on getting approved for the GMB API?
I am applying as a software dev to provide a software product around the GMB API but am getting rejected. How are you getting your access? Are you part of an agency? Or perhaps going to be using this in-house?
Thanks
Hi
When I try to install this library I got error:
In GoogleMyBusiness.php line 63:
Type error: Too few arguments to function Scottybo\LaravelGoogleMyBusiness\
GoogleMyBusiness::__construct(), 0 passed in /vendor/scottybo/laravel-google-my-business/src/GoogleMyBusinessServiceProvider.php on line 25 and exactly 1 expected
Is this package working on Laravel 6.x? Saw a commit WIP to make it compatible.
Hi,
We are using this to access google my business API to access location insights for individual locations we manage.
Now currently the path to this api endpoint is in the following location
vendor\scottybo\laravel-google-my-business\src\GoogleMyBusiness.php
line = 460
is 'path' => 'v4/{+name}/locations:reportInsights',
This results in no data unless we change the path to be 'path' => 'v4/accounts/{+name}/locations:reportInsights',
now looking at the mybusiness_google_rest_v4p4.json file
"reportInsights": { "id": "mybusiness.accounts.locations.reportInsights", "path": "v4/{+name}/locations:reportInsights", "flatPath": "v4/accounts/{accountsId}/locations:reportInsights", "httpMethod": "POST", "parameters": { "name": { "description": "The account resource name.", "location": "path", "required": true, "pattern": "^accounts\/[^\/]+$", "type": "string" } },
You will see the flat path is correct and would result in the data but we can't swap the library to use this. I am not sure after research the difference between path and flatPath
But unless we include '/accounts' in the path we are unable to successfully return results.
I am going to fork the library to change the path in the following location
vendor\scottybo\laravel-google-my-business\src\GoogleMyBusiness.php
line for 460
But I really don't know if this is the right solution and where the bug is, Google, this library or the way we are accessing reportInsights in our code base.
Any insight would be helpful and I am happy to do the leg work if something needs changing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.