-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
47 lines (26 loc) · 1.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Owkwo
-----------------------
An API for all the functions within the www.wer-kennt-wen.de network.
The concept is due to a lack of an open api to construct and parse all the HTTP-Request to gain access to the underlying functions.
For usage in mobile clients like android it will be async and event driven by a delegate pattern.
The API will be quite easy to use:
Instantiate the WKWService class and provide a class implementing the WKWServiceDelegatable interface with all the callback functions or using
the WKWServiceDelegateTemplate and overriding only the callbacks you need.
e.g.
WKWService myWKWServiceAccess = new WKWService(myWKWServiceDelegate);
Call the methods on your WKWService instance and react within the callbacks in your provided delegate.
Callbacks are:
- public void onUpdate(ArrayList<ParentNewsPost> posts, String status );
After using the updatePosts method on the WKWService
- public void onPost(ArrayList<ParentNewsPost> posts, String status );
After posting a NewsPost
- public void onComment(ArrayList<ParentNewsPost> posts, String status );
After posting a comment
- public void onLogIn(ArrayList<ParentNewsPost> posts, String status);
After logging in the WkW-network
- public void onLogOut(String status);
After logging out
Use the status strings (WKWServiceDelegatable.STATUS_SUCCESSFUL and WKWServiceDelegatable.STATUS_ERROR) to check if
everything was fine with the HTTP-Request and the method call.
The ParentNewsPost list contains all the news posts and access to the comments related to those via getComments().
iPhone version will follow.