Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aibolik
Copy link

@aibolik aibolik commented Oct 20, 2019

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
Copy link

crcastle commented Aug 1, 2020

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