Esempio n. 1
0
        internal Task <string> PostWebResultAsync(SkroutzRequest skroutzRequest)
        {
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Path.Combine(skroutzRequest.DomainEndPoint, skroutzRequest.PostData));

            req.Method = skroutzRequest.Method.ToString();

            return(GetResponse(req));
        }
Esempio n. 2
0
        internal Task <string> GetWebResultAsync(SkroutzRequest skroutzRequest)
        {
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Path.Combine(skroutzRequest.ApiEndPoint, skroutzRequest.Path));

            req.Method = skroutzRequest.Method.ToString();
            req.Accept = $"application/vnd.skroutz+json; version={skroutzRequest.ApiVersion}";
            req.Headers["Authorization"] = $"{skroutzRequest.AuthResponse.TokenType} {skroutzRequest.AuthResponse.AccessToken}";

            return(GetResponse(req));
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sku" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Sku(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Product" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Product(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserProfile" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public UserProfile(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FilterGroup" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public FilterGroup(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Manufacturer" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Manufacturer(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Category" /> class
 /// </summary>
 /// <param name="skroutzRequest">The access token provided by the OAuth2.0 protocol</param>
 public Category(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserFavorites" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public UserFavorites(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Search" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Search(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserNotifications" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public UserNotifications(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shop" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Shop(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Flag" /> class
 /// </summary>
 /// <param name="skroutzRequest">Instance of the SkroutzRequest class</param>
 public Flag(SkroutzRequest skroutzRequest)
 {
     _skroutzRequest = skroutzRequest;
 }