@@ -22,8 +22,8 @@ $ yarn add axios-oauth-client axios
22
22
23
23
``` javascript
24
24
import axios from ' axios'
25
- import oauth from ' axios-oauth-client'
26
- const getAuthorizationCode = oauth . authorizationCode (
25
+ import { authorizationCode } from ' axios-oauth-client'
26
+ const getAuthorizationCode = authorizationCode (
27
27
axios .create (),
28
28
' https://oauth.com/2.0/token' , // OAuth 2.0 token endpoint
29
29
' CLIENT_ID' ,
@@ -39,8 +39,8 @@ const auth = await getAuthorizationCode('AUTHORIZATION_CODE', 'OPTIONAL_SCOPES')
39
39
40
40
``` javascript
41
41
import axios from ' axios'
42
- import oauth from ' axios-oauth-client'
43
- const getOwnerCredentials = oauth . ownerCredentials (
42
+ import { ownerCredentials } from ' axios-oauth-client'
43
+ const getOwnerCredentials = ownerCredentials (
44
44
axios .create (),
45
45
' https://oauth.com/2.0/token' , // OAuth 2.0 token endpoint
46
46
' CLIENT_ID' ,
@@ -55,8 +55,8 @@ const auth = await getOwnerCredentials('USERNAME', 'PASSWORD', 'OPTIONAL_SCOPES'
55
55
56
56
``` javascript
57
57
import axios from ' axios'
58
- import oauth from ' axios-oauth-client'
59
- const getClientCredentials = oauth . clientCredentials (
58
+ import { clientCredentials } from ' axios-oauth-client'
59
+ const getClientCredentials = clientCredentials (
60
60
axios .create (),
61
61
' https://oauth.com/2.0/token' ,
62
62
' CLIENT_ID' ,
@@ -71,8 +71,8 @@ const auth = await getClientCredentials('OPTIONAL_SCOPES')
71
71
72
72
``` javascript
73
73
import axios from ' axios'
74
- import oauth from ' axios-oauth-client'
75
- const getRefreshToken = oauth . refreshToken (
74
+ import { refreshToken } from ' axios-oauth-client'
75
+ const getRefreshToken = refreshToken (
76
76
axios .create (),
77
77
' https://oauth.com/2.0/token' ,
78
78
' CLIENT_ID' ,
0 commit comments