@@ -27,13 +27,10 @@ You can now enter the credentials in the Gmail client config.
2727``` ballerina
2828gmail:GmailConfiguration gmailConfig = {
2929 oauthClientConfig: {
30- accessToken: <ACCESS_TOKEN>,
31- refreshConfig: {
32- refreshUrl: gmail:REFRESH_URL,
33- refreshToken: <REFRESH_TOKEN>,
34- clientId: <CLIENT_ID>,
35- clientSecret: <CLIENT_SECRET>
36- }
30+ refreshUrl: gmail:REFRESH_URL,
31+ refreshToken: <REFRESH_TOKEN>,
32+ clientId: <CLIENT_ID>,
33+ clientSecret: <CLIENT_SECRET>
3734 }
3835};
3936
@@ -44,7 +41,7 @@ gmail:Client gmailClient = new (gmailConfig);
4441
4542| Ballerina Language Versions | Gmail API Version |
4643| :----------------------------:| :-----------------:|
47- | Swan Lake Preview8-SNAPSHOT | v1 |
44+ | Swan Lake Alpha 2 | v1 |
4845
4946## Sample
5047
@@ -54,15 +51,13 @@ import ballerinax/googleapis_gmail as gmail;
5451
5552gmail:GmailConfiguration gmailConfig = {
5653 oauthClientConfig: {
57- accessToken: <ACCESS_TOKEN>,
58- refreshConfig: {
59- refreshUrl: gmail:REFRESH_URL,
60- refreshToken: <REFRESH_TOKEN>,
61- clientId: <CLIENT_ID>,
62- clientSecret: <CLIENT_SECRET>
63- }
54+ refreshUrl: gmail:REFRESH_URL,
55+ refreshToken: <REFRESH_TOKEN>,
56+ clientId: <CLIENT_ID>,
57+ clientSecret: <CLIENT_SECRET>
6458 }
6559};
60+
6661gmail:Client gmailClient = new (gmailConfig);
6762public function main(string... args) {
6863 gmail:MessageRequest messageRequest = {};
0 commit comments