Skip to content

Commit ec3e774

Browse files
committed
code
1 parent a26876e commit ec3e774

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ app and makes use of Android's [intent][] framework.
1818

1919
Create a wrapper instance:
2020

21-
```
21+
```java
2222
ApiWrapper wrapper = new ApiWrapper("client_id", "client_secret",
2323
null, null, Env.LIVE);
2424
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ sourceSets {
1616
}
1717

1818
dependencies {
19-
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.0.3'
20-
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.0.3'
19+
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.1.2'
20+
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.1.2'
2121
compile group: 'org.json', name: 'json', version: '20090211'
2222

2323
testCompile group: 'junit', name: 'junit-dep', version: '4.8.2'

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ public int size() {
155155
return mParams.size();
156156
}
157157

158+
public String getResource() {
159+
return mResource;
160+
}
161+
158162
/**
159163
* @return a String that is suitable for use as an <code>application/x-www-form-urlencoded</code>
160164
* list of parameters in an HTTP PUT or HTTP POST.

src/test/java/com/soundcloud/api/RequestTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,4 +253,9 @@ public void shouldNotModifyOriginal() {
253253
assertThat(copy.getToken(), not(equalTo(orig.getToken())));
254254
assertThat(orig.getListener(),equalTo(copy.getListener()));
255255
}
256+
257+
@Test
258+
public void shouldExposeResource() throws Exception {
259+
assertThat(new Request("/foo?foo=bar").getResource(), equalTo("/foo"));
260+
}
256261
}

0 commit comments

Comments
 (0)