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

feat: implement getClient helper function #634

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Conversation

chentsulin
Copy link
Collaborator

Add this helper to access underlying messaging client configured by bottender.config.js:

const { getClient } = require('bottender');

const messenger = getClient('messenger');

messenger.sendText(USER_ID, 'Hello!', { tag: 'CONFIRMED_EVENT_UPDATE' });

const line = getClient('line');

line.pushText(USER_ID, 'Hello!');

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #634 into release/1.2 will decrease coverage by 0.11%.
The diff coverage is 57.89%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/1.2     #634      +/-   ##
===============================================
- Coverage        81.08%   80.97%   -0.12%     
===============================================
  Files              100      101       +1     
  Lines             4293     4310      +17     
  Branches          1077     1079       +2     
===============================================
+ Hits              3481     3490       +9     
- Misses             764      771       +7     
- Partials            48       49       +1
Impacted Files Coverage Δ
packages/bottender/src/getSessionStore.ts 68.96% <100%> (-1.04%) ⬇️
packages/bottender/src/index.ts 100% <100%> (ø) ⬆️
packages/bottender/src/getClient.ts 52.94% <52.94%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5211016...1e99105. Read the comment docs.

@chentsulin chentsulin merged commit 9f0b334 into release/1.2 Jan 22, 2020
@chentsulin chentsulin deleted the get-client branch January 22, 2020 04:13
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.

3 participants