File tree Expand file tree Collapse file tree
scribejava-apis/src/main/java/com/github/scribejava/apis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,22 @@ public class LinkedInApi extends DefaultApi10a {
1010
1111 private final String scopesAsString ;
1212
13+ /**
14+ * @deprecated use {@link #instance() }
15+ */
16+ @ Deprecated
17+ //TODO: make protected in the next release
1318 public LinkedInApi () {
1419 scopesAsString = null ;
1520 }
1621
22+ /**
23+ * @deprecated use {@link #instance(java.lang.String...) }
24+ */
25+ @ Deprecated
26+ //TODO: make protected in the next release
1727 public LinkedInApi (String ... scopes ) {
28+ //TODO: deprecated check
1829 if (scopes == null || scopes .length == 0 ) {
1930 scopesAsString = null ;
2031 } else {
@@ -35,6 +46,10 @@ public static LinkedInApi instance() {
3546 return InstanceHolder .INSTANCE ;
3647 }
3748
49+ public static LinkedInApi instance (String ... scopes ) {
50+ return scopes == null || scopes .length == 0 ? instance () : new LinkedInApi (scopes );
51+ }
52+
3853 @ Override
3954 public String getAccessTokenEndpoint () {
4055 return "https://api.linkedin.com/uas/oauth/accessToken" ;
You can’t perform that action at this time.
0 commit comments