Adden user data completion and docs correction

This commit is contained in:
Filip Izydorczyk
2020-12-31 14:24:55 +01:00
parent cd0f4bccd9
commit 665807240f
8 changed files with 138 additions and 41 deletions

View File

@ -2,6 +2,9 @@ package com.plannaplan.api;
import com.github.scribejava.core.builder.api.DefaultApi10a;
/**
* singleton class to sign usos api requests with oauth
*/
public class UsosOauth1Service extends DefaultApi10a {
private static final String AUTHORIZE_URL = "https://usosapidemo.amu.edu.pl/services/oauth/authorize";
@ -30,6 +33,12 @@ public class UsosOauth1Service extends DefaultApi10a {
return InstanceHolder.INSTANCE;
}
/**
* get instance withj scopes
*
* @param scopes to get instance with
* @return UsosOauth1Service instance
*/
public static UsosOauth1Service instance(String... scopes) {
return scopes == null || scopes.length == 0 ? instance() : new UsosOauth1Service(scopes);
}