コード例 #1
0
 public APIResource(Client client)
 {
     this.UserAPI = new UserAPI(client);
     this.TeamAPI = new TeamAPI(client);
     this.ProjectAPI = new ProjectAPI(client);
     this.EntryAPI = new EntryAPI(client);
     this.EventAPI = new EventAPI(client);
     this.FileAPI = new FileAPI(client);
     this.PageAPI = new PageAPI(client);
     this.PostAPI = new PostAPI(client);
     this.TaskAPI = new TaskAPI(client);
 }
コード例 #2
0
 public ActionResult Auth(string code)
 {
     OAuth auth = new OAuth("e324954800fd49e28ed905fd35c40581", "http://localhost:10438/home/auth");
     string msg;
     if (auth.GetAccessTokenByCode(code, out msg))
     {
         Client client = new Client(auth);
         Session["client"] = client;
     }
     ViewBag.msg = msg;
     return View();
 }
コード例 #3
0
 protected override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     base.OnActionExecuting(filterContext);
     this.WTClient = filterContext.HttpContext.Session["client"] as Client;
 }