summaryrefslogtreecommitdiffstats
path: root/web.vala
blob: 860e60725d752746f7f3a9e5cb56b19066d92f74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class Web {
	private Soup.SessionAsync session;
	private static string server = "https://shop.kreativitaet-trifft-technik.de";

	public Web() {
		session = new Soup.SessionAsync ();
	}

	public void login() {
		var message = new Soup.Message ("GET", server+"/login");
		session.send_message (message);
	}

	public void logout() {
		var message = new Soup.Message ("GET", server+"/logout");
		session.send_message (message);
	}

	public void add(string article) {
		var message = new Soup.Message ("GET", server+"/buy");
		session.send_message (message);
	}
}