|
@@ -24,6 +24,11 @@ public class YouAreEll {
|
24
|
24
|
return MakeURLCall("/ids", "GET", "");
|
25
|
25
|
}
|
26
|
26
|
|
|
27
|
+ public String get_userid(String github) throws IOException{
|
|
28
|
+
|
|
29
|
+ return MakeURLCall("/ids/" + github, "GET", "");
|
|
30
|
+ }
|
|
31
|
+
|
27
|
32
|
public String post_id(String jpayload) throws IOException{
|
28
|
33
|
|
29
|
34
|
return MakeURLCall("/ids", "POST", jpayload);
|
|
@@ -35,16 +40,24 @@ public class YouAreEll {
|
35
|
40
|
}
|
36
|
41
|
|
37
|
42
|
public String get_messages(String...path) throws IOException{
|
|
43
|
+
|
38
|
44
|
String mainurl = "/messages";
|
39
|
|
- if (path.length > 0)
|
|
45
|
+ if (path.length > 0) {
|
40
|
46
|
mainurl = "/ids/" + path[0] + mainurl;
|
41
|
|
-
|
42
|
|
- if (path.length > 1)
|
|
47
|
+ }
|
|
48
|
+ if (path.length > 1) {
|
43
|
49
|
mainurl = mainurl + "/" + path[1];
|
|
50
|
+ }
|
44
|
51
|
|
45
|
52
|
return MakeURLCall(mainurl, "GET", "");
|
46
|
53
|
}
|
47
|
54
|
|
|
55
|
+ public String get_messages_from(String to, String from) throws IOException{
|
|
56
|
+ String nutty = "/ids/" + to + "/from/" + from;
|
|
57
|
+ System.out.println(nutty);
|
|
58
|
+ return MakeURLCall(nutty, "GET", "");
|
|
59
|
+ }
|
|
60
|
+
|
48
|
61
|
public String post_messages(Message message) throws IOException{
|
49
|
62
|
String jpayload = mapper.writeValueAsString(message);
|
50
|
63
|
if (message.getToid().equalsIgnoreCase("")){
|