codingOL

IGFXUserService.cs

Oct 8th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.61 KB | None | 0 0
  1. using GameForestCore.Common;
  2. using System.ServiceModel;
  3. using System.ServiceModel.Web;
  4.  
  5. namespace GameForestCore.Services
  6. {
  7.     [ServiceContract]
  8.     public interface IGFXUserService
  9.     {
  10.         [OperationContract, WebInvoke(UriTemplate = "/{username}", ResponseFormat = WebMessageFormat.Json, Method = "GET")]
  11.         GFXRestResponse GetUserInfo(string username);
  12.        
  13.         [OperationContract, WebInvoke(UriTemplate = "/session/{usersessionid}", ResponseFormat = WebMessageFormat.Json, Method = "GET")]
  14.         GFXRestResponse GetUserInfoFromSession(string usersessionid);
  15.  
  16.         [OperationContract, WebInvoke(UriTemplate = "/{username}?firstname={firstname}&lastname={lastname}&description={description}&usersessionid={usersessionid}", ResponseFormat = WebMessageFormat.Json, Method = "PUT")]
  17.         GFXRestResponse SetUserInfo(string username, string firstname, string lastname, string description, string usersessionid);
  18.  
  19.         [OperationContract, WebInvoke(UriTemplate = "/login?username={username}&password={password}", ResponseFormat = WebMessageFormat.Json, Method = "POST")]
  20.         GFXRestResponse Login(string username, string password);
  21.  
  22.         [OperationContract, WebInvoke(UriTemplate = "/login?usersessionid={usersessionid}", ResponseFormat = WebMessageFormat.Json, Method = "DELETE")]
  23.         GFXRestResponse Logout(string usersessionid);
  24.  
  25.         [OperationContract, WebInvoke(UriTemplate = "/changepassword?usersessionid={usersessionid}&oldpassword={oldpassword}&newpassword={newpassword}", ResponseFormat = WebMessageFormat.Json, Method = "PUT")]
  26.         GFXRestResponse ChangePassword(string usersessionid, string oldpassword, string newpassword);
  27.  
  28.         [OperationContract, WebInvoke(UriTemplate = "/login?usersessionid={usersessionid}", ResponseFormat = WebMessageFormat.Json, Method = "PUT")]
  29.         GFXRestResponse Heartbeat(string usersessionid);
  30.  
  31.         [OperationContract, WebInvoke(UriTemplate = "/register?username={username}&password={password}", ResponseFormat = WebMessageFormat.Json, Method = "POST")]
  32.         GFXRestResponse Register(string username, string password);
  33.  
  34.         [OperationContract, WebInvoke(UriTemplate = "/register?username={username}&password={password}", ResponseFormat = WebMessageFormat.Json, Method = "DELETE")]
  35.         GFXRestResponse Unregister(string username, string password);
  36.  
  37.         [OperationContract, WebInvoke(UriTemplate = "/fb?fbid={fbid}&username={email}&firstname={fname}&lastname={lname}", ResponseFormat = WebMessageFormat.Json, Method = "POST")]
  38.         GFXRestResponse FBConnect(string fbid, string email, string fname, string lname);
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment