Skip to content

Updated API signature for some libraries and fixed them in dependencies - #5

Open
aibolik wants to merge 2 commits into
kodie:masterfrom
aibolik:master
Open

Updated API signature for some libraries and fixed them in dependencies#5
aibolik wants to merge 2 commits into
kodie:masterfrom
aibolik:master

Conversation

@aibolik

@aibolik aibolik commented Oct 20, 2019

Copy link
Copy Markdown

Hey, thanks for this awesome BitBar plugin!

I really liked it, but at first it did not work. Since it was in NodeJS I decided to fix problems. I fixed it on my local copy and it now works fine.

Please review and accept PR and publish latest version to NPM.

Changes:

  • update API signature for googleapis(google-auth-library now is not needed) and for hapi(apparently, it moved to @hapi/hapi and API methods changed a bit)
  • I fixed versions for npmDeps, so that they will use exact version. That way, you don't need to care much about API changes, since the implementation is tied to specific version.

Best wishes

@crcastle

crcastle commented Aug 1, 2020

Copy link
Copy Markdown

The changes in this PR plus the one line below got it working for me! Thanks!

- var events = response.items;
+ var events = response.data.items;

I also added option + click on a calendar event to open the event's Google Hangout link since most of my meetings are Google Hangouts. Meetings without a Hangout link are greyed out when option is held down.

                 var str = `${evnts[d][s].time} - ${evnts[d][s].summary}`;
 
                 if (process.env.BitBar) {
-                  str += ` | href=${evnts[d][s].htmlLink}`;
+                  str += ' |';
 
                   if (cfg.eventColor) { str += ` color=${cfg.eventColor}`; }
                   if (cfg.eventFont) { str += ` font=${cfg.eventFont}`; }
                   if (cfg.eventLength) { str += ` length=${cfg.eventLength}`; }
                   if (cfg.eventSize) { str += ` size=${cfg.eventSize}`; }
+
+                  altStr = str;
+
+                  str += ` href=${evnts[d][s].htmlLink}`;
+                  altStr += evnts[d][s].hangoutLink ? ` href=${evnts[d][s].hangoutLink}` : '';
+                  altStr += ' alternate=true';
                 }
 
                 console.log(str);
+                console.log(altStr);
                 e++;
               }
             }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants