Пример #1
0
 public static IPromise <Res.Leaflet> GetById(string id)
 {
     return(get <Res.LeafletResponse>("/leaflets/" + id)
            .Then(res =>
     {
         GraphMap g = new GraphMap(res.graph);
         return g.Leaflet(res.leaflet);
     }));
 }
Пример #2
0
 public static IPromise <Res.Leaflet> DestroyLeaflet(
     string leafletId)
 {
     return(post <Res.LeafletResponse>("/leaflets/" + leafletId + "/destroy")
            .Then(res =>
     {
         GraphMap g = new GraphMap(res.graph);
         return g.Leaflet(res.leaflet);
     }));
 }
Пример #3
0
 public static IPromise <Res.Leaflet> CreateLeaflet(
     uint placeId,
     uint protestTypeId,
     string bannerId,
     List <string> bannerWords)
 {
     Req.CreateLeaflet req = new Req.CreateLeaflet
     {
         placeId       = placeId,
         protestTypeId = protestTypeId,
         bannerId      = bannerId,
         bannerWords   = bannerWords
     };
     return(post <Res.LeafletResponse>("/leaflets", req)
            .Then(res =>
     {
         GraphMap g = new GraphMap(res.graph);
         return g.Leaflet(res.leaflet);
     }));
 }