api-php-client | PHP client of Akeneo PIM API | REST library

 by   akeneo PHP Version: v11.1.0 License: Non-SPDX

kandi X-RAY | api-php-client Summary

kandi X-RAY | api-php-client Summary

api-php-client is a PHP library typically used in Web Services, REST, Symfony, Composer applications. api-php-client has no bugs, it has no vulnerabilities and it has low support. However api-php-client has a Non-SPDX License. You can download it from GitHub.

A simple PHP client to use the Akeneo PIM API. Note that our PHP client is backward compatible. For example, if your PIM is currently a v2.3, you can still use a 1.0 version of the PHP client. The new endpoints available in v2.3 will not be available in the v1.0 of the PHP client.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              api-php-client has a low active ecosystem.
              It has 82 star(s) with 41 fork(s). There are 31 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 8 open issues and 43 have been closed. On average issues are closed in 307 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of api-php-client is v11.1.0

            kandi-Quality Quality

              api-php-client has 0 bugs and 58 code smells.

            kandi-Security Security

              api-php-client has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              api-php-client code analysis shows 0 unresolved vulnerabilities.
              There are 71 security hotspots that need review.

            kandi-License License

              api-php-client has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              api-php-client releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              api-php-client saves you 3285 person hours of effort in developing the same functionality from scratch.
              It has 7108 lines of code, 588 functions and 125 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed api-php-client and discovered the below as its top functions. This is intended to give you an instant insight into api-php-client implemented functionality, and help decide if they suit your requirements.
            • Updates a list of JSON resources .
            • It is iterable .
            • This method is called to send an authenticated request .
            • It creates a list of family variants .
            • It returns a list of responses .
            • It creates a page with all links .
            • Throws an exception .
            • It creates a media file for a product model .
            • Authenticates the request with the given refresh token .
            • Sends a request to the API
            Get all kandi verified functions for this library.

            api-php-client Key Features

            No Key Features are available at this moment for api-php-client.

            api-php-client Examples and Code Snippets

            PHP Akeneo PIM API,Getting started,Get a list of products
            PHPdot img1Lines of Code : 25dot img1License : Non-SPDX (NOASSERTION)
            copy iconCopy
            $searchBuilder = new \Akeneo\Pim\ApiClient\Search\SearchBuilder();
            $searchBuilder->addFilter('enabled', '=', true);
            $searchFilters = $searchBuilder->getFilters();
            
            $firstPage = $client->getProductApi()->listPerPage(50, true, ['search' =&g  
            PHP Akeneo PIM API,Testing
            PHPdot img2Lines of Code : 14dot img2License : Non-SPDX (NOASSERTION)
            copy iconCopy
            # Build the project
            make dependencies
            
            # Run PHPUnit tests
            make unit
            
            # Run PHPSpec tests
            make spec
            
            # Run code style check
            make cs
            
            # ... or directly run all tests
            make tests
              
            PHP Akeneo PIM API,Getting started,Upsert a list of of products
            PHPdot img3Lines of Code : 10dot img3License : Non-SPDX (NOASSERTION)
            copy iconCopy
            $client->getProductApi()->upsertList([
                [
                    'identifier' => 'top',
                    'family' => 'tshirt',
                ],
                [
                    'identifier' => 'cap',
                    'categories' => ['hat'],
                ],
            ]);
              

            Community Discussions

            QUESTION

            Google - "Migrate to the new Google Identity Services library as soon as possible". Do we need to remove our use of google-api-php-client?
            Asked 2022-Mar-27 at 11:10

            I received an email from Google stating that 'One or more of your web applications uses the legacy Google Sign-In JavaScript library. Please migrate your project(s) to the new Google Identity Services SDK before March 31, 2023.'

            This is a surprise, as we recently upgraded to using only the https://github.com/googleapis/google-api-php-client library for logging the user in. I have no mention of the old API (gapi) in my source code.

            I'm using the oauth endpoints directly to query the API.

            I'm worried that I will need to stop using the PHP library now as well. Can anybody please offer some advice?

            ...

            ANSWER

            Answered 2022-Mar-27 at 11:10

            The Google apis php client library is a library designed to use Oauth2 to access google apis. It uses the PHP scripting language

            The Google Sign-In JavaScript library is a JavaScript library used for Signing in users to your application using their google account.

            First off Oauth2 is not sign in. Second Php scripting language is not the JavaScript scripting language.

            These are two different things. The php client library has nothing to do with gapi which is part of the JavaScript client library.

            I would check the rest of your system to ensure that you are not using the JavaScript library. Your php library is unaffected.

            Source https://stackoverflow.com/questions/71635527

            QUESTION

            Updating spreadsheet data with Google Spreadsheet api and php suddenly not working with authentication error
            Asked 2022-Mar-07 at 13:04

            In a form which takes input and updates the value in a spreadsheet. It was working fine before but suddenly stopped working with this error message:

            ...

            ANSWER

            Answered 2022-Mar-07 at 13:04

            The caller does not have permission

            means exactly that. Which ever user you used to authorize this code does not have permission to access that sheet. Authorize your application with a user that has access or grant that user access.

            Service accounts need to be preauthorized. The most common way to do that is to take the service account client id and share the file with it though the google drive web application. If someone removed the service accounts access to the file. The service account will no longer have access.

            I would double check that it still has access.

            Source https://stackoverflow.com/questions/71374063

            QUESTION

            Google Sheet API v4 "Unable to parse range" when getting table data
            Asked 2021-Dec-07 at 18:33

            I'm trying to learn the Google Sheets API for PHP to read data from a sheet. I'm using https://github.com/googleapis/google-api-php-client/ to read a Google Sheet that is not published to the web. I've set up access permissions in the Google Sheets API in my Google Account. My basic connection works, using this:

            ...

            ANSWER

            Answered 2021-Dec-07 at 18:33

            The range must use A1 notation or R1C1 notation, per the documentation. So range should be

            Source https://stackoverflow.com/questions/70264982

            QUESTION

            How to fetch Media Assets of a Product from Akeneo 5
            Asked 2021-Nov-15 at 16:53

            I try to fetch the media assets from products in

            I am using https://github.com/akeneo/api-php-client-ee (v6) and know about https://api.akeneo.com/api-reference-50.html

            This is what I came up so far:

            ...

            ANSWER

            Answered 2021-Nov-15 at 16:53

            This works - "bilder" is the Asset Family code in our case.

            Source https://stackoverflow.com/questions/69971217

            QUESTION

            PHP Session discrepancy between development (localhost) and hosted service
            Asked 2021-Oct-17 at 23:44

            I'm implementing a google sign-in feature which uses PHP sessions across pages to determine whether the user is in fact signed in. This works perfectly on my local machine. When I upload to my hosted server (happens to be Google Cloud) and adjust the client ids accordingly and then sign in as normal, the sign-in process completes, but the user is reported as being not signed in. A few page refreshes and / or clicks on the "sign in" button then result in the user being recognised as being signed in. I am assuming that the session variables are not being set correctly or that there is some delay in setting them. However, maybe there is another issue that I'm unaware of (again there are no problems when I run the service locally). I appreciate that this is a bit of a vague question. I have tried using session_write_close() in case the sessions were being kept open for too long, though this made no discernible difference.

            Once the user is successfully authenticated by google sign-in, a POST page, oauth.php reads the variables and writes them to the $_SESSION variables, for example:

            ...

            ANSWER

            Answered 2021-Oct-17 at 23:43

            Crikey! That took some time to figure out. The unit for $leeway is in seconds. Increasing this value by 5 (as recommended) had no effect for me as the clock on my webserver is 24 seconds slower than the auth server. I was able to deduce this by adding the following error logging to vendor/firebase/php-jwt/src/JWT.php:

            Source https://stackoverflow.com/questions/69600358

            QUESTION

            Google OAuth, Refresh token invalid
            Asked 2021-Sep-03 at 13:38

            I am using the Google PHP SDK to connect to Google My Business and get an access token.

            After connection with Google (Client), everything works, but when around 1-2 days pass, I start to get "Bad Request" and error code "invalid_grant" from here.

            Meaning that the refresh token is not valid anymore. Then I have to disconnect the google connection and re-connect to make it work for 1-2 days.

            I am also setting the refresh token for offline use. Any ideas what is wrong?

            ...

            ANSWER

            Answered 2021-Sep-03 at 13:38

            There are serval reasons why a refresh token can expire

            • The user has revoked your app's access.
            • The refresh token has not been used for six months.
            • The user changed passwords and the refresh token contains Gmail scopes.
            • The user account has exceeded a maximum number of granted (live) refresh tokens.
            • The user belongs to a Google Cloud Platform organization that has session control policies in effect.

            Currently the most common one is

            A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.

            The first thing you should check is that your application is set to production and not testing in the consent screen.

            Source https://stackoverflow.com/questions/69044200

            QUESTION

            Not able to authenticate a service account with Google API PHP Client
            Asked 2021-Aug-01 at 18:12

            I am new to this so I took cue from various official documentations to create a service account etc and use PHP client for Google API to make HTTP requests by using the credentials JSON for that service account.

            But I am not sure what's going wrong, it just doesn't work ( for context I am trying to use the Indexing API - https://developers.google.com/search/apis/indexing-api/v3/prereqs#php )

            ...

            ANSWER

            Answered 2021-Aug-01 at 18:12

            Not all google apis support service account authentication. You appear to be trying to use the indexing api. If you check the documentation #OAuth2Authorizing You will find that it only mentions Oauth2 authorization this is because service account authorization is not supported by this api.

            You will need to switch to Oauth2.

            Source https://stackoverflow.com/questions/68611823

            QUESTION

            Using Gmail API with PHP: How to make a CLI app work in the browser?
            Asked 2021-May-25 at 08:47

            I'm testing the Gmail API.

            So far, I'm using the PHP client example, and selected my environment as "desktop", because "other" is not available an s website environment wouldn't work.

            It won't work because when I access the php file using a browser, I get:

            Open the following link in your browser: https://accounts.google.com/o/oauth2/auth?response_type=code&access_type=offline&client_id=35587452231052-k48bjsgefmnsbd654shdbf026q1un.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&state&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&prompt=select_account%20consent Enter verification code:

            And there's no place to actually type the verification code after the verification.

            When I access it from the terminal I just paste the verification code and that's it.

            This may be a silly question, but how do I make it work in a page?

            Here's my file: ...

            ANSWER

            Answered 2021-May-25 at 08:47

            QUESTION

            Moving files with update() and addParents in Google Drive API V3 not taking permanent effect
            Asked 2021-May-03 at 01:01

            Trying to move a file to a folder using the update() method on the "parent" attribute, as per this doc, and it seems to work initially, but the file "parents" update does not appear to have been "saved". The change to the name does work:

            ...

            ANSWER

            Answered 2021-May-03 at 00:58

            I confirmed that in the case of your script, in order to retrieve the parent folder ID, $file2 = $this->drive->files->get($fileId) is used. When you are using Drive API v3, the values of kind, name, id and mimeType are returned as the default response values. It seems that this is the current specification. I thought that the reason of your issue might be due to this.

            If my understanding is correct, how about the following modification?

            From:

            Source https://stackoverflow.com/questions/67357956

            QUESTION

            Google indexing API wrong json file
            Asked 2021-Jan-29 at 12:14

            Hi I am trying to use Google indexing API. I used this tutorial - https://developers.google.com/search/apis/indexing-api/v3/prereqs

            I used this php library - different branch - v1-master because I dont use composer so I had to use autoload.php https://github.com/googleapis/google-api-php-client/tree/master

            Here is my code:

            ...

            ANSWER

            Answered 2021-Jan-29 at 12:14

            Issue solved, according to issue here - https://github.com/googleapis/google-api-php-client/issues/2025#issuecomment-762634717, autoload has been removed and whole package depends on autoloader from composer (if you are using it). If you are not using it, author pointed to the last usable version with autoloader here

            https://github.com/googleapis/google-api-php-client/releases/tag/v2.8.2

            Download this version and include only one autoload.php in your code

            Source https://stackoverflow.com/questions/65945539

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install api-php-client

            We use HTTPPlug as the HTTP client abstraction layer. In this example, we will use Guzzle v6 as the HTTP client implementation.

            Support

            Full documentation is available on the API website.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/akeneo/api-php-client.git

          • CLI

            gh repo clone akeneo/api-php-client

          • sshUrl

            git@github.com:akeneo/api-php-client.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link