public CategoryUnsplashSource(bool ask = false)
        {
            if (!ask)
            {
                return;
            }

            Category = Unsplash.ShowEnumMenu <Categories>().ToString();
        }
Exemplo n.º 2
0
      public async Task <IActionResult> Image(int id)
      {
          /*  Dictionary<string, string> jsonValues = new Dictionary<string, string>();
           * jsonValues.Add("client_id", "6f1f83f0399e8b91d2e5a07b05d65907c452cc90501ab0c002a6d99815c4adc5");
           *
           * var foto = await Unsplash.SendRequest(HttpMethod.Get,"https://api.unsplash.com/photos/random","6f1f83f0399e8b91d2e5a07b05d65907c452cc90501ab0c002a6d99815c4adc5",JsonConvert.SerializeObject(jsonValues));
           * //await Task.Delay(60000);
           * Console.WriteLine("helpppppppppp");
           */
          Unsplash photo = new Unsplash("6f1f83f0399e8b91d2e5a07b05d65907c452cc90501ab0c002a6d99815c4adc5", "");


          _dataservice.SaveImage(photo.url, id);

          return(LocalRedirect(Url.Content("~/Page/Page/" + id)));
      }