public static IPromise <Res.Participant> LeaveProtest( string protestId, string userAvatarId) { Req.LeaveProtest req = new Req.LeaveProtest { userAvatarId = userAvatarId, }; return(post <Res.ParticipantResponse>("/protests/" + protestId + "/leave", req) .Then(res => { GraphMap g = new GraphMap(res.graph); return g.Participant(res.participant); })); }
public static IPromise <Res.Participant> JoinProtest( string protestId, string userAvatarId, string bannerId, List <string> bannerWords) { Req.JoinProtest req = new Req.JoinProtest { userAvatarId = userAvatarId, bannerId = bannerId, bannerWords = bannerWords, }; return(post <Res.ParticipantResponse>("/protests/" + protestId + "/join", req) .Then(res => { GraphMap g = new GraphMap(res.graph); return g.Participant(res.participant); })); }