Last August we announced Google Apps Script , which allows you to automate many of the features of Google Apps using server-side scripts. Scripts can work with contacts, calendars, spreadsheets, mail and even call SOAP and REST web services, all using standard JavaScript. We just launched additional support for creating and accessing Google Sites using the new SitesApp Service.Henry Lau, on the Google Apps Script team, has written a great tutorial on
Creating a Soccer Club Homepage . In short, his script pulls upcoming Soccer matches from Google Calendar, creates a Google Site about the team and adds the Soccer team from Contacts as collaborators. Here's some snippets of the code.
// create a site, given the domain, site URL, site title and summary var site = SitesApp . createSite ( "example.com" , "rover" , "Team Rover" , "We'll be the divisional champs this year!" );
// create a page for each member of the team var webpage = site . createWebPage ( "Jimmy's Page" , "JimmysPage", "Welcome to Jimmy's site" );
// create a page for team announcements var annPage = site . createAnnouncementsPage ( "Team Announcements" , "Announcements" , "New announcements for the team will be posted here." );
// given one of the Google Calendar events, create an announcement
var message = "There will be a soccer match from " + event . getStartTime () + " until " + event . getEndTime () + "!" ; site . createAnnouncement ( "Soccer Match #1" , message , annPage );
It's that easy! Check out the
documentation and get started building your scripts.
Of course, if you decide that you'd rather create Google Sites via a REST interface, the recently-announced
enhancements to the Sites Data API will allow you to write code in your language of choice to create and manage sites.
Ryan BoydDeveloper Relations - Google Apps
3 comments :
Google Sempre inovando...
Would this allow the addition of Friend Connect?
volevo ringraziare Henry Lau, Google Apps Script Team per il suo supporto in particolare per il tutorial per la squadre di calcio molto interessante con l'occasione volevo segnalare la realizzazione fatta con google site di un sito per una Polisportiva Creando a Soccer Club Homepage nella città di Pisa nel quale ho cercato di usare un pò tutte le funzionalità.
Post a Comment