Coder Social home page Coder Social logo

trobusinesstracking's Introduction

Using Google Calendar api for TRO Ads system

Useful Links

1.Setup

2.Sample

3.Blog

Setup

1.sign up the TRO google account

psw: trotrotro

2.Create a project in Google Developers Console, enable google calendar api in api manager.

3.Install the library(already installed in the server)

Create a Service Account

In (Google Developer Console)(https://console.developers.google.com/apis/credentials?project=tro-calendar) select your project, then ‘API’s & Auth’, then ‘Credentials’, then ‘Create New Client ID’ and choose ‘Service Account’. You will be prompted to save the private key for the id. Make sure you do save it since it can’t be downloaded later (although you can generate new keys).

Share the calendar

Log in to the Calendar using the normal web GUI. Locate the calendar on the left panel under ‘My Calendars’, hover over it to reveal the dropdown arrow, then select ‘Share this Calendar’. Under the ‘Share with specific people’ section, enter the Email Address from the previous step and check it has enough access for your intended use.

sample code

setCache(new Google_Cache_File('/home/httpd/www/dev.travelresearchonline.com/public_html/tmp')); $client->setAssertionCredentials($credentials); if ($client->getAuth()->isAccessTokenExpired()) { $client->getAuth()->refreshTokenWithAssertion(); } $service = new Google_Service_Calendar($client); $event = new Google_Service_Calendar_Event(array( //'id' => $calId; 'summary' => $title, 'description' => $details, 'start' => array( 'date' => $start ), 'end' => array( 'date' => $end ), )); $event = $service->events->insert($calendarId, $event); ?>

trobusinesstracking's People

Watchers

James Cloos avatar  avatar

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.