Giter Site home page Giter Site logo

zoho-api-wrapper's Introduction

ZOHO CRM API V2 Wrapper for Laravel 5|6|7|8

Laravel 5.x Latest Stable Version Latest Unstable Version Total Downloads License

To easing ZOHO REST API V2 call for Laravel application.

Requirements

Installation

$ composer require asad/laravel-zoho-api-wrapper

Configuration

$ php artisan zoho:authentication

Input CRM client id:
> (your client id)
Input CRM client secret:
> (your client secret)
Input client domain (ex: example.com):
> (your client domain name)
Select your protocol.[http]:
[0] http
[1] https
> 0
Select your env. [sandbox]:
[0] sandbox
[1] live
> 0
Is it CN DC?
[0] No
[1] Yes
Scopes? (ex: ZohoCRM.modules.ALL,ZohoCRM.settings.ALL) If you skip it will enable ex: scopes
> (zoho scopes)

Copy the following url, paste on browser and hit return.
https://accounts.zoho.com/oauth/v2/auth?....

How to use (example)

> ZohoController.php

use Asad\Zoho\Api\RecordApi;
use Asad\Zoho\Exception\ZohoException;

Class ZohoController extends Controller
{

    public function testAPI()
    {
        $param = [
            'headers' => [
                'If-Modified-Since' => date('c')
            ],
            'data' => [
                'page' => 1,
                'per_page' => 20,
            ]
        ];

        $response = $this->listOfRecords('Leads', $param);
        dd($response);
    }

    public function listOfRecords($module, array $param)
    {
        $record_api = new RecordApi();
        try {
            $response = $record_api->listOfRecords($module, $param);
            if ($response->getStatus() == 'success') {
                $crm_data = $response->getResults();
                return $crm_data;
            }
        } catch(ZohoException $e) {
            // Handle Exception and return
        }
    }
}

APIs

Currently there are only 7 api wrappers. Those are follows:

  • Record APIs
  • Meta Data APIs (It also belong Module API)
  • Note APIs
  • Related List APIs
  • Tag APIs
  • Attachments APIs
  • Query APIs

Documentation

See the documentation at : Zoho API Wrapper

Contributing

Contributions are welcome and will be fully credited.

I accept contributions via Pull Requests on Github.

Issues

If you discover any issues, please email at [email protected] also you can create issue on the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.