Skip to content

Commit ebd3ce8

Browse files
committed
Make getUserAgent() public
1 parent 9178f8f commit ebd3ce8

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/main/java/com/soundcloud/api/ApiWrapper.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,15 @@ public URI getURI(Request request, boolean api, boolean secure) {
238238
return URI.create((api ? env.getResourceHost(secure) : env.getAuthResourceHost(secure)).toURI()).resolve(request.toUrl());
239239
}
240240

241+
/**
242+
* User-Agent to identify ourselves with - defaults to USER_AGENT
243+
* @return the agent to use
244+
* @see CloudAPI#USER_AGENT
245+
*/
246+
public String getUserAgent() {
247+
return USER_AGENT;
248+
}
249+
241250
/**
242251
* Request an OAuth2 token from SoundCloud
243252
* @param request the token request
@@ -312,14 +321,6 @@ protected SSLSocketFactory getSSLSocketFactory() {
312321
return SSLSocketFactory.getSocketFactory();
313322
}
314323

315-
/**
316-
* User-Agent to identify ourselves with - defaults to USER_AGENT
317-
* @return the agent to use
318-
* @see CloudAPI#USER_AGENT
319-
*/
320-
protected String getUserAgent() {
321-
return USER_AGENT;
322-
}
323324

324325
/** @return The HttpClient instance used to make the calls */
325326
public HttpClient getHttpClient() {
@@ -413,7 +414,7 @@ public long resolve(String url) throws IOException {
413414
}
414415

415416
@Override
416-
public Stream resolveStreamUrl(String url) throws IOException {
417+
public Stream resolveStreamUrl(final String url) throws IOException {
417418
HttpResponse resp = head(Request.to(url));
418419
if (resp.getStatusLine().getStatusCode() == HttpStatus.SC_MOVED_TEMPORARILY) {
419420
Header location = resp.getFirstHeader("Location");

src/main/java/com/soundcloud/api/CloudAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface CloudAPI {
2323
// other constants
2424
String REALM = "SoundCloud";
2525
String OAUTH_SCHEME = "oauth";
26-
String VERSION = "1.0.1";
26+
String VERSION = "1.1-SNAPSHOT";
2727
String USER_AGENT = "SoundCloud Java Wrapper ("+VERSION+")";
2828

2929
/**

0 commit comments

Comments
 (0)