A Dashing widget for displaying next Brazil 2014 World Cup matches from calendar event on Google Calendar
It was designed to be used against this calendar worldcupbrazilcalendar
Made by platanus in Chile
Add it to dashing's gemfile:
gem 'google-api-client'
gem 'activesupport'
and run bundle install
.
To use this widget, you'll first need to set up a Google API project.
-
- Go to https://code.google.com/apis/console
- Click 'Create Project' and accept TOS's
- Enable 'Calendar API' service and accept TOS's
- Under 'APIs & auth.' click 'Credentials' in the left-hand nav menu
- Pick the OAuth option by clicking 'Create new Client ID'
- Select 'Service Account' and click 'Create Client ID'. Download of your Private key is about to start. Save it securely.
- Note the password for your new private key ('notasecret')
- Next to the OAuth tab you will find the details for the service account you just created. Copy it's email address which will look something like this: [email protected] - you'll need it in environmental variables later.
-
- Go to www.worldcupbrazilcalendar.com and subscribe the matches calender to your google account.
- Go to the other calendar settings in google calendar, and the click in the WorldCup 2014 calendar.
- Find the callendar id, it should be something like
[email protected]
-
-
You can install the widget with
dashing install 1efd7332c3cf59d3c3f9
, or manually add each file in the corresponding location -
Setup your environmental variables
GOOGLE_SERVICE_ACCOUNT_EMAIL # Email of service account GOOGLE_SERVICE_PK_FILE # File containing your private key GOOGLE_SERVICE_KEY_SECRET # Password to unlock private key 'notasecret' WORLDCUP_CALENDAR # Calendar ID. WORLDCUP_MY_TEAM # The team you want to follow, refer to the worldcup.rb job to know how to spell it
-
Add the widget HTML to your dashboard
<li data-row="1" data-col="4" data-sizex="1" data-sizey="2"> <div data-id="worldcup" data-view="Worldcup" data-title="Brazil 2014" data-my-team-title="Chile Matches" style="background-color:#357A3E;"></div> <img class="icon-background" src="/assets/brazil-back.png" /> </li>
-
To set your PK12 certificate in heroku you can follow this guide http://ar.zu.my/how-to-store-private-key-files-in-heroku/
Take into account that @platanus our dashboard uses half sized vertical unit
On a standard dashboard you should use