static async Task Inbox_SlackAdapterPerAppTestAsync() { using (Inbox inbox = new Inbox()) { InboxAdapter slackAdapter = inbox.AddAdapter(Str.NewGuid(), Consts.InboxProviderNames.Slack_App, new InboxAdapterAppCredential { ClientId = "687264585408.675851234162", ClientSecret = "_________________" }); inbox.StartAdapter(slackAdapter.Guid, new InboxAdapterUserCredential { AccessToken = "_________________" }); inbox.StateChangeEventListener.RegisterCallback((caller, type, state, eventArg) => { var box = inbox.GetMessageBox(); box._PrintAsJson(); }); Con.ReadLine(); } await Task.CompletedTask; }
static async Task Inbox_GmailAdapterTestAsync() { using (Inbox inbox = new Inbox()) { InboxAdapter gmailAdapter = inbox.AddAdapter(Str.NewGuid(), Consts.InboxProviderNames.Gmail, new InboxAdapterAppCredential { ClientId = "651284401399-d2bth85kk6rks1no1dllb3k0d6mrornt.apps.googleusercontent.com", ClientSecret = "_________________" }); inbox.StartAdapter(gmailAdapter.Guid, new InboxAdapterUserCredential { AccessToken = "_________________" }); inbox.StateChangeEventListener.RegisterCallback((caller, type, state, eventArg) => { var box = inbox.GetMessageBox(); box._PrintAsJson(); }); Con.ReadLine(); } await Task.CompletedTask; }