<commit_before>package gr.sperfect.djuqbox.webapp.client;

import gr.sperfect.djuqbox.webapp.shared.data.Room;
import gr.sperfect.djuqbox.webapp.shared.data.User;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import org.fusesource.restygwt.client.Attribute;
import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;

public interface RestApiService extends RestService {


	//http://resty-gwt.github.io/documentation/restygwt-user-guide.html
	
	@GET
	@Path("rooms")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getRooms( MethodCallback<List<Room>> callback);
	
	@GET
	@Path("rooms/{id}")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getRoom(@PathParam("id") String aRoomId,  MethodCallback<Room> callback);
	
	
	@POST
	@Path("rooms")  
	public void createRoom(Room r, MethodCallback<Room> callback);
	
	@PUT
	@Path("rooms")  
	public void updateRoom(Room r, MethodCallback<Room> callback);
	
	
		
	@GET
	@Path("rooms/{id}/users")  
	public void getRoomUsers(@PathParam("id") @Attribute("id") Room r, MethodCallback<List<User>> callback );
	
	
	
	//paizei!!
	@POST
	@Path("rooms/{id}/users")  
	public void addUserToRoom(@PathParam("id") String aRoomId, User r, MethodCallback<Void> callback );
	
	
	
//	@PUT
//	@Path("room/users") 
//	public void createRoom(Room r, User u,  MethodCallback<Room> callback);
	//den ginetai Methods can optionally declare one method argument before the callback to pass via the request body
	
//	@PUT
//	@Path("room/users") 
//	public void addUserToRoom(RoomUser ru,  MethodCallback<Room> callback);

	
	@GET
	@Path("users")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getUsers( MethodCallback<List<User>> callback);
	
	<commit_msg>delete room<commit_after>package gr.sperfect.djuqbox.webapp.client;

import gr.sperfect.djuqbox.webapp.shared.data.Room;
import gr.sperfect.djuqbox.webapp.shared.data.User;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;

import org.fusesource.restygwt.client.Attribute;
import org.fusesource.restygwt.client.MethodCallback;
import org.fusesource.restygwt.client.RestService;

public interface RestApiService extends RestService {


	//http://resty-gwt.github.io/documentation/restygwt-user-guide.html
	
	@GET
	@Path("rooms")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getRooms( MethodCallback<List<Room>> callback);
	
	@GET
	@Path("rooms/{id}")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getRoom(@PathParam("id") String aRoomId,  MethodCallback<Room> callback);
	
	
	@POST
	@Path("rooms")  
	public void createRoom(Room r, MethodCallback<Room> callback);
	
	@PUT
	@Path("rooms/{id}")  
	public void updateRoom(@PathParam("id") @Attribute("id") Room r, MethodCallback<Room> callback);
	
	@DELETE
	@Path("rooms/{id}")  
	public void deleteRoom(@PathParam("id") @Attribute("id") Room r, MethodCallback<Void> callback );
	
		
	@GET
	@Path("rooms/{id}/users")  
	public void getRoomUsers(@PathParam("id") @Attribute("id") Room r, MethodCallback<List<User>> callback );
	
	
	
	//paizei!!
	@POST
	@Path("rooms/{id}/users")  
	public void addUserToRoom(@PathParam("id") String aRoomId, User r, MethodCallback<Void> callback );
	
	
	
	
	
//	@PUT
//	@Path("room/users") 
//	public void createRoom(Room r, User u,  MethodCallback<Room> callback);
	//den ginetai Methods can optionally declare one method argument before the callback to pass via the request body
	
//	@PUT
//	@Path("room/users") 
//	public void addUserToRoom(RoomUser ru,  MethodCallback<Room> callback);

	
	@GET
	@Path("users")  // prepei na einai javax.ws.rs.Path !!!!!
	public void getUsers( MethodCallback<List<User>> callback);
	
	
{'fraction_non_alphanumeric': 0.14860363822700487, 'fraction_numerical': 0.0, 'mean_word_length': 4.601147776183645, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3315398', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1322, 'n_words': 293}